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.
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 2015-11-21 > results.csv
- Documentation: http://elex.readthedocs.org/
- Repository: https://github.com/newsdev/elex/
- Issues: https://github.com/newsdev/elex/issues
- Roadmap: https://github.com/newsdev/elex/milestones
Elex projects and implementations¶
- NPR loader: A simple reference data loader for PostgreSQL.
New York Times
- New York Times loader: A more sophisticated data loader for PostgreSQL.
- New York Times 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.
- node-elex-admin: Incomplete node-based admin interface.
- 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
- Uses v2.0 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 (performance is a work in progress; contributions are welcome).
Table of contents¶
- Command line interface
- Python API
- Recording results