Editing Community Data Science Workshops (Fall 2015)/Day 3 Projects/Civic data

From CommunityData

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 38: Line 38:
Now we want to learn whether there is, in fact, a housing boom in Seattle. We'll do this by counting how many new permits are issued each month, and then plot these on a graph.
Now we want to learn whether there is, in fact, a housing boom in Seattle. We'll do this by counting how many new permits are issued each month, and then plot these on a graph.


Run the script <pre>residential_permits_by_month.py</pre>
Run the script <pre>building_permits_by_month.py</pre>


Now open up the CSV output file and check your data. Does this look right to you?
Now open up the CSV output file and check your data. Does this look right to you?


;Challenge question: how could we separate out single family homes from apartments, and count/plot them separately?
;Challenge question: how could we separate out single family homes from apartments, and count/plot them separately?


== Part 3: charting new construction by neighborhood ==
== Part 3: charting new construction by neighborhood ==
Line 49: Line 50:
Now we want to learn where all this new construction is happening. We'll do this by sending the address for each MULTIFAMILY permit to the Google Geolocation API, which will return the neighborhood where that address is located.
Now we want to learn where all this new construction is happening. We'll do this by sending the address for each MULTIFAMILY permit to the Google Geolocation API, which will return the neighborhood where that address is located.


Run the script <pre>multifamily_permits_by_neighborhood.py</pre>
Run the script <pre>building_permits_by_neighborhood.py</pre>


Now open up the CSV output file and check your data. Does this look right to you?
Now open up the CSV output file and check your data. Does this look right to you?
Line 77: Line 78:


== Resources ==
== Resources ==
 
;Datasets
;Press about the construction boom
*http://www.theurbanist.org/2015/10/20/fact-check-no-explosion-in-demolitions/
*http://arcadenw.org/article/changing-seattle
*http://www.seattlemag.com/article/demolitions-seattle-no-neighborhood-unaffected
*http://www.seattletimes.com/pacific-nw-magazine/seattles-building-boom-is-good-news-for-a-new-generation-of-workers/
 
=== Datasets ===
* Permits, last 5 years (today's dataset): https://data.seattle.gov/Permitting/Building-Permits-Current/mags-97de  
* Permits, last 5 years (today's dataset): https://data.seattle.gov/Permitting/Building-Permits-Current/mags-97de  
* Permits older than 5 years: https://data.seattle.gov/Permitting/Building-Permits-Older-than-5-years/47eb-r92t
* Permits older than 5 years: https://data.seattle.gov/Permitting/Building-Permits-Older-than-5-years/47eb-r92t
;Custom Socrata datasets
multifamily 2010-2015: https://data.seattle.gov/Permitting/Building-permits-new-multifamily-residential-const/ma3y-m69a
single and multifamily 2010-2015: https://data.seattle.gov/Permitting/Building-permits-new-residential-construction/kdfe-reh3
=== Sample visualizations ===
*Building permit charts: https://docs.google.com/spreadsheets/d/15DBcWnCroga4B1_ss66YjW9hlJxEk3g1UK7khFLpbQM/edit#gid=0
*Building permit Fusion table: https://www.google.com/fusiontables/DataSource?docid=1gm0wVqnK7zQ7hgp5bsKoBIetMZ75jo-VMs5noDoJ#rows:id=1
=== APIs ===
* Hurl.it API testing tool: https://www.hurl.it


;Sample API queries
;Sample API queries
Line 104: Line 87:
* Google maps location (using lat/long): http://maps.googleapis.com/maps/api/geocode/json?latlng=47.66979666%2C-122.38570052
* Google maps location (using lat/long): http://maps.googleapis.com/maps/api/geocode/json?latlng=47.66979666%2C-122.38570052


*Hurl.it API testing tool: https://www.hurl.it


 
;Google tools
=== Google tools ===
*Fusion tables: https://support.google.com/fusiontables/answer/2571232
*About Fusion table heatmaps: https://support.google.com/fusiontables/answer/1152262
*About Fusion table heatmaps: https://support.google.com/fusiontables/answer/1152262
*About Google maps geocoding API: https://developers.google.com/maps/documentation/geocoding/
*About Google maps geocoding API: https://developers.google.com/maps/documentation/geocoding/
Line 113: Line 95:
=== Socrata open data portal===  
=== Socrata open data portal===  
*More about the Socrata open data portal and API: http://www.socrata.com/products/open-data-portal/
*More about the Socrata open data portal and API: http://www.socrata.com/products/open-data-portal/
*Example of a Socrata API-powered app: http://web6.seattle.gov/mnm/
* Socrata API help resources: http://dev.socrata.com/consumers/getting-started.html
* Socrata API help resources: http://dev.socrata.com/consumers/getting-started.html
:* filtering results: http://dev.socrata.com/docs/filtering.html
:* filtering results: http://dev.socrata.com/docs/filtering.html
:* dealing with timestamps: http://dev.socrata.com/docs/datatypes/timestamp.html
:* dealing with timestamps: http://dev.socrata.com/docs/datatypes/timestamp.html
:* writing API queries: http://dev.socrata.com/docs/queries.html
:* writing API queries: http://dev.socrata.com/docs/queries.html
;Data portal-powered apps
*https://www.seattleinprogress.com/
*http://web6.seattle.gov/mnm/


;Socrata API instructional videos
;Socrata API instructional videos
Please note that all contributions to CommunityData are considered to be released under the Attribution-Share Alike 3.0 Unported (see CommunityData:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)