This repository contains code to produce Election Galton Boards: Galton boards that roughly approximate the predictive distributions for the 2020 US President electoral college vote, according to different poll aggregators. You can see them in action at presidential-plinko.com.
The Galton boards are based on the models of 538 and the Economist, both of which are nice enough to open their data.
The Galton boards currently look like this:
To download the latest versions of the Economist's and 538's models and re-render everything, run build.R.
The code for determining the binomial approximations to each modeler's predictions and then building the Plinko boards is in binomial_approx_both.md (source Rmd). It uses my experimental plinko R package for constructing animated Plinko boards.
An older version of the code (pre-plinko) for building the Galton boards is in galton_board_quantile_ragg.Rmd.
The datasets are copyright their respective owners (see links above) and the rest of the code in this repo is licensed under the MIT license.