Skip to content

Latest commit

 

History

History
210 lines (137 loc) · 22.2 KB

vxsuite-election-definition.md

File metadata and controls

210 lines (137 loc) · 22.2 KB
layout
title description tableOfContents outline pagination
visible
true
visible
visible
true
visible
true
visible
true

VxSuite Election Definition

The VxSuite Election Definition is a data format for defining an election that is specific to VxSuite. It is a JSON file which defines the essential features of an election - metadata, contests, parties, precincts, districts, ballot styles, candidates, and more. In addition to defining that basic structure of the election, the format contains translations for any text which may appear on the ballots and ballot layouts to map the bubbles on each ballot to contest options.

Core Election Attributes and Relationships

Election Entity Relationship Diagram

Election

The Election entity is the top-level entity that contains all other entities.

AttributeTypeDescription
ballotLayoutBallot LayoutPhysical ballot metadata
ballotStringsarray - Ballot StringsSee Ballot Strings Section
ballotStylesarray - Ballot StyleAll ballot styles
contestsarray - ContestAll contests
gridLayoutsarray - Grid LayoutsSee Grid Layouts Section
countyCountyCounty metadata
datestring - YYYY-MM-DDDate of the election
districtsarray - DistrictAll districts
idstringUnique identifier
partiesarray - PartyAll parties
precinctsarray - PrecinctAll precincts
sealstring - SVG file formatSeal for the election
statestringName of the state
titlestringTitle of the election
typestring - "general" or "primary"Type of the election

Ballot Layout

The ballot layout entity includes basic information about the physical ballots used for the election.

AttributeTypeDescription
paperSizestringIndicates physical length of the ballot
metadataEncodingstringIndicates how the ballot metadata will be encoded on the ballot

The paperSize attribute accepts the following valid options:

{% code fullWidth="false" %}

letter, legal, custom-8.5x17, custom-8.5x18, custom-8.5x21, custom-8.5x22

{% endcode %}

The metadataEncoding attribute must be "qr-code".

Ballot Style

Each ballot style corresponds to a single- or multi-sheet ballot. The contests on a ballot style are determined by its associated districts - every contest belonging to an associated district is considered a part of the ballot style. A ballot style may be used in multiple precincts, one ballot style might correspond to multiple ballot PDFs that have identical contest layouts but different precinct labels.

AttributeTypeDescription
idstringUnique identifier
precinctsarray - IDs for PrecinctThe IDs of all precincts which use the ballot style
districtsarray - IDs for DistrictThe IDs of all districts whose contests are included in the ballot style
partyIdstring - ID for PartyOptional. The ID of the party to which the ballot belongs, if a primary
languagesarray - stringOptional. The language codes for the languages covered by the ballot style

Contest

There are two types of contests - candidate contests and yes-no contests. Both types share core attributes:

AttributeTypeDescription
idstringUnique identifier
districtIdstring - ID for DistrictThe associated district of the contest such as a state, county, or ward
titlestringTitle of the contest
typestring - "candidate" or "yesno"Type of the contest

Candidate Contest

In a candidate contest, the voter makes a selection between pre-defined candidates or write-in options. The following attributes extend the shared Contest attributes:

AttributeTypeDescription
seatsnumberThe number of selections a voter can make
candidatesarray - CandidateCandidate options for the contest
allowWriteInsbooleanWhether the contest allows write-ins
partyIdstring - ID for PartyOptional. The ID of the party to which the contest belongs, if a primary
termDescriptionstringOptional. Description of the term of the position, such as "For three years"

Candidate

AttributeTypeDescription
idstringUnique identifier
namestringName as it appears on the ballot
partyIdsarray - ID for PartyOptional. The IDs of the parties associated with the candidate. The party name will appear next to the candidate

Yes-No Contest

In a yes-no contest, also known as a ballot measure, the voter makes a selection between two options. The following attributes extend the shared Contest attributes:

AttributeTypeDescription
idstringContest description
yesOptionYes-No Contest Option"Yes" option
noOptionYes-No Contest Option"No" option

Yes-No Contest Option

AttributeTypeDescription
idstringUnique Identifier
labelstringLabel e.g. "Yes" or "No"

County

One and only one county is associated with each election.

AttributeTypeDescription
idstringUnique Identifier
namestringName e.g. "Choctaw County"

District

Districts are used to define levels at which a contest takes place. For example, an election may have districts defined for the state, county, town, and ward levels. Different contests can be associated with each of those levels.

AttributeTypeDescription
idstringUnique Identifier
namestringName e.g. "State of Mississippi"

Party

Parties are used in the data model either to associate candidates with a party, associate ballot styles with a party for a primary, associate contests with a party for a primary

AttributeTypeDescription
idstringUnique Identifier
namestringShort name which will appear on the ballot besides candidates e.g. "Republican"
fullNamestringFull name which will appear in reports and in the titles of ballots e.g. "Democratic Party"
abbrevstringAbbreviation for a party e.g. "R"

Precinct

AttributeTypeDescription
idstringUnique Identifier
namestringName e.g. "Fire Station"

Ballot Strings

The ballotStrings object contains the translations for any text which may appear on the ballot. The text falls into one of two categories: instructional text or election-specific text.

Instructional Text

Examples of instructional ballot text include:

  • "To vote, completely fill in the oval next to your choice."
  • "Vote for up to 3",
  • "Official Absentee Ballot"

Although the system does not use the hand marked ballot instructional text for any purpose, it must be included in the election definition for security purposes. When included, it becomes a part of the ballot hash and cannot be changed without invalidating older ballots.

Election-Specific Text

The core data model already includes names and labels. For example, the Precinct entity already has a name attribute. The names within the data model are used by default in the system in reports and administrative menus. The translations for all of these names are within the ballotStrings and are important for two main reasons:

  1. The language-specific strings are used to accommodate multi-lingual voting on VxMark
  2. Including the translations in the election definition means they are included in the ballot hash and cannot be changed without invalidating older ballots.

The election-specific ballotStrings recognized by the system are the following:

Description Key Value
Ballot Language ballotLanguage string
Ballot Style IDs ballotStyleId key-value pairs, Ballot Style IDs mapped to names
Candidate Names candidateName key-value pairs, Candidate IDs mapped to names
Contest Descriptions contestDescription key-value pairs, Contest IDs mapped to descriptions
Contest Option Labels contestOptionLabel key-value pairs, Yes-No Contest Option IDs mapped to labels
Contest Terms contestTerm key-value pairs, Contest IDs mapped to term descriptions
Contest Titles contestTitle key-value pairs, Contest IDs mapped to titles
County Name countyName string
District Names districtName key-value pairs, District IDs mapped to names
Election Date electionDate string
Election Title electionTitle string
Party Full Names partyFullName key-value pairs, Party IDs mapped to their full names
Party Names partyName key-value pairs, Party IDs mapped to their short names
Precinct Names precinctName key-value pairs, Precinct IDs mapped to names
State Name stateName string

Example

{
  "ballotStrings": {
    "en": {
       ...
      "candidateNames": {
         "john-doe": "John Doe",
         "jane-doe": "Jane Doe".
         ...
      },
      "electionTitle": "General Election",
      "hmpbOfficialBallot": "Official Ballot",
      ...
    }
    "es-US": {
      ...
      "candidateNames": {
         "john-doe": "John Doe",
         "jane-doe": "Jane Doe".
         ...
      },
      "electionTitle": "Elecciones generales",
      "hmpbOfficialBallot": "Boleta oficial",
      ...
    }
  },
  ...
}

The language codes used are the IETF language tags for supported VxSuite languages: English, Spanish, Simplified Chinese, and Traditional Chinese.

Grid Layouts

Grid layouts describe where the bubbles and write-in areas exist on each ballot style. They must correspond exactly to the ballots used for the election in order for interpretation to succeed. For more information on the acceptable ballot format and its relationship to grid coordinates, see Hand Marked Ballots.

Relationship of grid layouts to other entities in the election definition

gridLayouts is an array which contains entities with the following attributes:

AttributeTypeDescription
ballotStyleIdstring, ID for Ballot StyleIdentifies the ballot style
optionBoundsFromTargetMarkOutsetDescribes where the entire contest option area sits relative to the bubble
gridPositionsGrid PositionDescribes bubble and write-in positions on the ballot

Outset

The optionBoundsFromTargetMark field specifies an Outset entity. The purpose is to give the distance from the bubble to edges of the entire contest option e.g. the area that includes the bubble, the corresponding candidate's name, and some padding. The system uses this area during write-in-adjudication to highlight specific contest options for review.

AttributeTypeDescription
topnumberDistance from center of bubble to top of option bounds
rightnumberDistance from center of bubble to right of option bounds
bottomnumberDistance from center of bubble to bottom of option bounds
leftnumberDistance between center of bubble to left of option bounds

Grid Position

Grid positions are defined positions on the ballot corresponding to bubbles that can be marked by a voter. The row and column coordinates of each grid position denote where the bubble is printed within the abstract "grid" created by the timing marks on the outer edges of the ballot. There are two types of positions - a standard option position corresponding to a candidate or option in the election definition or a write-in position corresponding to a write-in bubble and area on the ballot.

Option Grid Position

AttributeTypeDescription
typestring - "option"Indicates this is a standard option position
sheetNumbernumber1-indexed sheet number within the ballot style
sidestring - "front" or "back"Indicates side of the sheet
columnnumberColumn position of the bubble in the timing mark grid
rownumberRow position of the bubble in the timing mark grid
contestIdstring - ID of ContestContest identifier
optionIdstring - ID of Candidate or Yes-No Contest OptionOption identifier

Write-In Grid Position

AttributeTypeDescription
typestring - "write-in"Indicates this is a write-in option position
sheetNumbernumber1-indexed sheet number within the ballot style
sidestring - "front" or "back"Indicates side of the sheet
columnnumberColumn position of the bubble in the timing mark grid
rownumberRow position of the bubble in the timing mark grid
contestIdstring - ID of ContestContest identifier
writeInIndexnumberAn index of the write-in position within the list of write-in positions for a contest (zero-indexed)
writeInAreaRectangleArea of the ballot to scan for a write-in

In some jurisdictions, a write-in can only be counted if the associated bubble is filled in as for any other option. In other jurisdictions, a write-in must be counted even if the bubble is not filled. In order to detect these write-ins, a writeInArea is defined for each write-in grid position. The Rectangle specifies the area.

Rectangle

AttributeTypeDescription
xnumberColumn start of the rectangle
ynumberRow start of the rectangle
widthnumberWidth of the rectangle
heightnumberHeight of the rectangle

Examples

Election definition examples are located in the vxsuite repository, such as here.