Google Earth - results per poll by party color
This is a follow-up to the project discussed here.
I have now advanced my code (about 120 lines in Python) to generate the maps color-coded with the poll's winner in the 2008 federal general election. With an example such as the island of Montreal, it would probably be even more interesting to merge it with census data, for instance the % of francophones or % of people born outside of Canada. From one's informal appreciation of Montreal's linguistic diversity, one can definetely see where the Bloc votes mainly come from. As well, we can't really see polls voting massively for the Conservatives, besides a few in the West Island.
Like we say, the future is now, and it's way simpler than we think.
The KML file for each riding is at this point around 200-300Kb, which becomes almost nothing once compressed to KMZ (expect a 1/10 size reduction). This becomes a very "portable" product, as the KMLs could be pre-generated, editorialized and served to the general public without any need to "carry around" the back-end. A more custom version of the script (coloured by proportional votes per party, say) could even be used by political parties to plan the next campaign, which could happen in Fall 2009.
Next steps: 1- transparency that will give an idea of how deep the margin of victory is in each riding and 2- clickable info windows. When I'll finish these, I'll have re-built my 2008 app from scratch, albeit with a much cleaner infrastructure (now with Python + libkml and PostgreSQL/Postgis, instead of a bunch of PHP scripts and non-spatial MySQL), which should allow me to speed up development time by a lot for customizations, etc.
For client-side performance issues, we can eventually use a combination of MapServer and TileCache, and then serve the data from a platform like Google Maps or any other competing one.
Leave a comment