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.
scot-elex: folder containing the 1070 Scottish elections
clustering_results.pkl: a dataframe of results of running several clustering algorithms on all of the Scottish elections

Supplemental material: Folder containing several notebooks that generate images and data from the paper.
    analize dataframe.ipynb: imports clustering_results.pkl and creates some of the images in the paper.
    Mallows.ipynb: creates the images in the paper related to synthetic data from Mallows models. 
    MDS_plots: creates the ballot- candidate- and party-MDS plots in the paper.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •