Daves Redistricting 2.1 – 2010 Data [Updated 2]

2010 data is here! Yesterday evening I uploaded Daves Redistricting 2.1. Here’s what is new:

2010 data is available for VA, MD and NJ. More states will be available in the next 2 days.

[Update: LA, MS and IN available]

[Bugs fixed in 2.1.1:

– old election data shows up

– 0% Obama districts corrected (to make them 0% McCain, too)

– unassigning districts now ok (lesson: don’t divide by zero!)]

Election data along with the 2010 data is available for VA and MD.

The UI is improved.

Z-Drag (like Ctrl-Drag) allows you to draw a box to color. Works on both Mac and Windows.

In other news, I will potentially be partnering with a non-profit and seeking contributions to support the Dave’s Redistricting project. I will let you know when I have more news on that.

More detail below.

1) The data: When you select a state you will be asked to select a data set from the choices available.

  — I’ve downloaded all the data for available states and the vote district (VTD) shapes from the Census site. I expect to have MS, LA, AR and IN late today. I’m currently using VTDs. I will evaluate using Block Groups in states where VTDs are too big.

  — 2010 data includes voting age population (18+) which is now shown with the overall population data.

2) Election data: a group of professors, led by Steve Ansolabehere of Harvard, is gathering election data for nearly all states. In general you will see the 2008 Pres numbers + an Average over some elections in the last decade. Important:

  — To aggregate the Average across VTDs, we use the voting age population for the VTDs.

  — To aggregate the 2008 Pres, we (temporarily) do the same. Steve is working to get VTD actual Pres vote counts in the data and I will use them when available.

3) The UI: Top Panel

  — you can minimize the top panel.

  — Tools and Area Views are collapsed by default. Tools includes less used stuff like Auto Color, Reposition CD Labels and more. Also, a check box to go back to the “Old” coloring method.

  — Help button takes you to a dialog where you can navigate to “How To” sections on common tasks. The link to the Help Page is on those dialogs.

4) The UI: Right Panel

  — The data for the current CD has been moved from the bar under the top panel to the right panel. This should give you much better readability, especially with more data.

  — You’ll notice also that VTD tool tips appear in the upper right of the map, also for better readability with more data. Note: I use the less desirable fixed-width font for performance reasons.

5) UI: Coloring:

  — “New” coloring (introduced 1 months ago) is on by default. “Old” is still available. See Tools.

  — Z-Drag, like Ctrl-Drag, drags out a box and colors the box. Ctrl-Drag was introduced 1 month ago, but does not work on the Mac. Z-Drag does the same thing and works on both Mac and Windows. [Hold down the Z key, hold down mouse button and move the mouse to draw a box. When you release, everything in the box is colored. On the Mac TrackPad, moving 3 fingers is the same as pushing the pad down while moving.

6) Show:

  — City/Town boundaries: These are a prominent magenta. They are meant to help you color in or out of the boundaries, rather than for pretty viewing.

  — Vote District lines: when you hide these the app zooms out and back in. I have found no other way to get them to go away. (I’ve tried a lot of other things.)

  — County lines are a little thicker.

7) Performance:

  — Bottom line: this takes a bunch of memory no matter what.

  — The DataGrid used to show CD data on the right panel is fairly expensive, which is why I didn’t use it for VTD tool tips.

  — Setting the tool tips has always been slow. When loading a saved DRF, I use to do them twice. That’s been fixed, but loading a large state is still slow. I intend in the future to push this to the background.

  — Silverlight 4 seems to have some memory leaks. There’s much discussion on their forums. My app may force you to upgrade to 4.0.6something, but not all is perfect.

  — Because of memory issues, I recommend refreshing your browser if you are switching a lot between states. I found that, using the 2010 data, if I did VA, then NJ, and both again, I would run out of memory. (Browser would should memory usage of 1.3GB.)

8) The Help pages are not updated yet. I’ll be working on that soon.

Thanks for your feedback. As always, let me know of bugs. Happy Redistricting!

69 thoughts on “Daves Redistricting 2.1 – 2010 Data [Updated 2]”

  1. Starting with andgarden’s comment here, where he mentions “There are some bugs though (i.e., you can’t shade the map by political data, and it seems like if you delete a whole district, its political percentages won’t show up if you redraw it).” I’ve experienced both of these issues. Reloading the map solves the second one.

    The only other bug report in that thread right now is M Riles saying “It seems a few precincts in Loudoun have no votes for Obama, which results in the App showing that McCain won the county.  Otherwise, everything seems great.” I didn’t look to confirm myself.

  2. some of the positives. App performance seemed faster to me last night when I tested out Virginia. The Bing map, in particular, seemed to be adjusting to pans and zooms more quickly. I really like the new thicker county lines. I also really appreciate having locality lines again. And the new ability to turn off all of the different sorts of lines is really nice from a posting-pictures-to-diaries perspective.

  3. I really appreciate a lot of this, it all looks great. I’ve been waiting for Virginia for so long. I would second the problem some others have mentioned where many precincts in Loudoun County (Virginia) show no votes for Obama so it appears that McCain won the county when in fact Obama won it.

  4. I actually see a map this time… but the data has been “loading” for Oregon for an hour and a half now, without progress.

    I’m almost certain it’s related to Moonlight (the open source implementation of Silverlight), and its interaction with Firefox on 64-bit systems, based on issues similar to what’s happening with Flash on Linux 64-bit browsers. (my laptop has 8GB of RAM, and less than 4 is currently in use, so that shouldn’t be an issue).

  5. You could almost use this to draw a real map in Virginia. Thanks Dave.

    I look forward to helping to sort out bugs. . .

  6. Dave, Forgive me if what API/Mapserver are you using on the back end? Also have you thought about doing big states like California & Texas as stand alone pages to help with memory issues?


  7. I updated my New Jersey diary with racial data. All of my districts’ populations are what I thought they would be, which is good news. My districts have more minorities than I thought. Without trying to create more than 2 minority-majority districts, I created 3, and almost a 4th.

  8.  Are you planning to let users be able to draw a whole county just by clicking on it instead of looking around it through all the precincts? Also, I have thought the Assign Old CDs is a bit slow.

    Overall though, I am really happy you got the census data and the partisan data! Thanks and keep up the good work!

  9. Thanks again for all the work you’ve put into this – I just have 2 comments:

    1) Aside from all the problems everyone else has encountered, I have been having issues with the statistics box being too small – I have to scroll over to see numbers, and when I go to scroll the box gets all jumpy and tries to resize but can’t. I’m using Firefox on a Macbook.

    2) You’ll have to make one last edit to MD’s data when possible. Right now, the state is retabulating the census data in order to split up the prisons and place the prisoners at their last known address, as per a new state law. Once they come out with the data, you’ll have to make that final adjustment, and then we’ll have the same data the state will use to redistrict.

  10. In both states, the total number of votes in 2008 when you view the data statewide is exactly double to what it should be.

    Additionally, after using the CTRL-Drag, the partisan data for the district used will switch to the negative millions. However, if I simply sweep to fill the districts, this does not happen. Has anyone noticed this?

  11. I guess this is a feature request, but I wonder if you might make it possible to toggle the shading so we can see the election averages on the map?

  12. I for one love your app and will try out the Virginia map once I have some free time.

    Question- is the partisan data available under App 1.0? I couldn’t find it. I don’t like to use the new version because of the panning and the auto-shading. Plus I’m a Republican and hate change.

  13. california with 2000 voting districts, then use new pop estimates, silverlight keeps crashing. i’m in firefox, and this has never happened before, but it has 4 times in a row now

  14. That was true for Maryland last night for a hour or two, but I fixed about 8:30pm PST. I’m showing it working this morning.

  15. Thanks for pointing out the Loudoun County problem. Looking at the data, I see 15 districts with non-zero population and 0% for Obama. I’ll check with Steve on that.

  16. I think the profs will have election data for almost all states. When they have it ready I will include it as soon as I can.

  17. I just tried on Win7 with Firefox, to make sure. It loads fine. Do other states work with Moonlight? I’m now using Silverlight 4, as I’m sure you know, but it may work with something matching 3. Good luck.

  18. I assumed that this was a limitation in Moonlight though, which I don’t believe implements all of the silverlight functionality.  While I would love it to work on Linux, simply because my Linux box has much more memory than my windows laptop, I wouldn’t make it a high priority, since working around Moonlight’s limitations is probably more trouble than it’s worth.

  19. Seems to get stuck at the same level, approx 10% of the length of the load bar.

    The only thing I use Windows for now is to do my taxes. If you know Linux users, you’ll realize that it’s the functional equivalent of a religious objection.

  20. Is another precinct with no votes for Obama and over 4k for McCain.  It seems like this might be a more widespread problem.  Thanks for all of your work!

  21. I’m checking with the prof on these and he’s looking into it. Since VA had an election in 2009, one might see “avg” data but not 2008 data. If this is the case, then I’ll correct the app to give 0 votes to both sides.

    The way the prof’s team has put together the data is to give the Avg Dem % over 2000-2009 (or whatever period; MD is different; and I’m trying to find out exactly what offices are in the avg) and the Dem % for Pres 2008. They have not (yet) provided the actuals for Pres 2008, so I’m using the voting age population (as explained in the diary). If I get get the actuals (even vote total for the precinct) then that solves the problem, because the total will be 0 for precincts new in 2009.

  22. The framework is Silverlight and there’s a Bing Map control that you can add to a Silverlight app.

    I’ll put some more thought into CA and TX. CA especially worries me. Thanks.

  23. As I described in a comment above, the data I have from the professors gives the Dem % (both an avg and for the Pres election). I use the voting age population (VAP) when aggregating precincts (grouping them into a CD and giving you the number for the CD). I’m trying to see if they can provide the actuals #votes for the Pres election, because that is precise. For the Avg, they don’t have actuals for every election in the avg. It seems there’s a debate going on as to what to use to aggregate the average. In any case, I’m using the VAP.

  24. I put in the Ctrl-Drag and Z-Drag, so you can cover a large rectangular area easily. I had hoped that that would meet the “color a county” need, although I know that most counties are not rectangles. There’s too much to do for me to get to that soon anyway. Ping me again in a month or so and let me know if you feel it’s really needed. Thanks.

  25. many virginia vote counts are off. i don’t think negative a million ppl voted for obama in the panhandle, although it could have happened.

    sometimes i just need to switch which district number i use and it works again, but it seems completely random.

    help me out?

  26. will clear out the bug. My experience so far (and I think I read andgarden concurring) is that it happens when you start on a district, unassign all of its precincts, and then try using it again.

  27. I’m working with the professor who is providing the data. The problem is the data currently only has the Democratic % in each precinct, not the votes. So I’m using the voting age population to show and aggregate. I’m adding a tooltip message to that effect. Also, I’m trying to get the vote counts for the Pres election. (For the average, there’s not a single vote count.)

    I should probably simply remove showing vote counts that are wrong, eh?

    The second thing is definitely a bug. Other comments ran into something similar that I’m looking into now.


  28. I have a few other bugs to fix today, but I will at least investigate on the Mac. What size Macbook do you have?

    And thanks for the tip on MD. I will pass to the profs to make sure they are aware as well.


  29. The other thing is, I noticed the Dem percentages are wrong in some areas based on what I’ve seen before. For some reason, Obama’s numbers are overstated nearly everywhere. Check the precinct in Baltimore County in northern Dundalk – it says Obama got 55.3% when I know it was something like 51-52% before (and this is even after I adjusted the data on my own to add in absentee votes).

    Also, there’s one precinct in Bowleys Quarters in SE Baltimore County that doesn’t show any votes for Obama. And there are a few in Northern PG that don’t show any population but have Obama numbers.

  30. I don’t have FF on my MacBook (also 13 inch). Safari seems to work fine. I can see that when I shortened up the Safari window the vertical scroll bar appears (with Maryland), but it seems I can shrink more and less fast and it responds reasonably. My code does respond to resize by resizing the map and left panel to match, so maybe FF is feeding a bunch of changes that are getting backed up. Not sure. I won’t really be able to look more today (and I’m away next week). Let me know if Safari is better. Thanks.

    Re: election data: it does look strange. I think aggregating using eligible voters skews it some, but 64% seems really high. (What were the MD numbers for Obama?) Anyway, we’ll work on that.

  31. I haven’t touched 1.0 in months. So it will have nothing new. Don’t know what you mean by auto-shading. You can select the Blank map in 2.0/2.1, so it looks like 1.0 color-wise. Have fun.

  32. I got an email this morning, before taking off on vacation. It seems that the web service stopped working. 1.0 was not working 2.0, 2.1 — nothing. They all use the same service (program on the server to serve up the data). Weirdest thing since I had not changed that for 4 or 5 days. So I re-copied the service file and it worked. I’m sure glad, since it was mysterious; I had never seen this before on this host.

  33. For VA, even though the new voting districts now show 0 votes for McCain and Obama when I mouse over them, they’re still lowering Pres. Obama’s average the in the right sidebar the same as they were before.

  34. As for Obama numbers, he got 61.9% in the state as a whole, although this would go down some if absentees are excluded.

    It looks to me like you assigned all third-party candidate votes to Obama for some reason, since the totals add to 100% for just Obama and McCain, and you don’t have a third party category. I think you might just have to put in all the actual numbers by hand instead of regressing.

  35. Yeah. The profs have only provided the 2-party Dem % for the Pres and the Avg. Not what I would choose. I’m waiting for them to get back on providing vote counts for the Pres election at least.


  36. The vote counts were not actual vote counts, but eligible voters. I’m still waiting for the data that will include actual counts (or turnout).

  37. I look forward to it.  

    By the way, I think you should win some sort of citizens in government award for this.

Comments are closed.