Comma-Separated Values, or CSV, is a format for writing data in a file. p5 can work with this format using a p5.Table. This example is based on Daniel Shiffman’s Loading Tabular Data example for Processing. It uses a class to organize data representing a bubble. When the sketch starts, it loads the data for four bubbles from a CSV file. The visitor can add new bubbles, download an updated CSV file, and load in a CSV file.
Table: Created by Daniel Shiffman. Revised by Caleb Foss. From 2024 onwards, edited and maintained by p5.js Contributors and Processing Foundation. Licensed under CC BY-NC-SA 4.0.
You can find the code history of these examples here: pre-2023 Processing example, 2023 code. You can suggest improvements by contributing to the current website!
Related Examples

Black outlines of circles on a white background. Text below the circles reads "Click and drag to add bubbles."
Local Storage
Save data from the browser on the device.

Black outlines of circles on a white background. Text below the circles reads "Click and drag to add bubbles."
JSON
Store data in JavaScript object notation.

Black outlines of circles on a white background. Text below the circles reads "Click and drag to add bubbles."
Table
Store data as comma-separated values.