newsdev/nyt-elections-admin

Name: nyt-elections-admin

Owner: NYT Newsroom Developers

Description: A simple Django-based administration interface for an election loader.

Created: 2015-10-29 20:05:49.0

Updated: 2017-12-15 16:36:50.0

Pushed: 2015-11-03 21:40:52.0

Homepage: null

Size: 148

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

A really, really simple Django-based admin interface for our elections loader.

NOTE: This is substantially broken and will be in active development leading up to the November 3rd, 2015, general election. Use at your own risk.

Database
tedb elex
teuser elex
 elex
r user elex with superuser;
Python environment
rtualenv nyt-elections-admin
clone git@github.com:newsdev/nyt-elections-admin.git && cd nyt-elections-admin
install -r requirements.txt
virtualenv .
rt DJANGO_SETTINGS_MODULE=config.dev.settings
Secrets / configuration
rt AP_API_KEY              # Your AP API key
rt ELEX_RECORDING=         # mongodb or flat. There are other options as well, but defaults to /tmp or local mongo.
rt ELEX_LOGGING_URL=       # Your syslog URL, e.g., 127.0.0.1 or logs.papertrail.com
rt ELEX_LOGGING_PORT=      # Your syslog port, e.g., 514 or 1111
Load data
Initial data

Initial data is only candidates, ballot positions and races. Does not run aggregates.

go-admin load_initial --date=2015-11-03
Global data

Global data loads the entire state of all races for this election. Does run aggregates. Will blow away edits to candidates and ballot positions.

go-admin load_initial --date=2015-11-03
Updates

Updates refreshes races, candidate results and reporting units. Does run aggregates. Will not blow away edits to candidates or ballot positions.

go-admin load_updates --date=2015-11-03

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.