ScrapersScrapers for various election polls. |
|
|---|---|
Scrape surveys for German general election |
|
Transform surveys in long format |
|
WorkflowGet data, perform simulation, redistribute seats, calculate probabilities. |
|
|
|
Scrape surveys from all pollsters |
Obtain pooled survey during specified period |
|
Draw random numbers from posterior distribution |
|
Calculate percentage of votes/seats after excluding parties with |
|
Do coalitions have a majority |
|
Calculate seat distribution from draws from posterior |
|
Wrapper for calculation of coalition probabilities from survey |
|
Calculate coalition probability from majority table |
|
Calculate coalition probabilities for multiple coalitions |
|
Plot voter shares observed in one survey |
|
Seat distributionMethods used to distribute seats across parties based on voting percentages. |
|
Seat Distribution by D'Hondt |
|
Seat Distribution by Sainte-Lague/Schepers |
|
Seat Distribution by Hare/Niemeyer |
|
DataBuilt-in datasets and lookup tables. |
|
Sample of selected surveys |
|
Colors for German parties |
|
Labels for German parties |
|
InternalInternal helper functions. |
|
Try call of read_html that throws an error if the url cannot be resolved |
|