Browse

Quick Search

... by Riding
... by Candidate

Upcoming Nomination Meetings

|
Home: Blog--Guide to the Pundits' Guide
41st General Election Nominations Progress Chart

Nominations Progress - 41st General Election

Seats with First-Time Incumbents
 YTNTNUBCABSKMBONQCNBNSPENLTotPctWomPct
Seats1113628141410675101147308  
Lib11 157278844893619162%6232.5%
NDP 1 1576465616 211337%4035.4%
Grn1 116186127750263 19262%5729.7%
BQ        38    3812%923.7%
Cons  1302713117821543 19363%3819.7%
Ind     1       10%  
Oth    1  1     21%150.0%

BLOG -- Guide to the Pundits' Guide

Sunday, January 31, 2010

Riding Google Maps come to the Pundits' Guide

It's been awhile in the making, but I've finally been able to add Google Maps to the riding profile pages for each riding here at the Pundits' Guide. If you look at the tabstrip of menu options above the riding's electoral results, you'll notice that a 4th option has been added after "Riding Results", "Financial Metrics" and "Census Data", namely "Google Maps".

Selecting that menu item brings up a fully interactive Google Map of the riding, colour-coded to the party which last won that seat. The menu item is titled "Google MapS", because I expect (one day, hopefully soon) to be adding other maps to it, such as maps showing earlier elections and maps showing poll-by-poll results. That's where all the action will be, in other words.

I also think this map can be improved by adding neighbouring riding boundaries, etc., etc. If you have other ideas to improve it, or encounter any difficulties otherwise, please leave a comment below.

For the technical readers among you, the full URL to link to a riding profile page showing the map appends a "pane=3" parameter to the query string (financial metrics are pane=1, census data is pane=2). So, for example, here is the URL that brings up the map for New Brunswick Southwest:

http://www.punditsguide.ca/riding_e.php?riding=976&pane=3


As always, you can generate the correct URL for linking to by using the "Permalink" feature at the top right-hand corner of any database-generated (i.e., non-blogpost) page.

For the really technical readers among you, I'm using the Google Maps API v.2 and feeding it with a GGeoXml object which is populated by a PHP script that dynamically returns KML generated on the fly out of my database. Setting up this whole technical infrastructure is what's taken some time. The poll-by-poll version is still in the works.

Of course, this feature would not be possible without the commitment of the Geography Division at Elections Canada to make their data available publicly and for free, and I hope you'll join me in thanking them for that undertaking.

Anyway, this website has needed maps for a good long while, so I'm very happy everything could finally get pulled together. Stay tuned for more developments ... and if you really want to see more of them, you can always invite my beau golfing for another week or so down south ... I'll miss him terribly, of course, but will just get a whole lot more done that way. Welcome home, dear!

Labels: ,