ElectionCal.US

Election Calendar's goal is to get more people voting by making deadlines easily accessible and sharable. This has two main parts, first is collecting election dates and deadlines. This data is stored in hand-editable TOML files. These files are loaded by build_site.py and transformed into three types of dates, election dates, election deadlines and reminders.

The second piece to the puzzle is creating a variety of machine and human readable forms of the dates and reminders. Different generators produce different output formats. build_site.py will also manage splitting dates by state and county. Aggregate outputs are also done for federal and state levels to include subdivision specific dates, such as a county deadline in the aggregate state feed.

TOML format

There are three main types of TOML files.

elections.toml

Here is an example of election deadlines from the June 23rd New York election:

[20200623]
date = 2020-06-23
name = "Congressional Primary"
original_date = 2020-06-23

[20200623.registration]
in_person_by = 2020-06-13
postmarked_by = 2020-05-29
received_by = 2020-06-03

[20200623.poll]
in_person_by = 2020-06-23

[20200623.poll.early]
in_person_starts = 2020-06-13
in_person_by = 2020-06-21
sources = ["https://www.elections.ny.gov/NYSBOE/news/2020VotingOptionsDeadlinesforJunePrimary.pdf"]

[20200623.absentee]
postmarked_by = 2020-06-22
in_person_by = 2020-06-23
received_by = 2020-06-30
overseas_received_by = 2020-07-06
sources = ["https://www.elections.ny.gov/NYSBOE/law/June2020SpecElecPolCalendar0429.pdf",
           "https://www.elections.ny.gov/VotingDeadlines.html#AbsenteeDeadlines"]

[20200623.absentee.application]
postmarked_by = 2020-06-16
in_person_by = 2020-06-22

The [] portions are . separated keys known as "tables" in TOML. Here is a good toml reference.

The date in the [] is the original election date, aka the election key. After the . is an id for different phases (or actions maybe) of the election. They are:

(We should make absentee.overseas instead of overseas_received_by.)

Each of these phases can be accomplished in a variety of ways. Though not all phases can happen in all ways. (poll.* is only ever in person.)

sources isn't currently used be may be used in descriptions to demonstrate validity of the dates.