Parses election results data published online by the Los Angeles County Registrar-Recorder/County Clerk
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
la_election_night v0.0.2 Oct 30, 2018
test_data First commit Oct 22, 2018
.coveragerc v0.0.2 Oct 30, 2018
.gitignore Initial commit Oct 22, 2018
.travis.yml TravisCI config Oct 22, 2018
LICENSE Initial commit Oct 22, 2018
MANIFEST.in Got setup.py right Oct 22, 2018
Makefile Got setup.py right Oct 22, 2018
Pipfile Got setup.py right Oct 22, 2018
Pipfile.lock Got setup.py right Oct 22, 2018
README.md Update README.md Oct 30, 2018
requirements.txt Got setup.py right Oct 22, 2018
setup.cfg First commit Oct 22, 2018
setup.py v0.0.2 Oct 30, 2018
tests.py v0.0.2 Oct 30, 2018

README.md

la-election-night

Parse the results file published on election night by the Los Angeles County Registrar-Recorder/County Clerk

Get started

Install the library from PyPI

$ pipenv install la-election-night

Import the library. Get the latest data from the live URL. That's it.

>>> import la_election_night
>>> la_election_night.get()
[
    {
        "record_number": "001",
        "record_type": "measure",
        "title": "LA CO FLOOD CONTROL DIST MEASURE W",
        "precincts_total": 4551,
        "precincts_reporting": 4551,
        "precincts_reporting_pct": 1.0,
        "results": [
            {
                "name": "YES",
                "votes": 134294,
                "vote_pct": 0.6668999999999999,
                "party": ""
            },
            {
                "name": "NO",
                "votes": 67064,
                "vote_pct": 0.3331,
                "party": ""
            }
        ]
    },
    ...

You can example of how the data is parsed out can be seen here.