Playing around with Ontario electoral geography

Election illustrationI recently had a conversation with a friend who is volunteering for the leadership campaign of a candidate for the Ontario Legislative Assembly. While Elections Ontario (EO) supplies detailed information and a reasonable candidate support package to actual candidates, the information available to those participating in party leadership races is more limited. In addition, the IT skill levels of volunteers aren’t necessarily terribly highly developed, so it’s easy to feel overwhelmed by the magnitude of the task at hand – and the limited information to work with.

In particular, my friend – who is doing this in the Bruce-Grey-Owen South electoral district (ED) – was struggling with determining the precise boundaries of her ED. Knowing these would allow her to target her campaign efforts to potential electors that are actually part of the district. Since Bruce-Grey-Owen Sound is mostly rural, and rural mapping is notoriously problematic in Ontario, figuring out which side of an ED boundary a rural road or dwelling is on isn’t always easy (although it is, typically, quite precisely determined by Elections Ontario).

Elections Ontario is quite reasonable about making its data publicly available. While they’re certainly no poster children for open source government data, the materials available on their website can provide a sufficient amount of detail, provided one can figure out how to put the pieces together. In addition, I imagine the materials could be used to create mashups that would be of further public use, for example using Google Maps.

To start with, EO offers a “wall map” in PDF format for each electoral district in Ontario. While Acrobat Reader allows you to zoom in to a more or less sufficient extent, the challenge – especially in rural areas – is that the resolution of the underlying geographic information in these maps is so limited that even the wall map doesn’t really help. This is particularly the case for small towns that are on the border between EDs. The wall map doesn’t provide enough resolution in its underlying geographic detail to ‘eyeball’ whether addresses in small border towns are inside or outside the ED.

To solve the riddle, you need to download the actual ESRI geography shapefile, which EO kindly makes available for free. Here are the detailed instructions for putting it all together (instructions for Windows; Mac OS X version of the viewer app available here):

  1. Go to http://www.esri.com/products/index.html#desktop_gis_panel and download the  “ArcGIS Explorer” application. It’s in the “Free Viewers” column on the right.
  2. Once it’s downloaded, install it on your computer. Hopefully, no snags. The application is similar to Google Earth.
  3. Now, go to http://www.elections.on.ca/en-CA/Tools/ElectoralDistricts/Shapefile.htm and click on “Download the 107 ED Shapefile.”
  4. On the next screen, click on “I agree.” (It’s just legalese – the file is free but the license terms are unreasonably restrictive: “You may not use any part of the data products to develop or derive any other data product for distribution or commercial sale, without a license to do so.”)
  5. The drawing comes as a ZIP file called “EOShapefile.zip”. Inside the ZIP file, there are two more ZIP files. You want to open up the one called “EO_107_Electoral_Districts.zip.” Take the files inside this second ZIP file and copy them into a folder somewhere – maybe on your desktop.
  6. Now, fire up “ArcGIS Explorer” (the program you installed earlier). There should be an icon on your desktop.
  7. Once it’s fired up, click on the “Basemap” button in the toolbar at the top and – once the drop down menu appears – select “Bing Maps Road.” This shows a street level map instead of the topographical map (makes it a bit easier to see what’s what).
  8. Now, let’s load up Elections Ontario’s shapefile containing electoral districts. In the toolbar, click on “Add Content,” and then “Shapefiles…”
  9. Navigate to the folder where you stored the files from EO, and select “EO_107ED.shp.” This will load the electoral districts on top of your street map. On the left hand side, under “Contents,” you can turn the shapefile overlay on and off.
  10. Now, let’s zoom in. The zoom is on the bottom left of the map: if you hover over it with your mouse, a plus (+) and minus (-) become visible. (For panning left, right, up and down, just click and drag the mouse.)
  11. If you’d like a different colour for the overlay (the default green is a little… much), you can right-click on where it says “eo_107ed” on the left hand side, under “Contents.” The right-click menu shows a “Symbol” sub menu. From here, you can re-colour the map overlay. I myself am partial to the “Outline Fill” options towards the bottom, since they just show a nice coloured border.

Since we now have ‘fully interactive’ geography at our fingertips, it becomes easy to see what’s what. For example, we can zoom in on Elmwood, Ontario, where the electoral district boundary runs straight through the middle of town, along Main St.:

Elmwood Ontario

And we can see that electors on John St. are in our ED while electors living on David St. aren’t.

I think the potential of these electoral data products is tremendous and am hoping that Elections Ontario might consider changing its restrictive license terms to allow users to create mashups and other derivative data products from the electoral geography. In addition, it would be fantastic to be able to access – freely, under a kind of open government data initiative – additional data sets that are related to the maps, for example, the number of electors in each polling district, etc. (the polling district geography is in the same ZIP file from EO, referenced above).

Full disclosure: I once worked, for the better part of a year, on a large-scale IT project at Elections Ontario on behalf of my employer. While I didn’t specifically work with electoral geography or elector data myself, my familiarity with some of the business concepts and available artifacts helped me understand and solve my friend’s problem.

,

No comments yet.

Leave a Reply