#### <sup>[Ollin](../../index.md) → [Examples](../index.md) → Data</sup>

---

## Data

| [![Edits](https://media.ollin.art/examples/Data/Edits/still-640.jpg?v=91deec75)](edits.md) | [![Outside](https://media.ollin.art/examples/Data/Outside/still-640.jpg?v=a786f3b0)](outside.md) | [![Places](https://media.ollin.art/examples/Data/Places/still-640.jpg?v=9840da9a)](places.md) | [![Quakes](https://media.ollin.art/examples/Data/Quakes/still-640.jpg?v=6e704331)](quakes.md) |
|---|---|---|---|
| [Edits](edits.md) | [Outside](outside.md) | [Places](places.md) | [Quakes](quakes.md) |
| [![Readings](https://media.ollin.art/examples/Data/Readings/still-640.jpg?v=5fb2928c)](readings.md) |  |  |  |
| [Readings](readings.md) |  |  |  |

These sketches draw from data. The first two read a file once in `setup()`, and the file decides what the picture looks like. The scale, the colors, and the labels all come out of the file, so none of them is typed into the sketch. The third sketch asks an address again and again, so the picture shows something happening now. The fourth holds one connection open, so every event arrives the moment it happens. The fifth asks about the sky over one city, and draws it.

| Example | What it shows |
|---|---|
| [Readings](readings.md) | a year of readings drawn as a range chart from a CSV file: typed reads by column name, a scale derived from `numbers(_:)`, and notes with commas and quotation marks in them, which survive the parse |
| [Places](places.md) | a survey drawn from a JSON document: nested objects reached by name, index pairs looped over as paths, and a station with no color that gets a fallback value without a check |
| [Quakes](quakes.md) | a day of earthquakes read live and re-read again and again: the sketch rebuilds only when the answer changed, keeps the last good list through a failure, and writes what went wrong on the canvas |
| [Edits](edits.md) | edits to the world's encyclopedia drawn as rain: one connection held open with a `PushFeed`, one drop the moment somebody saves a page, sized by the bytes changed and colored by growth or removal |
| [Outside](outside.md) | the sky over Mexico City, drawn from a `Weather`: the sun placed by `Place.sun(at:)` from the clock, clouds by cover, rain by the millimeter, everything drifting with the wind, and a caption that says the city is still being looked up until it is |

The data in the first two sketches is invented. Quakes reads live from the public feed of the United States Geological Survey, Edits from the Wikimedia Foundation's public stream of recent changes, and Outside from Open-Meteo's forecast service. Copy how each sketch reads its data, not the numbers.

See [`Docs/Helpers/Data.md`](../../docs/helpers/data.md) for `loadTable` and `loadJSON`, [`Docs/Helpers/LiveData.md`](../../docs/helpers/livedata.md) for `DataFeed` and `PushFeed`, and [`Docs/Helpers/Weather.md`](../../docs/helpers/weather.md) for `Weather` and the sun.
