If you are unable to successfully install Python locally in Part 1 of this assignment, you can also use the Binder link above to proceed with step 2. After loading Binder, a new Jupyter notebook can be created to complete Part 2.
If this is the case, please make a note in your submitted Jupyter notebook that you still having trouble setting up Anaconda locally and we can work to resolve it.
Be aware that if you complete the assignment on Binder, you cannot save and return to your Binder session.
This week's assignment will be broken into two parts:
Follow the Zero to Python guide on the course website for instructions on how to setup Python locally and launch the Jupyter notebook.
Please see the list of recommended readings for tutorials and background reading to get familiar with Python, conda, and the Jupyter notebook.
Problems? Post your question to Piazza!
If you've successfully followed the guide in the previous step, you should have
installed Python and launched Jupyter by running jupyter notebook
. This should
have launched the Jupyter
dashboard.
Now you can create a new notebook
(instructions)
and get started on the homework!
The notebook will execute code from the current working directory (the folder that the notebook was launched from). This folder is usually your home folder on your laptop. If you are using relative file paths to load the data, the path should be relative to this working directory. From within the Jupyter notebook, you can find out the current working directory by running the following command in a cell:
pwd
If you've downloaded the assignment-1 repository to your computer, it usually makes sense to launch the Jupyter notebook from this folder instead of the default folder. You can change the start-up folder by first navigating to your assignment folder in the command line: see instructions here.
Use a Jupyter notebook to find the Philadelphia ZIP code with the largest average annual ZHVI value, for each year in the data set. The Zillow data is available for download in this repository: data/Zip_zhvi_uc_sfrcondo_tier_0.33_0.67_sm_sa_month.csv.
The Jupyter notebook should use pandas to load the data and analyze it. The following steps should be followed:
- Load the ZHVI data for each ZIP code, selecting only Philadelphia ZIP codes.
- Calculate the annual average ZHVI for each ZIP code in Philadelphia and each year.
- Identify the ZIP code with the maximum value for each year.
The final result should be the year and the ZIP code with the maximum value.
Your assignment will be submitted as a Jupyter notebook (a .ipynb
file) on Github.
Please include your name and Github username at the top of the submitted notebook.
You should submit your assignment through Github. For each assignment, I will provide a GitHub link that can be used to create a new repository. Each student will have their own private repository on GitHub where the assignment can be submitted. Only the student and instructors will have access to the private repository.
The invitation link for this week is:
https://classroom.github.com/a/IrKqDEaa
If you do not have a GitHub account yet, you should be prompted to make an account. After clicking on this link, GitHub will create a new private repo with permissions such that only you and the instructors can view the commits.
Your assignment should be added to this GitHub repository before the deadline. You can add files to the repository through the web (github.com) interface or using the command line locally on your machine.
Below are some references if you need help:
Important: Files should be committed to the newly created private repository (after following the above link) and not to your forked version of the assignment-1 repository.
Your Jupyter notebook should be submitted to your private repository by the deadline, 7pm on 9/15.