..or rather, you shouldn't!
Common structured data types:
- Arrays
- Indexed values (0, 1, 2, 3...)
- Various ways of looping through arrays
forloopfor...ofloopforEach()methodmap()method
- Other array functions
- Dictionaries/Hashes (Objects in .js, HashMap in Java)
- Key-value pairs rather than indexed values
- Various ways of looping through objects
for...inloopObject.keys()methodObject.values()methodObject.entries()method
- Other languages have other data structures
- Lists, Sets, Tuples, etc in Python
- Arrays, Vectors, Linked Lists, etc in C/C++
- Structs, Enums, etc in Java/Rust/Go/Swift
Loading data payloads from external files or APIs
- Text file
loadStrings()- p5 example
- CSV (spreadsheet/tabular data)
loadTable()- p5 example
- JSON
- json validator
- json tools
loadJSON()- p5 example
- XML
loadXML()- p5 example
- "WTF is an API?"
- Load some data!
- Example of swapping an API:
- How does code talk to other code?
- Example live-code w/collision detection
- Databases are searchable data structures
- Relational & queryable databases allow for large sets of searchable data
- Pro: More powerful and reliable than a data file
- Pro: Hosted in the cloud, a db can share data between users
- Con: More difficult to set up and work with
- Some different types of databases: SQL, Mongo, GraphQL
- What's the best tool for the job?
- Data search example
- Types of data viz
- Data sources
- awesome-json-datasets
- public-apis
- freepublicapis.com
- Topic-specific:
- Data Viz drawing tools
- Make your own! - This is a Processing-specific series, but would port easily to p5js
- D3
- chart.js
- Vizzu
- deck.gl
- Other data viz libraries
Watch:
- The Pudding
- Daniel Shiffman: Introduction to Data and APIs in JavaScript
- Giorgia Lupi: How we can find ourselves in data
- Aaron Koblin: From Data to Digital Art
- Data Becomes Art in Immersive Visualizations
- Refik Anadol: Art in the age of machine intelligence
Build a data visualization
- Types of visuals to consider
- A chart
- An interactive visual representation
- A storytelling device
- An abstract interpretation of the data
- Data sources
- Handcrafted/hard-coded arrays, objects
- Loaded data files (json, csv, xml, text)
- API requests
- Inspiration
- Steps
- Find or create some interesting data
- Load your data source into your environment
- Draw something based on your data
- Present your generators