Open North

Français | English

We're a Canadian non-profit that builds online tools to make democracy better.

Get regular updates on our projects

Lessons from Represent: Postcode data quality

by

Open North's Represent web service allows Canadian citizens to enter a postal code to find their electoral districts and elected officials. This blog post will discuss some of the challenges in performing this (deceptively simple!) task.

As previously discussed, elections offices sometimes provide a file that assigns each postal code to one or more electoral districts. In those cases, it is straightforward to lookup a citizen's postal code in the file and find the correct electoral districts. In most cases, however, such a file is not available, and we must rely on postal code geography data directly.

Anatomy of a postal code

The first three characters of a postal code – like "H3B" in H3B 3H5 – identify the forward sortation area (FSA), which is a large region associated with a postal facility in which mail is sorted for delivery. Canada Post defines roughly 1,600 FSAs. Within an FSA, the last three characters of a postal code identify the local delivery unit (LDU), which in a big city may be a single building or a range of addresses, often associated with a postal carrier's route or a set of post office boxes. Canada Post defines roughly a million LDUs.

Finding electoral districts using FSAs

As of February, it is possible to produce a list of FSAs that are entirely within an electoral district using the free boundary files for federal electoral districts and forward sortation areas provided by Statistics Canada (StatCan). If an FSA (like H3B) is entirely within the boundary of an electoral district, then all its LDUs (like H3B 3H5) will be, too; we can therefore partially solve the challenge of determining electoral districts by postal code using only freely available data.

To improve the quality of our analysis, we compared StatCan's FSA boundaries to those in DMTI Spatial's commercial CanMap Postal Code Suite. Each data provider determines FSA boundaries differently: StatCan bases itself on postal codes reported by 2011 Census respondents for their place of residence; DMTI bases itself on postal codes tied to addresses in its CanMap Streetfiles data product. The different methodologies produce different FSA boundaries; the two differ especially in rural areas. As such, depending on which data provider you use, you get a different list of FSAs that are entirely within an electoral district.

DMTI's FSA boundaries also extended beyond Canada's major land mass and coastal islands into its coastal waters, wheareas neither of StatCan's boundary files did. Given that mail is not delivered to coastal waters, DMTI's FSA boundaries were clipped to stay within StatCan's federal electoral district boundaries; otherwise, FSA boundaries that bled into the water would not be counted as entirely within an electoral district. We also clip StatCan's FSA boundaries to ensure consistency across all boundary files.

Data provider FSAs FSAs entirely within a district
StatCan 1,621 401 (24.7%)
DMTI 1,640 420 (25.6%)

In other words, using only freely available data, and given a forward sortation area like H3B, you can accurately determine its federal electoral district 25% of the time. For the 75% of FSAs that overlap with two or more electoral districts (or cross provincial borders), it is necessary to use the more geographically precise (but not freely available) LDU to find the correct electoral district for a given postal code. These results highlight the need for open postal code data in Canada.

Download the list of FSAs entirely within an electoral district as CSV:

Finding electoral districts using FSA centroids

Instead of using full FSA boundaries, it's possible to instead use FSA centroids; an FSA's centroid is the latitude and longitude of its geometric center. However, it's impossible to tell, using only its centroid, whether an FSA is entirely within a single district or overlaps with two or more districts. Also, some FSAs are made up of two or more unconnected regions, in which case the centroid may be outside any of its component regions and inside another FSA. Centroids are therefore less reliable than boundaries for finding electoral districts.

Nonetheless, it is helpful to know how many FSA centroids are within their FSA boundary. We can calculate FSA centroids using the StatCan and DMTI FSA boundaries we already have. In addition, GeoNames provides a ZIP file of 1,621 FSA centroids.

Data provider Centroids within StatCan boundary Centroids within DMTI boundary
StatCan 1,527 (94.4%) 1,400 (85.4%)
DMTI 1,473 (89.8%) 1,583 (95.6%)
GeoNames 1,352 (83.4%) 1,405 (86.7%)

Unsurprisingly, StatCan and DMTI FSA centroids are, with 94% and 96% accuracy, within the FSA boundary from which they are derived; it isn't 100% because, as described above, an area's centroid can fall outside of its boundary. On the other hand, when comparing StatCan centroids to DMTI boundaries, StatCan centroids perform roughly as well as GeoNames centroids. DMTI centroids have the best performance overall, with 90% falling within the correct StatCan boundary.

In an upcoming post, we will use DMTI's LDU boundary file (quoted at $11,275) to evaluate the accuracy of both free and commercial datasets describing full postal code centroids, in order to recommend affordable datasets that strike a balance between accuracy and cost.

A big thank you to our volunteer Courtney Claessens for performing this analysis!

This Week in Open Government

by

  • This week, Christy Clark’s Liberals stunned many pundits by returning to office with a majority government in British Columbia’s provincial election. As we mentioned in a previous post, The Tyee used our Represent API to build a BC Election Map for voters. Post-election, the map now serves as a great resource to review polls and understand how the Liberals pulled out a win!

  • The Apps4Ottawa contest, organized by the City of Ottawa’s Open Data team, has entered its second phase - voting! Vote now on your favourite open data local app submissions before the winners are announced in June. We particularly like the submission, Ottawa City Councillors, which uses the Represent API.

  • We’re also getting very excited for the FCM Annual Conference and Trade Show in Vancouver! The conference, which runs May 31st to June 2nd, is the largest annual gathering of Canadian municipal leaders with an expected 2,000+ representatives in attendance. If you’re headed to the conference, be sure to find us at trade show booth 625 where we will be demonstrating Citizen Budget alongside our friends from Recollect.

  • Calling all opengov developers: Have you ever needed a more flexible Requestb.in? We recently released Rackbin - a small, simple, easy to install and customize postbin built on Rack. Enjoy!

This Week in Open Government

by

  • This week President Obama issued an executive order mandating open and machine-readable formats for all new and modernized government information systems. As the White House blog explains, new data must be served in CSV, XML, JSON or other machine-readable formats and via APIs when appropriate. This order, which will affect procurement of new government systems, is similar to systems put in place by David Cameron in the United Kingdom. The Guardian has compared the two initiatives noting that, unlike the UK, Obama’s efforts mark substantial legisilative change. For additional context, see the new White House Open Data Policy.

  • Our transportation director, Stéphane Guidoin, recently launched VeloPlan.net to help cyclists in Montreal get to their destination in the fastest, flatest or safest way possible. VeloPlan reuses Cibi.me by OpenPlans with route calculations provided by OpenTripPlanner. The open source code for VeloPlan is available on GitHub. VeloPlan works great on mobile browsers too for route calculations on the go!

  • Today, Open North participated in the last of five roundtable discussions about the Treasury Board’s Open Data Initiative. These discussions, moderated by Open North board member, David Eaves, aim to provide Minister Clement’s team with feedback to improve the federal government’s open data portal which is set to relaunch this spring. You can read more about our experience participating in the Toronto roundtable in our earlier post.

  • If you live in the Sud-Ouest borough of Montreal, there is one week left to add your input to next year’s budget through www.budgetsudouest.com. So far, over 200 residents of the borough have submitted their own balanced budgets to the borough using our Citizen Budget platform!

Thank you for supporting MyCityHall.ca and MaMairie.ca!

by

Wow! Thanks to your combined contributions and support, we raised over $4750 for free, open source, citizen engagement tools for Montreal and Toronto through Indiegogo. Although we did not reach our goal on Indiegogo, once we include the support from earlier contributions and our Google Montreal sponsorship, we have over $19,000 for the development of these reusable civic engagement tools. We have a busy summer ahead of us building MaMairie.ca and MyCityHall.ca, and we are excited to share our progress with you.

Through this campaign, we’ve gained the support of many influential political leaders and community groups. In addition to your contribution, we have the encouragement of the following leaders and groups:

Toronto: Councillor Shelley Carroll, Councillor Josh Colle, Councillor Mike Layton, Councillor Joe Mihevc, Councillor Adam Vaughan, Canadian Centre for Policy Alternatives CivicAction, MaRS Data Catalyst, Scarborough Action Network, Toronto Public Space Initiative

Montréal: Councillor Richard Bergeron, Councillor Laurent Blanchard, Councillor Benoît Dorais, Councillor Véronique Fournier, Councillor Marc-André Gadoury, Councillor Louise Harel, Councillor Elsie Lefebvre, Councillor Réal Ménard, Councillor Alex Norris, Councillor Marie Potvin, Councilor Monica Ricourt, Councillor Huguette Roy, Councillor Richard Ryan, L’ Institut du Nouveau Monde

Encouragement from these groups will be extremely helpful to ensure that citizens like you will actually receive responses from elected officials when these tools launch.

As you know, the starting place for the MaMairie.ca/MyCityHall.ca project is our collaboration with Participatory Politics (PPF) on OpenGovernment.org. This summer, PPF will deploy the next version of OpenGovernment.org to the local level in three American cities. Through this experience, we will learn valuable lessons that will help ensure the success Open North’s own open government tools in Montreal and Toronto. We will then turn our attention to deliverying MaMairie.ca before the Montreal municipal election in November, with MyCityHall.ca Toronto to follow.

We will continue to update you on our progress throughout the summer. Again, we want to thank you for your generous contributions to our work. With your help, we can open city hall’s processes, close the gap between representatives and citizens, and make democracy better!

This Week in Open Government

by

  • David Eaves (an Open North board member) revisited the Canada Post/Geocoder.ca case, which recently escalated, on his blog. In this post, David explores the financial challenges Canada Post’s policies put on the nonprofit sector, referring to the costs Open North would incur (up to $50,000) if we elected to use their data products for our Represent service. David concludes by noting, again, that we may be the only country with this kind of closed postal service!

  • Open North is pleased to join the jury panel of the 2013 Dazzling Notice Awards. The awards, which were founded last year by Dave Meslin, recognize achievement in government outreach. Last year’s winner, the Village of Pemberton, B.C, redesigned their public notice template making it easier to read and more appealing to citizens.

  • Our executive director, James McKinney, is the featured speaker at next weekend’s GO Open Data Conference in Waterloo, Ontario. The one-day conference aims to help build the Ontario open data community by connecting citizens, municipal staff, and developers.

  • Also, we’re thrilled to be joined this summer by Alexi Garrow, an undergraduate computer science student at McGill University. Alexi will be helping us as a junior web developer on our MaMairie.ca and MyCityHall.ca projects. We look forward to working with him!

This Week in Open Government

by

The Open North team, Louise Harel, Marc-André Gadoury and Alex Norris

  • We would like to extend a great big thank you to all of our friends and supporters who joined us on Wednesday night for our 5@7 in support of MaMairie.ca - we raised over $400 in one night! We were thrilled to be joined by Councillor Louise Harel, leader of Vision Montréal, Councillor Alex Norris, Councillor Marc-André Gadoury and Councillor Richard Ryan as well. We look forward to seeing everyone again when the platform launches later this year!

  • The Pew Research Centre’s Internet project released their report “Civic Engagement in the Digital Era” on Thursday. Stephen Clift, an Internet and democracy expert, calls the report a “must read” for the civic engagement sector and has already commented on figures from the report.

  • Eight additional countries announced their open government initiatives to the Open Government Partnership’s steering committee this week. Currently, 58 countries have joined the partnership, of which Open North is an official network supplier.

This Week in Open Government

by

  • The Treasury Board of Canada announced a new pilot project to increase the ease of submitting and paying for Access to Information and Privacy requests online. So far, the new portal only allows requests to be sent to Citizenship and Immigration, the Treasury Board and Shared Services Canada. More government institutions are expected to join after the one-year pilot is complete. Modernizing this process is very important for the growth of open government in Canada.

  • As we start to work with city leaders and community members on MyCityHall.ca and MaMairie.ca, we’re hearing a lot about the value of sharing information on lobbyists. To help understand what municipal lobbyist information can provide, the Sunlight Foundation created the Municipal Lobbyist Data Handbook to outline best practices for sharing this type of information.

  • James McKinney, our executive director, will represent Open North at Transparency Camp on May 4th and 5th in Washington, D.C. Details for the Sunlight-hosted “unconference” can be found at transparencycamp.org.

  • Also during the weekend of May 2nd, Ellie Marshall, our communications manager, will be speaking at the Participatory Budgeting Conference in Chicago about tech tools for online budgeting consultations.

This Week in Open Government

by

  • If you live in the Montreal area, join us on April 24th at Station-C for a 5@7 in support of our fundraising campaign for MaMairie.ca. Meet the Open North team and talk about strategies for encouraging open and transparent government in Montreal!

  • Halifax, Nova Scotia is the most recent large Canadian municipality to launch an open data portal; the City had announced its open data initiative in September. As a city spokersperson noted, access to this information could previously cost citizens between $500 and $2,000 plus $55 per hour for the municipality to prepare and distribute.

  • David Eaves, a member of our board, recently published an opinion piece in the Toronto Star that calls attention to the culture and leadership needed in Canada to foster open government. Eaves notes, “we could paradoxically find ourselves living in a world where technology makes it easier to share information ... while our government’s culture makes it harder to talk to the people who can give that information meaning and context.”

  • On that note, whether online or offline, it is important to know how to reach your MP and create meaningful dialogue with them. Samara’s blog this week compiled a list of 10 tips for engaging with MPs based on information from staffers themselves. They remind us that it’s best to reach out to your own MP, who you can find using our Represent service.

This Week in Open Government

by

  • On April 18th, our communications manager Ellie Marshall will be speaking on a panel at the AMO’s Urban Symposium on civic engagement. The other panelists include civic activist Dave Meslin and Peter MacLeod of MassLBP.

  • We’re happy to announce that we’ve teamed up with Councillor Shelley Carroll of Ward 33 – Don Valley East in the City of Toronto on a pilot participatory budgeting exercise for residents of that ward using Citizen Budget. Although this exercise is only an example of what participatory budgeting could do for the City of Toronto, and not binding or representative of actual figures, we’re thrilled to be working with Councillor Carroll to show Ward 33 residents how online consultation can enhance civic engagement.

  • Alex Howard posted a overview of several recent ideological debates in the open government movement. Is a government data portal enough? Should all documents from elected officials be subject to FOIA requests? The links in Howard’s article serve as a great resource for anyone interested in the different perspectives and approaches to open government.

  • On that note, William Wolfe-Wylie of Canada.com wrote about Ontario’s first open government failure: not disclosing the “Sunshine List” in a machine-readable format. William raises important points about how a government’s open data methodology can greatly impact the usability of its datasets.

This Week in Open Government

by

  • James McKinney, our executive director, will be speaking on the opening panel of Open Data Exchange 2013 at the Jeanne Sauvé House on April 6th. Throughout the day there will be panels in both French and English.

  • Joey Coleman, of Open Data Hamilton, published an overview of Hamilton’s open data policy process thus far. This interesting article is a great starting place for other Canadian cities who have yet to approach open data and want to understand the challenges of open government. Joey has also included some videos from his advocacy work, which illustrate how we as citizens can get involved with the open government movement!

  • The Knight Foundation announced the 40 semi-finalists of its Open Government News Challenge. Semifinalists now have a week to refine their proposals; winners will be announced in June.

  • There is only one week left to contribute to MyCityHall.ca in Toronto!. If you have not done so yet, please share the campaign with your networks using this link: http://igg.me/at/mycityhalltoronto/x/1859729.

Read the blog archive