Community Data Science Workshops (Spring 2015)/Day 3 Projects/Civic data
From CommunityData
Building and visualizing datasets using data.seattle.gov and Google apps
In this project, we will explore a few ways to gather data from data.seattle.gov using the Socrata API, the Google Maps API, and Google Fusion tables.
Goals
- Collect data on building permits in Seattle, by neighborhood and by year awarded.
- Combine those data with neighborhood data from the Google Maps API
- Download the results in a CSV file
- Upload results to Google's Fu
Download the Day 3 Socrata project
Click here to download the Socrata 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
- 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
- What Seattle neighborhood has the most art galleries? - neighborhood_culture1.py
- What Seattle neighborhood has the most square feet devoted to arts & culture? - neighborhood_culture2.py
- Which trail gets more bike traffic per month--the Burke Gilman or the Mountain to Sound Trail? - traffic_counter1.py, traffic_counter2.py
- Do people use the trails less when it's cold? monthly_weather.py
- Does the Burke-Gilman get more bike or pedestrian traffic? bike_and_peds1.py
- What is the primary commute direction on the Burke Gilman? bike_and_peds2.py
- 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
- About Google Fusion tables: https://support.google.com/fusiontables/answer/2571232
- Google Fusion Tables mapmaking tutorial: https://support.google.com/fusiontables/answer/2527132?hl=en&topic=2573107&ctx=topic
- API sandbox tool: https://www.hurl.it
- API-powered app: http://web6.seattle.gov/mnm/
- Socrata API help resources: http://dev.socrata.com/consumers/getting-started.html
- filtering results: http://dev.socrata.com/docs/filtering.html
- dealing with timestamps: http://dev.socrata.com/docs/datatypes/timestamp.html
- writing API queries: http://dev.socrata.com/docs/queries.html
- Data.seattle.gov datasets with lat/long or street addresses
- Seattle Cultural Space Inventory
- MTS trail bike/ped traffic
- Burke Gilman trail bike/ped traffic
- Road temps in Seattle
- SPD 911 incident respose
- Instructional videos
- https://data.seattle.gov/videos
- https://www.youtube.com/watch?v=YlKzXTrTLOQ
- https://www.youtube.com/watch?v=Whfp8ojMf0U
- https://www.youtube.com/watch?v=Vd6bwz3ivVA
- Other Socrata sites that use this API