Craig A. Sloss

Blog

Picture of a notebook

Election Dashboard Now Available

2016-07-20

I've recently added a new section to the website, called the Election Dashboard. This page allows you to produce a variety of summary reports based on data from the 2011 Canadian Federal Election. This is a preliminary version that has only basic functionality; over time, I'm planning on adding more features to the dashboard, joining additional data sources, and expanding to the 2015 election.

How to use the dashboard

To use the dashboard, you select the metric you want to calculate, and two dimensions that will be used to group the data prior to calculation of the metric. The primary dimension will form the rows of the report, and the secondary dimension will provide the columns. Dimensions available include:

The two metrics available are the total number of votes cast, and the conversion ratio, which is defined as the total number of votes cast divided by the number of voters who were eligible to vote for that candidate.

Summarization of Conversion Ratio Calculations

Because the metrics are being calculated on data that is grouped according to the dimensions, it is important to clarify how the conversion ratio is calculated. Both the number of votes cast and the number of eligible voters are totalled before the ratio is calculated. For some dimensions, voters may be counted multiple times if their vote is courted by multiple political parties within in the grouping. A typical example of this would be when the "Elected Candidate" dimension is used: in the "N" column, because there are many non-elected candidates in each riding, this is a grouping in which multiple candidates are vying for each elector's vote. The "Y" grouping does not present this problem, since there is a unique winning candidate in each riding. In general, the conversion ratio should be interpreted as the weighted average conversion ratio of all candidates in the grouping defined by the dimensions. The main advantage of this approach to calculating conversion ratio is that it allows for fair conversion ratio comparisons between political parties based on the number of ridings they actually contested; this is a particularly relevant consideration for parties such as the Bloc Québécois which only runs candidates in Quebec.

Data Sources, Processing, and Reconciliation

Election results were obtained from the Elections Canada Website; "Format 2" as described on this site was used. Data was processed using R. Filters and transformations applied include:

Following data processing, top-level reconciliation was performed to validate that the total number of votes cast (14,723,980), the total number of eligible voters (24,257,592), and number of electoral districts (308) match the values reported by Elections Canada. More granular reconcilitaion (e.g. at the party and province level) can be performed using the dashboard itself, and match the results provided in "Table 8" of the Elections Canada report on the 2011 election.

Keywords: Website news, Election Dashboard

Link to this post

Navigation

Mastodon