block by michalskop 9d2cb8950f551a33eea51d925f945dce

CZ: voters changes

Full Screen

Voters changes in Czech elections 2013 → 2017

Estimates of numbers of people changing parties between Czech elections 2013-2017 based on ecological inference model.

Individual parties:

Example (i: 1-8)

index.html?i=3

Overview

See overview chart

Analysis flow

  1. download data for 2017 (to /json): downloader.py
  2. extract data (list_2017.csv): scraper.py
  3. join 2013 and 2017, select random polling station only, to be able to run R calculation (data_filtered.csv and data_filtered_random.csv): join_data.py
  4. analysis - ecological inference (matn_filtered.csv, matp_filtered.csv): ei_psp.py calling ei.r
  5. manually recalculate numbers to real total matn_filtered_adjusted.csv
  6. manually reorder parties to have better matrix matn_filtered_adjusted_reordered.csv
  7. manually add labels/party names matn_chart.csv
  8. manually prepare lists of parties list_2013_filtered.csv and list_2017_filtered.csv
  9. overview chart: bubbles_psp.html
  10. calculate errors of model presnost.ods
  11. individual party charts (with ?i=1 parameter, i: 1-8) index.html and index_cs.html
  12. generate pictures (PNGs): generate.py

CC-BY Michal Škop

index.html

ano.svg

bubbles_psp.html

cssd.svg

d3.tips.js

downloader.py

ei.r

ei_psp.py

generate.py

index_cs.html

index_cs_print.html

join_data.py

list_2013_filtered.csv

list_2017_filtered.csv

matn_chart.csv

matn_filtered.csv

matn_filtered_adjusted.csv

matn_filtered_adjusted_reordered.csv

matp_filtered.csv

scraper.py