This document discusses data visualization using Processing and introduces different data formats like CSV, JSON, and XML. It explains how to get data into Processing, parse it into useful objects, and render those objects on screen. CSV stores data in comma-separated values, JSON stores data as JavaScript objects, and XML stores nested nodes to define flexible data structures. The document demonstrates parsing JSON data into objects using JSONObject and JSONArray classes and storing objects in ArrayLists to render on screen with properties like position, size, color, and rotation.
12. CSV (Comma-Separated Values)
• Values (columns) are typically delimited by commas
• Rows are typically delimited by carriage returns
• Works for most data that can go
in a simple spreadsheet
• Not good for any kind of complex or relational data
• Processing doesn’t have built in support for CSV
but we can use JAVA libraries like opencsv
14. XML (eXtensible Markup Language)
• Data is stored in nested nodes
• Structure of data is extremely flexible to define
but not as flexible to change
• Processing has built-in support for XML
• Many APIs will return data in XML format
16. JSON (JavaScript Object Notation)
• Data is as JavaScript Objects
• Extraordinarily flexible and lightweight
• Lack of named structures can make stored data
difficult to understand
• JAVA and JavaScript do not play as nicely as you
might think