Get database-ready election results from the Associated Press Election API v2.0.
Elex is designed to be fast, friendly, and largely agnostic to stack/language/database choice. Basic usage is as simple as:
elex results 2016-03-01 > results.csv
Elex was developed by The New York Times and NPR and not in concert with the Associated Press. Though we plan on using Elex for the 2016 cycle, there is no guarantee that this software will work for you. If you’re thinking about using Elex, check out the license and contact the authors.
Elex projects and implementations¶
- NPR loader: A simple reference data loader for PostgreSQL.
New York Times
- New York Times Elex loader: A more sophisticated data loader for PostgreSQL.
- New York Times AP Deja Vu: A webservice to replay JSON captured during an election.
- New York Times Elex admin: An admin interface for Elex data loaded with the New York Times loader written in Flask.
- Introducing Elex, A Tool To Make Election Coverage Better For Everyone, Jeremy Bowers and David Eads, Source
- NPR and The New York Times teamed up to make election reporting faster, Benjamin Mullin, Poynter
Using the FTP system?¶
Use the Los Angeles Times’ python-elections library.
The New York Times has a sample implementation that demonstrates how you might integrate the FTP loader with your Elex-based system.
- Uses v2.1 of the Associated Press Election API NOTE: Requires a (paid) account with the AP.
- Intuitive command line interface: Get data as CSV or JSON and pipe to the data tool of your choice.
- Friendly Python API for use as a library.
- Simple election recording (to MongoDB).
- Comprehensive tests.
- Extensive documentation.
- Fast and correct.
Table of contents¶
- Command line interface
- Output and errors
- Recording results
- Python library reference
- 2.4.0 - October 23, 2016
- 2.3.0 - October 5, 2016
- 2.2.0 - September 24, 2016
- 2.1.1 - September 12, 2016
- 2.1.0 - August 31, 2016
- 2.0.10 - 2.0.11 - August 25, 2016
- 2.0.9 - August 16, 2016
- 2.0.8 - July 25, 2016
- 2.0.5 - 2.0.6 - June 6, 2016
- 2.0.1 - 2.0.4 - April 26, 2016
- 2.0.0 - April 14, 2016
- 1.2.0 - Feb. 25, 2016
- 1.1.0 - Feb. 2, 2016
- 1.0.0 - Jan. 25, 2016
- 0.2.0 - Dec. 24, 2015
- 0.1.2 - Dec. 21, 2015
- 0.1.1 - Dec. 10, 2015
- 0.1.0 - Dec. 10, 2015
- 0.0.0 - 0.0.42