The Data tab in App Lab allows you to build or import custom datasets into your project, or you can pull data from our own featured data sets, such as information about Planets, Olympic medalists, the Periodic Table of Elements, and many more! This list is updated periodically - if you have custom datasets or ideas of datasets we should feature for students everywhere, click here for steps on how to submit your ideas!
Import or Build Your Own Dataset
If you have a dataset of your own you want to use in your app project, you import datasets or build your own right in App Lab!
For example, you can make an app that lists of classes at your school, the lunch calendar at the school cafeteria, restaurants in your neighborhood, or any other custom data.
Step 1: Put the data in a spreadsheet using a program like Microsoft Excel or Google Sheets, with 1 row for each data item. For example:
School Club |
Number of Students |
Meeting Time |
Club Leader |
Earth Spirit |
42 |
Wednesdays |
Amy |
Student Leadership |
20 |
Mondays |
Joaquin |
Yearbook |
12 |
Fridays |
Heather |
Newspaper |
20 |
Tuesdays |
Maxwell |
Step 2: Save and export the spreadsheet as a .csv file.
Step 3: Open your App Lab project, and click on the Data tab in the top left corner
Step 4: Enter a name for your dataset and click "Add":
Step 5: On the next screen, choose “import csv” and select your .csv file you'd saved from Excel or Google Sheets for example:
Step 5: Choose “Overwrite existing data.” Since this is a brand new table, you won’t lose any data when you do this. Your dataset is now live in your project, to pull and display data from!
---
If you don't want to use Excel or Google Sheets to make and export a .csv from, you can instead build your dataset right from App Lab.
You can enter in text into "column1" for example, then click on the Plus + button to add another column (such as Number of Students, Meeting Time, and so forth) to build your data set. Click on "add row" to add another row to the bottom of your table.
Now you’re ready to use the data in your app!
To learn more about how to use data in apps, check out the lessons in Unit 5 of Computer Science Principles.