In this project we will do a data analysis and visualization project, producing maps like the one in the picture above. The map shows millions of BTUs of energy per capits produced by coal in each state in 2007. Why the heck do they burn so much coal in Wyoming?
The data comes from two Web sites. The Energy Information Administration is a Federal agency that keeps statistics on energy. The file we're using comes from their overview page. To correct for the populations of the different states, we'll also use the list of state populations from Wikipedia.
Finally, we'll actually make the map using IBM's Many Eyes visualization service. This cool Web site lets up upload a table of data, and then choose different ways of visualizing it.
The two files we are using are:
EnergySources.csv
StatePopulations.txt
We've taken a preliminary look at both files in class.
You do not
need to hand in these two files, the TAs will have them when
they grade the programs.
Your program should read the data from the two files, and write out a third file, sources.tsv, which you should upload to Many Eyes to make the visualization.
If you work with a partner, you should get together, sit down, and work at the same computer. That way you'll both learn the things you'll need to know to pass the tests. If you let your partner do all the work, you will end up failing the midterm (and, probably, your partner will be very annoyed).
The basic structure of the program is the two-loop "build a data structure and do something with it" structure we have been considering in the last two lectures. In these steps, I recommend that you print things out as you go along; none of this printing should appear in the final program, but it will help you figure out whether you have the pieces working as you go along.
Hand in this program on Nov. 5.
Hand in just your program on SmartSite. We do not need the input files, or sources.tsv, or your map. The TAs will run the program and verify that it produces the correct output, and they will follow the link in your comment to see the visualization.