elex.api.BallotMeasure

class elex.api.BallotMeasure(**kwargs)

Canonical representation of a ballot measure.

Ballot measures are similar to :class:`Candidate`s, but represent a position on a ballot such as “In favor of” or “Against” for ballot measures such as a referendum.

serialize()

Implements APElection.serialize().

set_id_field()

Set id to <unique_id>.

set_unique_id()

Generate and set unique id.

Candidate IDs are not globally unique. AP National Politian IDs (NPIDs or polid) are unique, but only national-level candidates have them; everyone else gets ‘0’. The unique key, then, is the NAME of the ID we’re using and then the ID itself. Verified this is globally unique with Tracy.