elex.api.CandidateReportingUnit¶
-
class
elex.api.
CandidateReportingUnit
(**kwargs)¶ Canonical reporesentation of an AP candidate. Note: A candidate can be a person OR a ballot measure.
-
serialize
()¶ Implements
APElection.serialize()
.
-
set_id_field
()¶ Set id to <raceid>-<uniqueid>-<reportingunitid>.
-
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.
-