Canadian Federal Election Historical Results Tool

Last Update: October 20th, 2020.

 

1) Project Goal

 
  • Build a user-friendly, visually appealing, and informative dashboard which allows users to look up historical elections trends in their own ridings.

2) Data Source & Preparation

 

Data Preparation

  • I needed to join 5 geographic .shp (shape) files so that different electoral riding boundaries could be visualized on the map widget.

    • Used Python GeoPandas to analyze the data structure of each file and discovered discrepancies in the number of fields.

    • Identified most relevant fields, dropped others. 

    • Two files did not have province name listed, but did have province ID numbers. The names were added by joining those files with a unique list of province IDs and names from another file.

    • Performed ETL to align content and format of common fields in each file.

    • Appended all files together into a single table and exported as a shape file.

  • Imported final boundary file into Tableau for visualization, and performed data blending with the election results.

Data Sources