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:
- Sets up a map.
- Creates lists for the coodinates of each point (coords), the messages displayed for each point (popups), and the icon for each point (icons).
- 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.
- It then adds all the markers at once, allowing them to cluster as you zoom out.
- 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
- In the readings for this week, Emily Badger (Washington Post) argues that cities can not "run out of room." Daniel B. Luten argues that resources are not infinite, but finite, "that the Malthusian doctrine of limits is simple, is comprehensible, and has merit if not taken too literally." Focuing on your favorite neighborhood, address the following:
What are the largest limiting factors on future population growth in your neighborhood? Has your neighborhood run out of room?
Support your reasoning with data from classwork and quotes from the reading. Include citations for all work and data cited in your answer.
(The original Luten article is difficult to download. Another by Luten, in the same spirit, but a bit more depressing is: Luten 1991.)
- Using the
geoJSON mapper,
make a JSON file that includes the following features:
- your neighborhood marked as a region (e.g. polygon)
- major transportation corridors (e.g. subway lines, major bus routes, or major roads) marked as lines
- three landmarks, marked as points (can be 3 points that are important in general or important to you)
Commit to github, and view using the github preview button (you should see you encoding rendered graphically on a map). See classwork from Lecture 5 for details.
- #2: Submit your encoding as a .json file.
- #3: Submit a screen shot of the graphics window containing the plot.
- Using folium, make a map of the NYC Wifi data set (see above). Your map should:
- have a marker for each wifi location in the data set,
- color the locations with "Free" access green, and
- color all other locations red.
When submitting:
- #4: Submit your Python program as a .py file.
- #5: Submit a screenshot of your map.
- Using folium, make a map of the NYC trash can data set (see above). Your map should:
- have a marker for each public trash basket in the data set,
- skip all private trash baskets (i.e. do not include in your marker set),
- color all the recycling bins green or use a suitable icon, and
- color all other locations a different color (or use another suitable icon).
When submitting:
- #6: Submit your Python program as a .py file.
- #7: Submit a screenshot of your map.
- Project Topic: What would you like to do for your group project?
The default topic is "Where should we add housing?" Indicate your team preference on the Projects Page:
- Topic Preference: Fill out the Project Topic Preference Survey Form on the Projects page.
We will have 4 to 5 different teams for our class, based on students' interest. If you are passionate about a topic related to shaping the future of New York that's not on the list, make sure to include it on
"Other Possible Topics" line.
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.