Skip to content

Instantly share code, notes, and snippets.

afontenot / election_night_live_model.R
Created Oct 31, 2020 — forked from elliottmorris/election_night_live_model.R
A live election-night prediction model using The Economist's pre-election forecast
View election_night_live_model.R
#' Description
#' This file runs a live election-night forecast based on The Economist's pre-election forecasting model
#' available at
#' It is resampling model based on
#' This script does not input any real election results! You will have to enter your picks/constraints manually (scroll to the bottom of the script).
#' Licence
#' This software is published by *[The Economist](* under the [MIT licence]( The data generated by *The Economist* are available under the [Creative Commons Attribution 4.0 International License](
#' The licences include only the data and the software authored by *The Economist*, and do not cover any *Economist* content or third-party data or content made available using the software. More information about licensing, syndication and the copyright of *Economist* content can be fou
View github-redesign-fixes.user.css
/* ==UserStyle==
@name Github redesign fixes
@version 1.5.5
@description Fixes various issues with Github's redesign
@author afontenot/LunarTwilight
@preprocessor less
@var color background "Readme header background color" #f1f8ff
@var color border "Readme header border color" #e6e4e4
@var text padding "Amount of padding used on the header" 18vw
afontenot /
Created Mar 31, 2020
snippet reproducing a bug in shapely's polylabel function
import as ccrs
import as shpreader
import matplotlib.pyplot as plt
from shapely.ops import polylabel
states_shp = shpreader.natural_earth(