Skip to content

Extracts polling data from polling sites, plots results, and predicts future races based on previous results

Notifications You must be signed in to change notification settings

ealehman/poll-predict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

poll-predict
============
Extracts polling results from designated political elections by web scraping
XML and HTML code of polling websites. Plots polling predictions compared with
actual race results. Calculates error of polling predictions and compiles all
error data from a collection of races into a dataframe. Then uses this
dataframe to make a bootsrap estimate which it applies to current elections
to predict their outcomes. The races selected in testing examples are governor
races from 2010. However the same framework can be applied to various races
from the RCP polling website (user can change url request to analyze different
races). 

Author
======
Alex Lehman
ealehman91@gmail.com

graph plotting code and instructions provided by Harvard University staff of
CS109 (see assignment_spec.ipynb for provided code snippets and outline)

run
===
To run, download poll_predict.py and run python poll_predict.py in your
terminal. To continue to next graph, ex out of the graph that pops up. 

About

Extracts polling data from polling sites, plots results, and predicts future races based on previous results

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages