A small collection of scripts and visualization used in my Partisanship in Pizzaville blog post. Read more here: http://ryanjsloan.com/2017/partisanship-in-pizzaville/
Very simple python scripts that illustrate Principal Component Analysis on a matrix of legislators and votes. Requires pandas
and sklearn
.
Contains an interactive widget built with d3.js which allows you to manually update weights on votes and watch how the partisan scores change.