Community Data Science Workshops (Spring 2016)/Day 2 Projects/Socrata: Difference between revisions

From CommunityData
(mark as draft while I work)
("do not use!")
 
(5 intermediate revisions by the same user not shown)
Line 10: Line 10:
|top color=FFF
|top color=FFF
|line color=FFF
|line color=FFF
|top text=This page is a work in progress. This banner will be removed when the page is up-to-date.
|top text=This page is not up to date. Do not use!
|bottom font-size= 1em
|bottom font-size= 1em
|bottom color= FFF
|bottom color= FFF
|bottom text= [[User:Jtmorgan|Jtmorgan]] ([[User talk:Jtmorgan|talk]]) 15:13, 22 April 2016 (EDT)
|bottom text= 17:18, 22 April 2016 (EDT)
|line= none
|line= none
}}</div></div>
}}</div></div>
<div style="clear:both;"></div>
<div style="clear:both;"></div>


[[File:Socrata-square-color.png|right|250px]]
[[File:SeattleGovLogoHome.png|right|250px]]
[[File:SeattleGovLogoHome.png|right|250px]]
__NOTOC__
[[File:Socrata-square-color.png|right|100px]]
 
== Building a Dataset using the Socrata API and data.seattle.gov ==
== Building a Dataset using the Socrata API and data.seattle.gov ==


In this project, we will explore a few ways to gather data from [https://data.seattle.gov data.seattle.gov] using the [[w:Socrata|Socrata]] API. Once we've done that, we will extend this to code to create our own datasets of civic data that we might be able to use to ask and answer questions in the final session.
In this project, we will explore a few ways to gather data from [https://data.seattle.gov data.seattle.gov] using the [[http://www.socrata.com Socrata open data] API. Once we've done that, we will extend this to code to create our own datasets of civic data that we might be able to use to ask and answer questions in the final session.


=== Goals ===
=== Goals ===
Line 31: Line 31:
* Practice reading and extending other people's code
* Practice reading and extending other people's code
* Create a few collections of different types of data from Socrata that you can do research with in the final workshop session
* Create a few collections of different types of data from Socrata that you can do research with in the final workshop session
== Today's project: Analyzing traffic on the Burke-Gilman Trail ==
[[File:Burke-Gilman-Cat-3462.jpg|right|300px]]


=== Download the Socrata project ===
=== Download the Socrata project ===
<font size="+1">[http://jtmorgan.net/cdsw/april25scripts.zip Click here to download the Socrata scripts]</font>
<font size="+1">[http://jtmorgan.net/cdsw/spring2016/week2.zip Click here to download the scripts]</font>


If you are confused by these steps, go back and refresh your memory with the [[Community Data Science Workshops (Fall 2015)/Day 0 setup and tutorial|Day 0 setup and tutorial]] and [[Community Data Science Workshops (Fall 2015)/Day 0 tutorial|Day 0 tutorial]]
If you are confused by these steps, go back and refresh your memory with the [[Community Data Science Workshops (Fall 2015)/Day 0 setup and tutorial|Day 0 setup and tutorial]] and [[Community Data Science Workshops (Fall 2015)/Day 0 tutorial|Day 0 tutorial]]
Line 67: Line 70:
*[http://dev.socrata.com/docs/queries.html writing API queries]
*[http://dev.socrata.com/docs/queries.html writing API queries]


;Datasets
=== Datasets used in this project ===
*[https://data.seattle.gov/Community/Seattle-Cultural-Space-Inventory/vsxr-aydq Seattle Cultural Space Inventory]
You don't need to download these, but you may want to open the links below to view them online, so that you understand the data we will be working with.
*[https://data.seattle.gov/Transportation/MTS-Trail-west-of-I-90-Bridge/u38e-ybnc MTS trail bike/ped traffic]
 
*[https://data.seattle.gov/Transportation/Burke-Gilman-Trail-north-of-NE-70th-St-Bike-and-Pe/2z5v-ecg8 Burke Gilman trail bike/ped traffic]
*[https://data.seattle.gov/Transportation/Burke-Gilman-Trail-north-of-NE-70th-St-Bike-and-Pe/2z5v-ecg8 Burke-Gilman trail bike and pedestrian traffic counts] — this is our primary dataset: hourly traffic counts on the BGT (measured at its intersection of NE 70th street in Northeast Seattle), broken down by bike vs ped, and northbound vs southbound.
*[https://data.seattle.gov/Transportation/MTS-Trail-west-of-I-90-Bridge/u38e-ybnc Mountain-to-Sounds trail bike and pedestrian traffic counts] — this is a 'bonus' dataset which you will need to complete the 'bonus' coding challenges.
 
<!--
*[https://data.seattle.gov/Transportation/Road-Weather-Information-Stations/egc4-d24i Road temps in Seattle]
*[https://data.seattle.gov/Transportation/Road-Weather-Information-Stations/egc4-d24i Road temps in Seattle]
*[https://data.seattle.gov/Public-Safety/Seattle-Police-Department-911-Incident-Response/3k2p-39jp SPD 911 incident respose]
-->


;Videos
;Videos

Latest revision as of 23:18, 22 April 2016

This page is not up to date. Do not use!
17:18, 22 April 2016 (EDT)
SeattleGovLogoHome.png
Socrata-square-color.png

Building a Dataset using the Socrata API and data.seattle.gov[edit]

In this project, we will explore a few ways to gather data from data.seattle.gov using the [Socrata open data API. Once we've done that, we will extend this to code to create our own datasets of civic data that we might be able to use to ask and answer questions in the final session.

Goals[edit]

  • Get set up to build datasets with the Socrata API
  • Have fun collecting different types of data from data.seattle.gov
  • Practice reading and extending other people's code
  • Create a few collections of different types of data from Socrata that you can do research with in the final workshop session

Today's project: Analyzing traffic on the Burke-Gilman Trail[edit]

Burke-Gilman-Cat-3462.jpg

Download the Socrata project[edit]

Click here to download the scripts

If you are confused by these steps, go back and refresh your memory with the Day 0 setup and tutorial and Day 0 tutorial

(Estimated time: 10 minutes)

Topics to cover[edit]

  • explain Socrata open data platform, exists on other government websites
  • navigate to api page and show the documentation, point out examples
  • introduce the API sandbox as a tool for building queries

Example questions[edit]

Other example questions
  • What day of the week does the Burke Gilman have the most total traffic?
  • What day has the most pedestrian traffic?
  • What time of day has the most southbound traffic, on average?
  • How many shoplifting calls has SPD responded to this month so far?

Resources[edit]

API resources

Datasets used in this project[edit]

You don't need to download these, but you may want to open the links below to view them online, so that you understand the data we will be working with.


Videos
Other Socrata sites