GitXplorerGitXplorer
m

election-galton-board

public
27 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
334f611d4b88cc8a92e5bbc52fd059a721aa8742

switch to mad for matching econ dist sd

mmjskay committed 4 years ago
Unverified
5fba47eb5f731c7a90c6ca580820baebabed777b

add side-by-side gif

mmjskay committed 4 years ago
Unverified
83f8dfa6fa3371d598fc4d8b6f9424f0c2a55bf8

plinko::n_frames() -> n_frame()

mmjskay committed 4 years ago
Unverified
630dd51aff051882046e26243b47cea816a9079f

schedule updates

mmjskay committed 4 years ago
Unverified
705d3d55dd338ce07a255d46b80057b2394cfbca

cant use bash redirects on windows

mmjskay committed 4 years ago
Unverified
26ae06a939ba5f5aba1f65698858f7b93e4d5574

do not convert warnings to errors in remotes

mmjskay committed 4 years ago

README

The README file for this repository.

Presidential Plinko / Election Galton Boards

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.