MHC 250/Seminar 4:
Shaping the Future of New York City
Topics: Neighborhoods; Simple plots using matplotlib
Deadline: Wednesday, 8 February 2017, 11:59pm
Getting Started with matplotlib
This homework uses matplotlib
which is available with anaconda
or visit matplotlib
(we're using Python 3).
If you would prefer not to upgrade your Python installation (or would like to work through a browswer), there are several web-based services. One that already has the libraries were are using is PythonAnywhere.
NYC Open Data
Via the NYC Open Data project, you can access data from almost every city agency. We will use the following data set:
- Water Consumption: download the data set as a CSV (no filtering, we will use all rows and all columns).
We will use this data set for later homework assignments. Since scraping the data takes time, save this to use again for the future programs.
NY Fed Data
The Federal Reserve Bank of New York
provides economical and financial data about the greater New York Region. We will use the following data set:
- Labor Market for Recent College Graduates: Scroll to the bottom of the page, and click on the "Download Data." The file will be .xlsx, and the data is on the last sheet. Open in your favorite spreadsheet program (for example, Google Drive or Microsoft Excel). Before exporting, double check to see if there are commas in the salary numbers (if there are, highlight those cells, click on Format > Cells, and then uncheck the box for displaying thousands separators). Export/download as a CSV file.
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.