-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Because having someone update election results all night will take too much time 👍
This project involves three moving parts and an API (bless you, state government).
Part 1: Calling, parsing, and displaying data from the CA Secretary of State Election Results API.
Part 2: Capturing data from a county election website, storing it in JSON files, and updating the array dynamically.
Part 3: Parsing and displaying data from Part 2's JSON files.
The Javascript/JQuery version was initially designed as proof of concept, but ended up as the final package. Ultimately, I'd like to build a PHP version to ensure maximum deliverability.
CA Secretary of State JSON API and SDK Documentation: https://media.sos.ca.gov/json/
Fresno County Election Results: https://www.co.fresno.ca.us/departments/county-clerk-registrar-of-voters/election-information/election-results
The simplest way I've found to identify the array keys is to interpret the JSON data (i.e. JSON.stringify, json_encode(), etc.) and print it to either the console or page.
In Use:
JQuery 3.3.1
Anaconda (Python 3.x):
-
Pandas
-
BeautifulSoup4 (import SoupStrainer, too)
- Requests
- JSON
Considered: