Skip to content
Hannah Reilly edited this page Nov 20, 2018 · 17 revisions

Because having someone update election results all night will take too much time 👍

Project Scope

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.

Important Links

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

Notes

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.

Dependencies

In Use:

JQuery 3.3.1
Anaconda (Python 3.x):

Considered:

https://github.com/scrapy/scrapy

Clone this wiki locally