Skip to content

mggg/ballot-clustering

Repository files navigation

# Ballot Clustering Project Code

This repo contains code related to clustering/optimization methods to "learn" blocs and slates from ranked election data.  It contains the following files.

Tutorial.ipynb: start here to learn the toolkit.
Clustering_Functions.py: all of the functions used to cluster and study elections.
create_results_dataframe.py: Runs several clustering methods on 1070 Scottish elections and records the results in the dataframe results.pkl
results.pkl: created by create_results_dataframe.py
Analyze_results_dataframe.ipbn: Generates tables and plots to help understand the results.
best_k.ipynb: studies the best choice of k for k-means clustering of the 1070 Scottish elections.
MDS_plots.ipynb: generates ballot-, candidate-, and party-MDS plots.
scot-elex: folder containing the 1070 Scottish elections
tables: folder containing the tables generated by the above notebooks.
plots: folder containing the plots generated by the above notebooks.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published