Lesson 5 Lab 1: Mapping Toronto Condo Boom Part2: Data Enrichment and Mapping
In Lab 3.1, we extracted and cleaned data for building projects completed between 2004 and 2014 in Toronto with more than 10 dwelling units. In this Lab, we will enrich them with key information.
-
First, calculate the time spent for construction in weeks between the issue and completed date.
-
Using the cell.cross function adds the area/neighborhood name from the Toronto Postal code data set you prepared in the Lab 4.
-
Finally, using the OpenStreetMap MapQuest Noninatim Service enrich the data with the longitude and latitude for each address.
Important Note Regarding OpenStreetMap MapQuest Noninatim Service
- Keep in mind that we are using OpenStreetMap MapQuest Noninatim Service for teaching purpose only. If you want to use the service for a production environment please refer to OpenStreetMap MapQuest Noninatim Service usage policy (https://operations.osmfoundation.org/policies/nominatim/). For the purpose of this lab, you should set your throttle to have a maximum of 1 request per second (or 1000 ms)
- Since we have recorded this lesson, MapQuest updated their API and now requires a key to use their service.
- Request your free key by registering to MapQuest API here: https://developer.mapquest.com/plan_purchase/steps/business_edition/business_edition_free
- Click Key and Reporting and then My Application
- Copy the Consumer Key
- You will need to add your consumer key to the API call as described on mapquest API documentation: http://www.mapquestapi.com/geocoding/
- Request your free key by registering to MapQuest API here: https://developer.mapquest.com/plan_purchase/steps/business_edition/business_edition_free
At the end of the process you should have created the three new following fields:
-
time spent
-
area name
-
lat
-
long
Use mapbox, an online cartography service to map your results. They have a free plan.