In lecture, we have started to look at turning data into visual encodings using JavaScript code to create visualizations. In this activity, you will develop a complete Python program that exports that data you will be using for your visualization.
A new directory has been created on the release git repository, which you should complete this assignment in. To merge this into your repository, navigate to your workbook directory using a command line and run the following commands:
You will complete this assignment in a jupyter notebook inside of the activity5 directory. To open up the jupyter notebook, run the following command:
Our visualization needs five pieces of information about each major:
Using pandas, create a jupyter notebook that reads in uiuc_demographics_2005_15.csv, and processes the data to create rows containing only the five fields described above.
Doing so will require all of the commands you have already learned, plus
you will need to explore how to merge data from two rows into one row.
This can be done several ways, including using .pivot or
.merge. Using the pandas cheet sheet and Google search are
great ways to get started!
Once you have a DataFrame in good shape, save it to a CSV file with the following command:
After running the .to_csv command, you will find the
file visualizationData.csv in your activity5 directory.
Open it up in Excel to make sure it has all the data you expect.
Make sure to save your notebook before closing your browser or command line!
This activity is submitted digitally via git. View detailed submission instructions here.