In Aksel Olsen's IPython Notebook on processing ACS PUMS data using Pandas, with heavy use of groupby operations and other methods we have learned during the past few weeks, there are some comments explaining the intention of the code in a cell. This notebook was one Aksel prepared initially for his own use, not for presenting to a class. In order to gain a deeper familiarity with the code he presented, this assignment is for you to edit the notebook to add explanations for not only the intention of the code, but also the methods being used. Think of this assignment as one in which your task is to turn this notebook into one that is extremely clear in its explanation of what the code is doing, to help new data scientists like yourselves understand the code and be able to learn how to adapt it for your own purposes. Documentation is a critical skill in making code comprehensible and reusable.
Create a new, clean notebook to contain the homework you'll submit.
Pick 20 consecutive cells from Aksel's notebook (prior to the heading: Mapping detour--PUMA areas--what are they?) that contain code that is not very clear to you in terms of what it is doing.
Copy these 20 cells into your new notebook. Read them closely and look at documentation (for example, the official pandas documentation, or stackoverflow, or by searching google) until you fully understand their code. Remove Aksel's existing comments and commented-out lines of code.
In your notebook, add rich comments to these cells to explain the functionality of the code as clearly and concisely as possible. See example below. You should probably have a line of comments for approx every one or two lines of code. To get full credit, your comments must explain the logic of the code and what's specifically happening, not just the overall gist of what it's trying to do.
Submit your commented ipython notebook to bcourses by the end of Wednesday night.
# first we create a new dataframe using pandas' read_csv() method to load the PUMS data set, then display the first 5 rows with the head() method to inspect what the data looks like
Can't change a rubric once you've started using it.
This area will be used by the assessor to leave
comments related to this criterion.
out of 5
In order to create video or audio recordings your computer needs to be
webcam-enabled. If you don't have a webcam on your computer, you can still
record audio-only messages by first installing the Google Video Chat