Mapping the results of the 2018 Ontario provincial election

Some of you may be up to more interesting things on the Victoria Day long weekend, but given that we’re into the most important period of a provincial election in Ontario at the moment – I thought I’d take some time and mash-up, clean-up, and mark-up data from Elections Ontario of the last provincial election to give us some important historical context for the vote coming up on June 2nd.

Jump in and explore the mapping tool I built.

The results of the 2018 Ontario provincial election

As with my previous mapping efforts, I’m sharing these as a non-partisan resource for all political volunteers who find a lot of use for political maps in campaign offices. If you appreciate that effort, write a nice tweet about the project, or better yet blog about it – if you still do that kind of thing.

The 2018 provincial election saw the end of the 19-year Ontario Liberal dynasty with the election of the newly-minted Progressive Conservative leader Doug Ford after the dramatic ouster of Patrick Brown from the job just months earlier. Ford won a majority government in 2018 and is now looking to increase his seat total in this year’s contest.

Patrick Brown’s former riding of Simcoe North was easily retained by the PCs in 2018

Ford struggled – as all government leaders did – with administration during the COVID-19 pandemic. We’ve just seen Alberta Premier Jason Kenney fall to populist discontent within his own party due to his own balancing of individual liberties versus public health during the crisis. Ford has faced similar criticism but looks to have wealthered the storm. Calling an election during a downtime in COVID cycles – and as Ontarians are off to the cottage – will likely see Ford return to the Premier’s Office when all of the votes are counted. We’re also expecting lower-than-usual voter turnout which usually favours incumbents.

Premier Doug Ford won the riding of Etobicoke North

As I’ve mentioned, the Ontario Liberals were wiped-out in 2018, being reduced to 7 seats. Putting the results on the map shows us their Toronto and Ottawa urban strongholds and where they may seek to increase their totals this year with their new leader Steven Del Duca.

The Liberal electoral map in Toronto looked quite different in 2018

Over on team-orange, this is NDP leader Andrea Horwath’s fourth election as head of her party. With falling Liberal fortunes in 2018, the Ontario NDP more than doubled their seats to 40. The riding distribution shows NDP strength in Toronto, Kingston, London, Niagara region, and Windsor.

The NDP won every poll in London–Fanshawe in 2018. Seeing the NDP win every poll in a riding is a rare sight.

Organized labour could also be a factor in redrawing the map. Labour Minister Monte McNaughton’s work in his portfolio has split up Progressives and the dreaded Working Families Coalition. Many of the founding members of the coalition – including the Ontario Pipe Trades Council, the International Brotherhood of Boilermakers, and the International Brotherhood of Electrical Workers – have endorsed the re-election of Progressive Conservatives and a refreshed mandate for Ford as Premier.

Monte McNaughton’s won the riding of Lambton—Kent—Middlesex. The NDP won one poll on the western edge of the riding

By most accounts, Green Party leader Mike Schreiner impressed the province during the Ontario Leaders debate. His opposition to highway 413 and greenbelt issues may translate into additional seats for the Greens. With a split on the left between Liberal and NDP support, we could see Ontario progressives rally with strong green representation in some ridings. However, it’s more likely that this will clear the way for additional Progressive Conservative gains.

Green Party leader Mike Schreiner won Guelph in 2018. Here, his strength in the riding is mapped by poll from maximum (green) to minimum strength (red)
Schreiner won most of the polls

I’ve mapped out areas of strength in each riding for each candidate that ran in 2018. Whether your party was successful or not in your local riding, you can see where it’s strength is growing or declining and these maps can help you focus on neighbourhoods where you can get out the vote. Whether you’re actively campaigning or not, you can also use these maps to see the distribution of party strength geographically within a riding using these strength/weakness settings for the poll-by-poll maps. How did your neighbours vote? Find out!

The NDP carried the riding of Hamilton West—Ancaster—Dundas in 2018. You can see their urban vs rural strength mapped here.

There’s a search bar at the top of the app as well so you can easily zoom around the province if you know the riding you want to look at but can’t exactly remember its geospatial position. Future updates will include a method to jump around to neighbouring ridings and to look at the results of previous Ontario elections in context. I’ve already added these features to my federal maps, so do check those out as well if you believe that the 2021 federal election provides some helpful context for this current provicial election.

The many minds of Kingston and the Islands. CFB Kingston is to the east, Queen’s University and the Prisons are to the West and the Liberal cottages are on the nicer part of Wolfe Island

Hopefully you find this to be a useful resource if you’re colouring in maps in a campaign office, or if you just can’t get enough of Canadian politics. If you are neither, I hope you’ll still find the visualization of Ontario electoral politics to give you some bearings on the priorities of your community.

So give the map database a try and geolocate your vote!

Conservative Party leadership map

I heard that you might be interested in a map of the last Conservative Party leadership race.

Erin O’Toole resigned this week as leader of the Conservative Party of Canada after losing a caucus vote invoked under the Reform Act. Thirty-five members of the Conservative Parliamentary caucus signed a letter to remove O’Toole as leader, sparking a subsequent vote that O’Toole lost 73-45.

Followers of the blog will remember that I launched a project during the 2021 Canadian federal election that mapped out seven previous federal elections riding-by-riding and poll-by-poll.

Now that a leadership race for the Conservative Party of Canada is about to get underway, I thought it would be a good time to review the results of the 2020 Conservative Party leadership race and map them by riding and throughout each round of voting.

National map showing the results of the 2020 Conservative Party of Canada leadership race
The Conservative Party Leadership map (2020)

Erin O’Toole’s faced three competitors in that leadership race, Peter MacKay, Leslyn Lewis, and Derek Sloan.

Derek Sloan was removed from caucus and was barred from running as a Conservative in the election that would follow.

Leslyn Lewis and Peter MacKay may again be contenders in the upcoming leadership race. MacKay published an op-ed in the Toronto Sun outlining the need for unity in the party, while Leslyn Lewis is said to be considering a run.

From this map, we can see that Lewis was particulary popular in the Praisies and in northern British Columbia, while Peter MacKay racked up votes in Eastern Canada and parts of Quebec. Erin O’Toole, however, won the race by delivering a strong ground game in la belle province.

Map of Erin O'Toole's campaign strength in Quebec
Erin O’Toole’s campaign strength in Quebec

The relative strength of each candidate is graphed for each riding through each round of voting.

These maps should be useful to campaign managers to candidates in the upcoming race and should also be interesting to observers of partisan politics, no matter their party.

I’d like to map out previous leadership races for each political party. If you’re holding on to this data and would like to see it mapped out, please get in touch!

Political maps and data for Canadian electors!

Here’s something that should give every political nerd hours of material to pore over. The Stephen Taylor Data Project is releasing some political maps, graphs, and census data for your consumption during this latest Canadian general election.

This efforts is the culmination of months of spare-time effort to package historical election results in an easy-to-digest format for Canadians during this 44th general election. You can browse every general election from 2019 back through the year 2000 (7 elections) and look at historical trends on each, with every riding map broken down by polling division.

Canada’s 43rd Parliament as elected in the 2019 General Election

Furthermore, you can create maps of each riding based on the relative strength of the party in each poll of each riding

If you’ve ever wanted to understand Liberal voting patterns, appreciate Conservative strongholds on a granular level, be facinated by the NDP’s local strategy, or track the Green Party’s and Bloc’s ebbs and flows, now you can! We’ve even got Alliance and PC results from the days of yore to bookend a re-emerging trend of some vote-splitting on the right that began again in 2019.

The riding of Burnaby South by polling division, after the 2015 general election

In 2000, Joe Clark led the PC Party prior to their merger with the Alliance. This map shows where he was strong (green) and weak (red) in Calgary Centre.

I’ve also combined data from the last census – perfectly segmented by riding – to give insights on what motivates voters. For example, income and affordability are top-of-mind issues for a lot of Canadians during this election. This project helps you consider these factors in each riding and compare these trends both nationally and provincially.

The population distributions of Desnethé–Missinippi–Churchill River (left) and Nanaimo–Ladysmith (right)
The differences between rental vs ownership in the riding of Spadina–Fort York (left) versus the province of Ontario as a whole (right)

I’ve also put up historical polling data that you can browse and I have a visualization demonstrating the rise, fall, and sustained dominance of Canada’s various political parties, as elected by voters to Canada’s federal Parliament.

A streamgraph visualization of Canada’s history of elections.

You can take a snapshot of each map by clicking the camera icon 📷 at the top of each geographic visualization. The images I’ve shared in this post were created this way. Go ahead and take snapshots of your favourite ridings (and favourite elections!) and share these images on social media. If you’re writing for a news outlet and you find any of this useful, please link to this post and to the Stephen Taylor Data Project! If you’re an avid twitter user, please tweet about this project.

So, please take a look and I hope that you enjoy! This work is being made available to general public and to every partisan of every party. I believe very strongly in a more representative democracy and believe that when more data becomes available and accessible that describes the shape of the Canadian vote, the more responsive our candidates can be in meeting that representation.

The riding of Nanaimo–Ladysmith in British Columbia, 2015 results

The project was coded using ReactJS, using both NoSQL (MongoDB) and relational (MySQL) databases to serve data through a common GraphQL layer facilitated by Apollo client on a Node.js server. Four gigabytes of GeoJSON files were constructed locally using some more of that server-side javascript magic. Those files are served via AWS S3, and are visualized for the end-user using the Leaflet library. Infographics SVGs are assembled using D3JS.