Instructions for tkintermap31.py
tkintermap31 is written in Python 3.1. If seems to work fine on Windows XP machines running Python 3.1. This is a first draft.
To run this, you need:
The SVG file from Wikimedia, here (My copy obtained 26 Aug 2010)
The processed data file from FlowingData.com, saved as a .csv file (My copy obtained 26 Aug 2010)
Correct 3 errors in the SVG file. tkintermap31 will not run correctly without these corrections:
1) Line 189: In “Yukon-Koyukuk, AL”, change “AL” to “AK”
2) Line 7108: Change “NO” to “MO”
3) Line 15095: Change “WIO” to “WI”
You might want to check that the file names are the same as appear near the top of tkintermap31.py.
When you run the program (if it works) here is what should happen: You’ll see a map of the US, colored in a red-ish color scheme (like in FlowingData.com’s maps). There should be 3 listboxes on the right, allowing you to choose the data set you want represented, the month within that data set, and the states you would like to select (no need to select any).
1) click on a single county to select it
2) control-click on a single county to add it to the selection
3) click and drag mouse to select a rectangle of counties (all counties that _intersect_ the rectangle are selected)
4) select one or more states from the “Select states” menu by clicking, control-clicking, shift-clicking, etc.
Selected counties will be outlined in black.
You cannot individually de-select counties or rectangles of counties.
4) does not work in combination with 1)-3)
If one or more counties are selected, pressing “z” or “Z” will zoom in on the selected counties.
If zoomed, pressing control-z or control-Z will return you to the full map.
(Be patient, it takes a while to draw the map.)
If you have resized the window, and want the map resized as well, press “r” or “R”.
(Again, be patient if resizing the full map.)
If you find any errors, typos, whatever, please let me know.