Create a gist now

Instantly share code, notes, and snippets.

Urls I used for Fusion Tables Election Data
# Results by county:
https://www.google.com/fusiontables/api/query?sql=SELECT+'DistrictName-en'%2C+NumVoters%2C+NumBallotBoxes%2C+NumCountedBallotBoxes%2C+'VoteCount-Paul'%2C+'VoteCount-Bachmann'%2C+'VoteCount-Johnson'%2C+'VoteCount-Gingrich'%2C+'VoteCount-Santorum'%2C+'VoteCount-Huntsman'%2C+'VoteCount-Other'%2C+'VoteCount-Roemer'%2C+'VoteCount-Romney'%2C+'VoteCount-Perry'%2C+'VoteCount-Cain'+FROM+2475414+ORDER+BY+'DistrictName-en'
# Candidate totals for the entire state:
https://www.google.com/fusiontables/api/query?sql=SELECT+SUM('NumVoters')%2C+SUM('NumBallotBoxes')%2C+SUM('NumCountedBallotBoxes')%2C+SUM('VoteCount-Paul')%2C+SUM('VoteCount-Bachmann')%2C+SUM('VoteCount-Johnson')%2C+SUM('VoteCount-Gingrich')%2C+SUM('VoteCount-Santorum')%2C+SUM('VoteCount-Huntsman')%2C+SUM('VoteCount-Other')%2C+SUM('VoteCount-Roemer')%2C+SUM('VoteCount-Romney')%2C+SUM('VoteCount-Perry')%2C+SUM('VoteCount-Cain')+FROM+2475414
# Sorted by Patchwork Nation Community type (from a merged table I made with the Iowa results):
https://www.google.com/fusiontables/api/query?sql=SELECT+PNCommunityType%2C+SUM('NumVoters')%2C+SUM('NumBallotBoxes')%2C+SUM('NumCountedBallotBoxes')%2C+SUM('VoteCount-Paul')%2C+SUM('VoteCount-Bachmann')%2C+SUM('VoteCount-Johnson')%2C+SUM('VoteCount-Gingrich')%2C+SUM('VoteCount-Santorum')%2C+SUM('VoteCount-Huntsman')%2C+SUM('VoteCount-Other')%2C+SUM('VoteCount-Roemer')%2C+SUM('VoteCount-Romney')%2C+SUM('VoteCount-Perry')%2C+SUM('VoteCount-Cain')+FROM+2486515+GROUP+BY+PNCommunityType+ORDER+BY+PNCommunityType+ASC
# Formatted in JSON:
https://www.google.com/fusiontables/api/query?sql=SELECT+PNCommunityType%2C+'NumVoters'%2C+'NumBallotBoxes'%2C+'NumCountedBallotBoxes'%2C+'VoteCount-Paul'%2C+'VoteCount-Bachmann'%2C+'VoteCount-Johnson'%2C+'VoteCount-Gingrich'%2C+'VoteCount-Santorum'%2C+'VoteCount-Huntsman'%2C+'VoteCount-Other'%2C+'VoteCount-Roemer'%2C+'VoteCount-Romney'%2C+'VoteCount-Perry'%2C+'VoteCount-Cain'%2C+'DistrictName-en'%2C+'CountyID'+FROM+2486515+ORDER+BY+FIPS+ASC&jsonCallback=foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment