Code and resources for the PyData 2018 Politics Hackathon.
SixFifty is a team of data scientists, engineers and political experts, dedicated to bringing a rigorous, data-oriented, and impartial view to the UK politics. The following article provides a good introduction to the political/election data ecosystem and some of the challenges in building predictive models for political events: Building SixFifty's Election Tracker.
The following datasets have been pre-processed and uploaded to S3. If you would like to understand how this data have been sourced and processed, please see the SixFifty Pipeline repo. We aim to provide our processed datasets in both CSV and Feather formats.
Dataset | Description | Date | Source | Licence | Download URL | Repo Path |
---|---|---|---|---|---|---|
ge_2010_results |
UK Parliament 2010 General Election results | 6th May 2010 | Electoral Commission (raw) | Open Government Licence v2.0 | CSV, Feather | data/general_election/electoral_commission/results/ |
ge_2015_results |
UK Parliament 2015 General Election results | 7th May 2015 | Electoral Commission (raw) | Open Government Licence v2.0 | CSV, Feather | data/general_election/electoral_commission/results/ |
model_2015 |
Clean version of 2015 GE data along with counties and EU Referendum results at a regional level | - | SixFifty Pipeline | Open Government Licence v2.0 | CSV, Feather | data/model/model_2015.csv |
EU-referendum-result-data.csv |
EU Referendum results | 23rd June 2016 | Electoral Commission (raw) | Open Government Licence v2.0 | CSV | data/eu_referendum/electoral_commission/results/ |
A manually curated set of poll results can be downloaded in a variety of formats. See data/polls/ for more information including a data dictionary.
- Check you're running Python 3.
- Ensure you have the Python requirements with
pip install -r requirements.txt
- Then cd into the repo root (where this README is located) and run the following to download, populate this repo with data and auto-clean it ready for modelling:
python data/retrieve_data.py
Please see these instructions on installing Anaconda + dependencies + configuring S3 tokens.
Name | Description | Attribution Statement |
---|---|---|
Open Parliament Licence | Free to copy, publish, distribute, transmit, adapt and exploit commercially or non-commercially. See URL for full details. | Contains Parliamentary information licensed under the Open Parliament Licence v3.0. |
Open Government Licence | Free to copy, publish, distribute, transmit, adapt and exploit commercially and non-commercially. See URL for full details. | Contains public sector information licensed under the Open Government Licence v2.0. |