Homework #5

MHC 250/Seminar 4:
Shaping the Future of New York City
Spring 2017

Topics: geoJSON; Limits to Growth
Deadline: Wednesday, 15 March 2017, 11:59pm

New York City Open Data

We will use two different data sets from OpenData NYC. Download both files in CSV format: Since the files are not that large (and lack easy-to-filter boundaries like zipcodes), we will use the entire file for each.

Folium Notes

The programs in this assignment rely on folium which is an interface to the popular leaflet.js library. The library is magical in the maps it can produce, but the documentation for it is in bit out-of-date from the current version and will give deprecated warnings. Here's a simple example mapping clusterMarkersCUNY.py which:

  1. Sets up a map.
  2. Creates lists for the coodinates of each point (coords), the messages displayed for each point (popups), and the icon for each point (icons).
  3. It then loops through the dataframe, adding to the lists for each row. Note that senior colleges are marked by a `cloud' icon, while all other campuses are green.
  4. It then adds all the markers at once, allowing them to cluster as you zoom out.
  5. The output is saved to an .html file:

Note: on some browsers, the icons are being displayed as the default shape and color (blue), instead of the customized ones above.

Customized Icons

If you would like to use customized icons, see this tutorial.

Assignment

Submitting Homework

To submit your homework, log on to the Blackboard system, and go to "Homework". For each part of the homework, there is a separate input box. You may submit the homework as many times as you would like before the deadline.