Daves Redistricting 2.0 Help

Thank you for filling out the survey. 200 of you responded!

A Typical Scenario

  • Select a state; the app downloads district shapes and data from the server, which may take a few minutes.
  • Using the slider control for #CDs, select the number of congressional districts (CDs) you want; the left panel will be populated with a row for each CD.
  • Check the Use New Pop Est check box to use new population estimates; once you select this you can't uncheck it without re-selecting the state and reloading from the server.
  • Optionally, use an Auto Assign CDs strategy to automatically assign districts.
  • Pan and Zoom to where you want to work.
  • Select a CD using the radial buttons on the left panel.
  • Double-click the left mouse button anywhere on the map and sweep across the map to color districts (assigning them to the selected CD).
  • Double-click again to stop coloring.
  • Hover over the map to show demographic data for individual voting districts.
  • Use the check boxes in the Show section to hide or show county, city or old CD boundaries and labels, or new CD labels. All labels can be moved and resized.
  • Use the Old/New CD check box to show the old and new CD boundaries for the selected CD only.
  • Use the File menu and click Save As to save your work.
  • When you are close to assigning all districts to some CD, use the Next Unassigned button to find districts not assigned to any district. You can also use Find CD Parts to locate districts you may have inadvertently left isolated.
  • Use the Area Views section to create views of zoomed in areas; areas views are recorded with the current Show choices at the time they are created. Each area view can be written as a JPEG, but the Bing map background cannot be included.

How It Works

The application is a Silverlight 4.0 control running in an ASP page in your browser. When you select a state, the app calls a web service that downloads all of the data you need for that state. Once the app has obtained the data, it never goes back to the server. Also, the app will cache the data on your machine so that you'll get going faster the next time you work on the state. The data includes:

  • Block group or voting district polygons and data
  • County and city polygons and data
  • Polygons for old (current) CDs
  • Population data for block groups or voting districts (from 2000 census)
  • New population estimates (currently from 2008)
  • Partisan data (only for a few states)

All of the data, except partisan data and custom shapes/data available for a few states, comes from the U.S. Census Bureau.

Note: A block group is a census designation that is a group of up to 4 census blocks. A census block is the smallest area used by the census bureau. Blocks and block groups do not exactly correspond to voting districts or precincts. A voting district is a designation determined by each state. All but a few states have given voting district information to the Census Bureau and the Bureau has computed statistics for those areas. In my application, some states now use voting districts; others still use block groups; and for some I provide both. The size of voting districts appear to vary considerably between states. For some states (e.g. Maryland) I find it harder to get the CDs to have nearly equivalent population, because the voting districts are so populous. For others, they appear very close in size to block groups. For conciseness, in this Help file I will use district to mean block group or voting district.

Note: The polygons and data for states are large and therefore will take time to download. For you techies, to get the polygons, I started with ShapeFiles (.SHP) from the Census Bureau's website. They can be pretty large, so I created my own custom file format (.DSH) that is about 1/4 the size.

Using the Map

The map shapes are layered on top of a Bing™ map. You pan and zoom just like any map, using the pan and zoom controls or holding the left mouse button on the map and dragging. You can also switch between the road map, aerial map and a blank map.

Sample View

Left Control Panel

The left side of the application view has a control panel.

Coloring On/Off and Zoom Level

The Zoom Level indicator tells you what zoom level you are currently at.

In Version 2.0.4 there are two ways to color. You can switch between them with a check box on the File Menu.

Old Way

A green box that indicates whether coloring is on or off. Coloring On means that as you sweep the mouse across the map (whether or not you hold the mouse button down), the districts will be assigned to the current CD (and thus given that CD's color). You turn coloring on or off by double-clicking anywhere on the map.


New Way

The green box is a button labeled "Color Districts." Click the button or double-click on the map to turn coloring on. When coloring is on, the button is labeled "Done Coloring." Hold the mouse button down and sweep the mouse across the map to color districts.

You can also hold down the Ctrl key and the mouse button and move the mouse (called Ctrl-Drag) to draw a box on the map.

When you release the mouse button all the districts in the box will be colored. Click "Done Coloring" or double-click the map to turn coloring off.

Number of CDs

The number of CDs is controlled by the #CDs slider. You can slide the control or use the control's arrows to change the number of CDs you want for your state. Beware: When you change the number of CDs, any districts you have already assigned are cleared. You can create up to 500 "CDs", which allows the application to be used to create legislative districts, too (although there is no provision for loading the old LD polygons).

Color Opacity and Change Colors

The Color Opacity slider allows you to change the opaqueness of the voting districts and old CD shapes. The Change Colors button brings up a panel of colors, allowing you to select any of the colors for any of your CDs.

 Simply click on a color and the selected CD changes to that color. Click Done Colors when you're done. Any changes you make will be retained during your current session. You save the current color scheme with the Save to Your Default Colors button; this will keep your color scheme for all future sessions. Reset to Your Default Colors resets all colors to the colors you loaded with the session or the colors you saved with Save to Your Default Colors during the session. Reset to Original Colors resets to the built in color scheme.

CD Panel

The rest of the controls on the left panel are related to CD information. At the top is text showing the state's total population and a Renumber button, which is discussed in detail below.

The remainder of the left panel is a number of rows with information about each CD. Each row contains the following:

  1. The number of the CD. The label Un represents all of the unassigned districts.
  2. A radio button, embedded in the CD's color, which is used to select the CD you want to work on.
  3. The total population of all the districts you have put into the CD.
  4. The deviation of the CD's population from the average for the state. Your goal is to get this deviation as close to zero as possible for all CDs.

When you select a CD, the Info Bar above the map shows the CD's population demographics, both number of persons and percentage, and partisan data if available.

The Renumber button allows you to renumber your CDs. This is particularly useful after you have used a strategy to automatically assign districts to CDs, since those strategies may have no idea which geographic areas currently have which numbers. Once you click the button, boxes appear on each CD row. Simply fill in the new numbers you want. Leave blank those you don't want to change. Click Done Renumber when you are done. The app checks to make sure you don't use duplicate numbers. During renumbering, all other controls are disabled. Note: the colors are still fixed to the numbers.


Top Control Panel

The top of the application has controls for opening and saving files, selecting a state, showing various shapes and labels, creating area views and more.

File Menu

The File Menu allows you to save and reload your work across sessions.

  • Save As gives you a typical Save dialog. There is no Save to the current file, due to a limitation in Silverlight.
  • Close closes any loaded file and clears out the current state.
  • Open gives you a typical Open dialog where you can choose a .DRF file.

Saved Files

New in Daves Redistricting 2.0, you can save your work anywhere you want. The Save As dialog allow you to navigate to any file folder and save your .DRF file. (The app now uses .DRF instead of .DRF.XML, even though the format is still XML.) The .DRF stands for "Daves Redistricting File" and is simple XML to save your work. It does not contain any state information that is loaded from the server.

The app does cache shape and data files that are loaded from the server in Silverlight's obfuscated folders. Also, your old saved .DRF.XML files will still be in these obfuscated folders. Note: the new version of the app may use a different obfuscated folder to save the cached files than the old version used (which is where your old .DRF.XML files will be found).

On Windows, isolated storage is in hidden folders, so you need to tell Windows to "Show Hidden Folders" (from Folder Options) to see them.

  • On Windows XP files are saved in:
    C:\Documents and Settings\<username>\Local Settings\Application Data\Microsoft\Silverlight\is\<junkdir1>\<junkdir2>\1\s\<junkdir3>\f\DavesRedistrictingFiles\<state>
  • On Windows Vista files are saved in:
  • On Mac, as reported by a user, files are saved in
  • /Users/<username>/Library/Application Support/Silverlight/<junkdirs....>/DavesRedistrictingFiles/<state>

When you begin using the new app, a Silverlight dialog box will ask you to approve some 40 or 50 MB for isolated storage. The app asks for a bunch because the data files from the server can be large (they have polygons). By grabbing a bunch of space the application doesn't have to ask again for a while.


The Show section allows you to hide or show county, or old CD boundaries, county names, city and town names, new CD labels and the voting districts themselves. The Old/New CD check box shows the old and new CD boundaries for the selected CD only. Cur CD shows only the currently selected CD. Population by color views the entire state colored according to the percentage of 3 main demographic groups (Black, White and Hispanic); Partisan by color views the state according to partisan data, if available (2008 presidential election). The five check boxes on the right side of the Show section (with background color Bisque): Old CDs, Cur CD, Old/New CD, Population by color, Partisan by color, are mutually exclusive; checking one will uncheck the others.

All labels (county, old CD, new CD, city and town names) are movable, deletable and resizable. When you hover over a label the tool tip tells you how: drag to move, hold the left mouse button and hit delete to delete, and hold the left mouse button and hit 's' or 'l' to make smaller or larger. All labels except city and town names are scaled when zooming.

The Recalc New CD Labels button recalculates the position on the New CD labels. Any changes you have made in size are retained.

Area Views

In the Area Views section, the Create button creates a view of the current zoomed in area with the current Show choices. You can create up to 70 of these. The Goto Next button allows you to cycle through all area maps. The Goto StateView button goes to the original view of the entire state. The Delete button deletes the current area map.

The Save View JPG button saves the current view as a JPEG. The JPEG does not contain the Bing map in the background, because Bing does not allow its images to be saved.

An alternative to saving a view as a JPEG is to use Print Screen to capture the desired images and then use your favorite photo editor (even Paint) to trim and save into a JPEG or whatever.

Automatically Assigning Districts to CDs

The app has some built-in strategies for automatically assigning districts to CDs. The combo box labeled Auto Assign CDs allows you to choose a strategy. One strategy simply assigns them according to the old CDs.

Another built-in strategy is to split the map into successively smaller quadrants until small enough to begin a CD. Districts in the surrounding squares are then assigned to the CD. This strategy does not attempt to balance the population in the CDs are therefore is simply is a starting point.

New Population Estimates

The base data for the app is the 2000 census data. When you select the Use New Pop Est check box, the app uses newer population estimates. Currently these are 2008 estimates, broken down by county and by ethnicity, from the U.S. Census Bureau. CAUTION: The app distributes the population across all districts in each county commensurate to the population of the districts. Therefore splitting counties among CDs cannot be done precisely.

Find Next Unassigned

Sometimes you may think you've assigned every district to some CD, but the Unassigned population is still non-zero. That means some district is still unassigned. (Some can very small and easy to miss.) The Next Unassigned button cycles through all unassigned districts, panning and zooming to them, to help you find them.

Find CD Parts

Sometimes you may inadvertently leave a small district isolated from the rest of the CD. The Find CD Parts button, finds separate parts of the current CD, so you can make sure to clean them up. It uses the bounding box (rectangle that contains a polygon) to determine if a CD has multiple parts, so it is not guaranteed to find isolated parts of a CD, especially in cases where the CDs are intertwined.

Other Controls

The Bump Quota button allows you to increase the Silverlight quota for cached data files. You can also right-click anywhere on the app to get a Silverlight menu, where you can manage these. Help takes you to this page. How To shows the quick "How To" screen that appeared when you launched the app for the first time. About tells you about the app.

Partisan Data

Partisan data, specifically 2008 presidential data, is now supported by the application. See the LaunchApp page for a list of which states are currently supported.


The voting districts shapes and population data come from the 2000 census. Many states changed their voting districts between 2000 and 2008, so the 2008 presidential data does not match completely. For Maryland, for example, over 200 new voting districts were created during that time, so only 1600 of 1800 match the 2000 districts. The application lets you know when this happens and then simply ignores the new districts. This could be improved if someone is able to merge the new districts data back into the old districts.

All states that the Census Bureau provides voting district shapes for, except New York, now support voting districts in the application.

Help Get More Partisan Data

Find out more about partisan data and how you can help get more into the application here.

Changes and Fixed Bugs

  • Version 2.0.1 improves the speed of working with the map. Now all the districts are always shown and the speed to pan and zoom is reasonable.
  • Version 2.0.2 adds the Change Colors feature and fixes Auto Assign CDs by Quads, which was broken in 2.0.1.
  • Version 2.0.3 adds a caution about the lack of precision in using new population estimates.
  • Version 2.0.4 adds a New Way to color districts. The Old Way is still the default. I'm looking for your feedback via a survey on this and other features.
  • Version 2.0.5 makes New Way to color districts the default and enables block group level new population estimates, which are much more accurate than county level estimates.
    • WA has block group level new population estimates.
    • All New England states now support block groups, which are much more detailed than voting districts for these states.
    • There was a bug loading 1.0 special test data DRF.XML into 2.0. This is now fixed (but for TX you are asked if file is special test data).
  • Known issue: sometimes when you are showing Old CDs and you zoom to level 13 or above, one of the Old CD shapes gets overlaid where it shouldn't. Sometimes panning will make it go away. I believe it's a bug with the Bing Map control. (See MapPolyline Rendering Problem.)
  • Known issue: loading a saved .DRF for a large state (e.g. California) can be slow, because updating the tool tips for all of the voting districts is slow. I expect to fix this in the near future.
  • Known Issue: Dragging a box to color districts does not work on the Mac, because the Ctrl key is mapped to "Right Mouse Button." I should be able to enable this feature with a different key. Stay Tuned. (1/17/2011)
  • Please report bugs and make comments or requests to redistricting@gardow.com


Except where noted, the design and implementation of this application was created solely by me.

All of the shapes and data are from the U.S. Census Bureau, except for the partisan data, which was put together by a few other individuals, and the custom "special" shapes and data, which was done by "jeffmd."

The Save View JPG feature uses FluxCore (Copyright 2008-2009 Occipital Open Source) to convert bitmaps to JPEG.

A few features, including assigning districts according to Old CDs, use the Point in Polygon algorithm by Bob Stein.

Thanks. Happy Redistricting!   -- Dave Bradlee