Partisan data, specifically 2008 presidential data, is available for many states. We are interested in data for voting districts or block groups, since those are the building blocks for redistricting in the application. For use by the application, the data needs to meet two important criteria:
The right form is a CSV (comma separated value) file, with columns like the following example (from Maryland). The Maryland file is named vt24_2008Pres_data.csv. The Census Bureau id for Maryland is 24.
County, VTD, Pres Dem, Pres Rep, Pres Other
1,01-001,83,305,5
1,02-001,125,320,5
1,03-001,118,291,10
......
As you can see there is a header row, followed by rows of data. In this example, the first data row has the county id of 1 and voting district (VTD) id or 01-001. The district recorded 83 votes for Obama, 305 votes for McCain and 5 votes for others.
The file vt24_d00_data.csv is the demographic data file. The first few lines look something like this.
MD,700,24,001,01-001,Allegany Precinct 01-001*,949,898,48,2,0,1,0
MD,700,24,001,02-001,Allegany Precinct 02-001*,1214,1183,11,3,2,5,10
MD,700,24,001,03-001,Allegany Precinct 03-001*,1491,1445,33,1,1,3,8
MD,700,24,001,04-002,Allegany Precinct 04-002,1704,1477,178,7,3,33,6
......
All you need to care about here is the County and VTD. The first data row has the county id 001 and VTD 01-001. Pretty straight forward, but be forewarned that just because the first n VTDs look very regular, it doesn't mean later ones are always regular. Make sure your VTDs all exactly match the VTDs in the demographic data file, including leading zeros and leading or trailing blanks. If you use MS Excel, it won't show leading zeros unless the column is formatted as text. Also, it may remove leading zeros. So, be sure to check using Notepad or another text editor before calling it done.
If you want to help, take these steps: