2 Sqlite3 Database of senate polling
3 Author: Bryan Steinbach
5 Parts A-C should be run in sequence before testing other parts. They create the sqlite3 database "polls"
8 Prepare the table of polls from senate_polls.raw
9 Also creates (and destroys, if it exists already) the initial SQL database
10 Afterwards, prints a few entries for a sanity check
14 Add the table of names from candidate_names.txt
19 Build table of pictures from template for URL
24 Display web page of polling data from one state
25 See CA.html for example
29 Show expected seats lost by democrats
30 Comes out to -9 (Democrats appear to gain seats)
34 Show polling data timeseries for one state
35 See CA.png for example
39 $ python g.py CA 99 0 0 Nov 1 Nov 2 Fake Pollster
40 $ python f.py CA # now you'll see the new point at the far right