This guide will help you export your App Lab Data Tab data and turn it into a .json file that you can import into a React or Vite project (using Google Sheets + TableConvert, or the command-line method).
📊 First, choose your dataset: Browse the Complete Code.org Data Library to see all 97 available datasets across 12 categories!
You’ll use:
Cats or Viral 50 USA)..csv file containing your data..csv file you just exported from App Lab..json file into your project’s /src folder.Rename it to something meaningful, such as:
data.jsoncats.jsonlegislators.jsonOpen your App.jsx (or any component) and add:
import data from "./data.json";
console.log(data);
Run your app and check the browser console — you should see your JSON data printed!
You can skip Google Sheets entirely if you’re comfortable using the terminal:
Step 1: Save your tab-separated data from the console as
data.txt
in your project’s root folder (/).
Step 2: In your terminal, run:
npx -y csvtojson --delimiter="\t" data.txt > src/data.json
This converts your tab-separated file (data.txt) directly into JSON and saves it as src/data.json.
Step 3: Import it in React as usual:
import data from "./data.json";
console.log(data);
Converting data from one format or source to another — and doing it in a repeatable, error-free way — is a core skill for developers and data analysts.
Being able to move data cleanly between tools like Code.org, Google Sheets, and JSON helps you:
Whenever you can, automate and document your conversion steps — that way, you can repeat them without mistakes and easily share your process with teammates.
This guide was developed with assistance from OpenAI’s ChatGPT (GPT-5) to ensure clarity, accuracy, and consistency in the explanations and examples.