Skip to content

A cleaned, formatted dataset of Canadian federal elections from 2004 to 2015.

Notifications You must be signed in to change notification settings

ktrieu/electoral-codex

Repository files navigation

electoral-codex

A cleaned, formatted dataset of Canadian federal elections from 2004 to 2015.

Purpose

Elections Canada provides datasets for recent federal elections. However, the data is scattered across multiple .csv files and is hard to query and use. This project aims to collect that data into simple, easy-to-use SQLite databases for each year.

Each SQLite database contains three tables: ridings, candidates, and polling divisions. Further documentation of the database format is available in db_spec.txt.

Usage

Clone this repo and in the directory run:

python process.py

This will build seperate .db files for each election year.

Next Steps

Don't like staring at giant tables? A website to visualize this data is coming soon-ish. Need more data? I also plan to add other data points that may be important, like incumbency status, fundraising, and political experience.

About

A cleaned, formatted dataset of Canadian federal elections from 2004 to 2015.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages