By Riding

Each CSV file contains one row for each riding. There is one file for each of the elections since 1867. Each CSV file contains the following columns.

  1. election_id: See above.
  2. prov_code: See above.
  3. ed_id: See above.
  4. ed_name: See above.
  5. more: See below.

The above are followed by a variable number of columns, one for each “mainstream” party in that particular election, which contains the votes cast for that party. A mainstream party is defined, somewhat arbitrarily, as a party who has won at least 5% of the vote in any election. Votes for parties that are not mainstream are collected in an additional column labelled “Other”.

For example, the CSV file for the 43rd (2019) election contains columns for each of “Bloc”, “Con”, “Grn”, “Lib”, “NDP”, and “Other”. Meanwhile, the file for the 1867 election contains columns for “AntiConfed”, “Con”, “Lib”, “Other”, and “PC”.

The names used as column headers is the party_short_name found in [party_summary.csv]().

The columns for each party are followed by three more headed “1st”, “2nd”, and “3rd”. The give the party short name of the party with the most votes, the second most votes, and the third most votes.