API CAN CODE �Computational Foundations of �Data Science
Lesson 2.5: Preparing Data for Analysis
This work was made possible through generous support from the National Science Foundation (Award # 2141655).
2.4 Recap
Warmup
Finding the Billboard Hot 100
Getting Example Code
Once subscribed, go to the right side (look for “Code Snippets”): �make sure the “Target” reads “Python” and the “Client” reads “Requests”.
Request from EduBlocks
Preview the Data
What variables are present? What kind of data is stored?�
What questions do you have about the data?
Explore the Data
Modify your code so that it lists just the artists in the dataset. Do you recognize any artists in the list?�
How many Taylor Swift songs are in this list? (Write a loop that counts for you!)�
Choose an artist and write an if statement to check if there are any songs by that artist in the dataset.
Investigate!
Formulate a question of interest about the Billboard 100 data and answer it! You might use for loops or conditional if statements like we used for the Movie investigation.�
You might also want data from another week; think about what statements you could add to your program to draw in data from other weeks!�
Share Your Investigation Results!
Exporting Data from EduBlocks
Importing Data into CODAP
Importing Data into CODAP
Upcoming work with CODAP
Thanks!
apicancode@umd.edu
This work was made possible through generous support from the National Science Foundation (Award # 2141655).
API Can Code is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike
4.0 International (CC BY-NC-SA 4.0) License