Monday, November 9, 2009

Mapping the City Council Returns

Posted by Nathaniel Hoffman on Mon, Nov 9, 2009 at 11:55 PM


View Larger Map

The map above represents the precinct level returns [.pdf] for the recent Boise City Council, Seat 4 race between TJ Thomson and David Litster. Litster won the precincts in orange and Thomson won the green. If you click anywhere on the map, a box will pop up with the vote count for that precinct, including absentee votes.

Here's how we made the map. I think it's kind of a hack, so if anyone has a better system, please let me know. But we're using all open source software, so don't try to sell us a million dollar solution.

First I got the GIS shapefiles from the city. I used OpenOffice Calc to add the vote data to the .dbf file. Then I loaded it into a GIS program. I've been playing with Qgis and also with udig, but I ended up using Qgis to make the map. There is something I'm missing with udig ...

I used Qgis to color code the precincts by winner, exported the new shapefile and then moved to a PC. I use a program called MapWindow and a plugin called Shape2Earth for this step. It took me many tries and a call to a friend to get the projection right—Boise kept showing up off the coast of Guinea in West Africa when I loaded it into Google Earth.

We're almost done here. Load the .kml file into Google Earth and then save it as a .kmz file, which is a compressed Google Earth map file, I guess. Then I uploaded the kmz to our server, went to Google Maps and pointed the map to my kmz file. It worked!

Now you can zoom in and out, find your house, pan around the city and click away to see what precinct you are in and how the two candidates fared among you neighbors.

I'll save the political stuff and the analysis for another post. But this is the process that I have been trying to nail down for a year now. If only some hack had put it down in ones and zeroes and saved me all this time.

Tags: , , ,

Comments (2) RSS

Showing 1-2 of 2

Add a comment

Generic user icon

Good work, What do you find is missing with uDig?

Posted by Ian on November 10, 2009 at 11:07 AM | Report this comment

I imagine some of the not-Open Source tools could do this sort of thing more directly, but in addition to the $ outlay, there's the investment in learning how to use them... you did just fine. And you get the benefit of learning about a lot of different tools along the way.

Nice work!

As someone who lives near "the border" on Cole Road (which is in fact part of the border between CD-01 and -02, coincidentally), I do note that the precincts aren't "winner take all," so the yellow of precinct 56 (105 to 101 for Litster) isn't the same as, say, 94 (283 to 180); it would be cool to see more than 2 levels.

Posted by tva on November 15, 2009 at 5:32 PM | Report this comment

Add a comment

© 2009 Boise Weekly