API CAN CODE �Data Science Practices
Lesson 3.6: Linear Models with Story Builder
This work was made possible through generous support from the National Science Foundation (Award # 2141655).
Warmup
2
Lesson 3.5 Recap
3
4
https://www.youtube.com/watch?v=yNN7eDXzlMo
Earthquake Data
We are going to find some data from the US Geological Survey website.
The website is found here.�
Look for the Past Day -> All Earthquakes
dataset (in CSV format). Download this file.�
Geologists might use data like this, and analyze it like this, to study trends in earthquakes!
What makes this a good source for data on earthquakes according to the 5 Vs?
5
Earthquake Data - Converter
We now need to convert this CSV file to JSON so we can use it with our EduBlocks program.
Navigate to the API Can Code CSV Converter.
6
Earthquake API
Open this program in EduBlocks. �
7
Offline API Backup!
8
Intro to CODAP Story Builder
Story Builder records the step-by-step process of the data analysis about a dataset, building out our story about the data. Each step is called “moment” and can be linked to text and graphs.
9
Moment Title
Notes/Description
Graph
(Click the numbers to switch between
Moments)
There’s a quick guide in your handouts for future use!
Earthquakes: EduBlocks to CODAP
Copy the output from your program, and then open CODAP and select “Create New Document.”
10
NEW: Today, start the Story Builder. This will allow you to save different stages of analysis on a dataset in a multi-slide “story.”
Earthquakes: EduBlocks to CODAP
11
Moment 1
Step 1: Create a new Moment (already done)
Step 2: Put a title
Step 3: Create your graph(s)
Step 4: Take notes of
important information
Step 5: Save the Moment
Does depth predict magnitude?
12
Does depth predict magnitude?
13
Moment 2
Your results might be different
from the example here! (Why?)
Does depth predict magnitude?
14
Moment 3
Does depth predict magnitude?
15
Moment 4
Your results might be different
from the example here!
Does depth predict magnitude?
The r2 value presented along with the line of best fit indicates how much variability in the y variable (magnitude) is explained by the x variable (depth).
16
Moment 4
What does this mean?
17
Moment 4
Does depth predict magnitude?
18
Moment 4
How “wrong” are our predictions?
19
Moment 5
How “wrong” are our predictions?
20
Moment 5
Hint: Here you can find many other functions that you may need in the future!
How “wrong” are our predictions?
21
Moment 5
How “wrong” are our predictions?
22
How much variance is left?
23
Moment 5
How much variance is left?
24
Moment 5
Exit Ticket
Submit a link to your CODAP program with your Story Builder moments in it.�
List one interpretation you can take away from one of the graphs you created.
25
Possible interpretations to think about:
Use the menu → Share…
→ “Get link to shared view” to get a link to your CODAP.
Thanks!
apicancode@umd.edu
26
This work was made possible through generous support from the National Science Foundation (Award # 2141655).