Community Data Science Workshops (Fall 2015)/Day 3 Projects/Civic data
Building and visualizing datasets using data.seattle.gov and Google apps
In this project, we will explore a few ways to analyze and visualize data from data.seattle.gov. We will examine trends in the construction of houses, townhomes, and condos in Seattle over the last five years, in order to determine the true extent of the current "construction boom".
- We'll download data from two APIs (Socrata open data platform and Google Maps)
- We'll analyze trends over time in our dataset
- We'll visualize our data in graphs and heatmaps
Topics we will cover
- Writing and testing complex API queries
- Reading and writing CSV and JSON files
- Filtering and aggregating data
- Combining data from multiple APIs
- Graphing and mapping data
We will also explore an important non-technical part of data science: thinking critically about data. Thinking critically about the data you have, and what conclusions you can draw from it, is especially important when you are visualizing data, because its easy to mislead people with visualizations. We'll discuss how visualizations based on incorrect data can lead people to make false conclusions, using an example from a recent visualization of building demolitions published in the Northwest design magazine Arcade.
- Step 1
- Download today's scripts and sample datasets: FIXME
- Today's dataset
- Click here to view the Seattle Building Permits database
Visualizing new home construction in Seattle over time
- Has the rate of apartment construction increased since 2010?
Visualizing new home construction in Seattle by neighborhood
- which Seattle neighborhoods have had the most multifamily residential construction (apartments and townhomes) since 2010?
Mapping new home construction in Seattle
- what locations have experienced the highest density of new construction since 2010?
Try to answer these additional questions that draw on the data and methods we're learning today. Ask a mentor if you get stuck!
- In which Seattle neighborhood is the cost of new construction projects highest, on average?
- Where in Seattle are the most commercial buildings being constructed in 2015?
- How does the rate of residential construction in Seattle from 2010-2015 compare to the previous 5 years?
- How many townhouses have been constructed in Seattle since 2011?
- Sample API queries
- Building permit data: https://data.seattle.gov/resource/mags-97de.json?$where=issue_date%20IS%20NOT%20NULL%20&action_type=NEW&category=MULTIFAMILY&$limit=100
- Google maps location (using street address): http://maps.googleapis.com/maps/api/geocode/json?address=5601+22ND+AVE+NW+Seattle+WA
- Google maps location (using lat/long): http://maps.googleapis.com/maps/api/geocode/json?latlng=47.66979666%2C-122.38570052
- Sample charts/maps
- Google Fusion table map of permits 2010-2015 
- Help resources and inspiration
- About Google maps API: https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding
- 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
- Other data.seattle.gov datasets with neighborhood, timeseries, and/or location data
- 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
- Other Socrata sites that use this API