Polling Place Queries - abustamam/polling-place-accessibility GitHub Wiki

SACVOTE, the official mobile app for county voters, queries a google fusion table to determine a voter's polling place ID and mail voting status, then queries a second google fusion table to retrieve the address of a polling place given its ID.

Those tables have been duplicated for testing this app, and are used in the following queries.

Finding the polling place ID for a registered voter:

jQuery.ajax({
  url: "https://www.googleapis.com/fusiontables/v1/query",
  type: "GET",
  data: {
    "sql": "SELECT  PollName, VBM, BT, ID, MailDate, ReturnDate FROM 1zqF6oBctr-KRY7UdCi2ApF53DQmQ0vTyLX3_Vkw where ZipCode='11111' and HouseNum='111' and BirthDate='01/01/1992'",
    "key": "mysecret",
  },
})

Finding the polling place street address from a polling place ID:

jQuery.ajax({
  url: "https://www.googleapis.com/fusiontables/v1/query",
  type: "GET",
  data: {
    "sql": "SELECT  'Polling place', Address, City, Zip FROM 1ceFqzT0EwM9FM6adMD018G_2Lwr_6OqO4OV9bOk where ID='theID'",
    "key": "mysecret",
  },
})