Scrapers

Scrapers for various election polls.

scrape_wahlrecht() scrape_by() scrape_rp() scrape_ltw()

Scrape surveys for German general election

scrape_austria()

Import Austrian survey results

Workflow

Get data, perform simulation, redistribute seats, calculate probabilities.

get_surveys() get_surveys_by() get_surveys_rp() get_surveys_nds() get_surveys_saxony() get_surveys_brb() get_surveys_thuringen() get_latest()

Scrape surveys from all pollsters

pool_surveys()

Obtain pooled survey during specified period

draw_from_posterior()

Draw random numbers from posterior distribution

redistribute()

Calculate percentage of votes/seats after excluding parties with votes < hurdle

have_majority()

Do coalitions have a majority

get_seats()

Calculate seat distribution from draws from posterior

get_probabilities()

Wrapper for calculation of coalition probabilities from survey

Seat distribution

Methods used to distribute seats across parties based on voting percentages.

dHondt()

Seat Distribution by D'Hondt

sls()

Seat Distribution by Sainte-Lague/Schepers

hare_niemeyer()

Seat Distribution by Hare/Niemeyer