|as of||April 2015|
A poll-by-poll, real-time mapping of Dogwood’s efforts to sign up pledges, designed to provide hyper-local targeting of boots-on-the-ground engagement effort, and instant gratification to volunteers.
Dogwood Initiative have an ambitious plan. They contend that if the Enbridge Northern Gateway pipeline is approved, they will force a public vote using British Columbia’s public referendum mechanism. Triggering a referendum has a high bar: collect signatures from 10% of the voters in every riding in the province, within 90 days.
Dogwood’s solution has been to make it a two stage process: collect pledges from 10% of BC’s voters gradually and in advance, and be ready to activate those pledges when and if the 90 day period comes.
That means not just signing up a lot of people in the urban core of big cities, but signing them up across the entire province. And that means a distributed team of empowered volunteers, who know where they need to go and are enthusiastic about making their goals. To that end, Geocology worked with Dogwood to craft a real-time interactive web map that would show how close they’ve come to their target number of pledges, in every riding and in every single poll in the province.
(The map is displayed embedded in various contexts.)
There were a lot of challenges to this project.
First there was some pretty epic data munging. Using PostGIS we matched up every postal code in BC to a riding and polling division. If that sounds simple, it’s not. Postal codes can be strange and irregular critters, and doing that matching reasonably reliably takes some GIS know-how and postal code experience. Luckily, we’ve got that.
Then we imported all of those electoral boundaries into CartoDB, an awesome online spatial data storage, manipulation, and visualization platform. That way we can offload the task of compositing the many megabytes of finnicky polling division boundaries and sign-up colour classes into pre-baked map tile images that browsers can easily load in.
Then we wrote some custom mapping code using the marvelous Leaflet web-mapping library. That let us build a highly interactive, highly customized interface for users to control precisely which view of the map they want to display, and roll their mouse over the boundaries to see the values of interest flash in a data box.
Finally, we used Salesforce’s moderately awesome REST API and some Python scripting to wire it together in real time. Every 5 minutes the data gets totted up in Salesforce and then copied into CartoDB.
Presto! And the results have been great. Volunteers have responded strongly to a highly visually artifact of their hard work, and a reminder of where there work can still pay off. “I’m going out there and turning that block purple!” is a thing I have enjoyed hearing.