BallotSelection

This data entity is for the ballot selections in a contest, for example linking candidates and parties to their vote counts.

BallotSelection is an abstract element with two types that get used according to the type of contest:

  • CandidateSelection: This type of BallotSelection is used if the contest is for one or more candidates. It links the ballot selection to the candidate elements
  • PartySelection: This type of BallotSelection is used if the contest type is for a party, such as for a party proportional contest

BallotSelection includes VoteCounts for associating vote counts with the ballot selection. It wraps occurrences of VoteCounts elements in a container element VoteCountsCollection for the purpose of making large instance files easier to manipulate.

SequenceOrder is included to specify a default ordering for the ballot selections for display purposes. The original ballot ordering can be preserved, however, by using the BallotStyle element.

The table below describes the attributes for BallotSelection:

Attribute Required? Type Description
objectId required ID Unique internal identifier used by other elements to reference this element.

The table below describes the elements for BallotSelection:

Element Multiplicity Type Description
SequenceOrder 0 or 1 integer Order in which the candidate is listed on the ballot for purposes of results display. If not present, no order is assumed.
VoteCountsCollection 0 or more Wrapper for collections of VoteCounts elements.

CandidateSelection

This entity is for the ballot selections in a candidate contest, including for write-ins. It inherits the attributes and elements of BallotSelection. References to multiple Candidate elements can be included if necessary, for example, when the ballot selection would be for a ticket of multiple candidates.

When multiple candidates are referenced for a ticket and the ordering of the candidates is important to preserve, it is expected that the generating application will list the references to Candidate elements within CandidateIds according to the ordering scheme in place. For example, the order of the candidates should match the same ordering of the Office element references within OfficeIds in the Contest of type CandidateContest.

The table below describes the elements for CandidateSelection:

Element Multiplicity Type Description
CandidateIds 1 IDREFS Unique identifiers for one or more Candidate elements. For associating a candidate with the candidate selection on the ballot and for cases where the ballot selection is for multiple candidates; for example, a ticket with President and Vice-President.
IsWriteIn 0 or 1 boolean Indicates whether the candidate is a write-in, for example, true or false. Assumed to be false if not present.

Its XML syntax is: <BallotSelection xsi:type="CandidateSelection">

Examples

Pre-election

XML

    <BallotSelection objectId="cs10861" xsi:type="CandidateSelection">
      <CandidateIds>can10861a can10861b</CandidateIds>
    </BallotSelection>

JSON

    "BallotSelection": [
      {
        "@type": "CandidateSelection",
        "objectId": "cs10861",
        "PartyIds": [
          "can10861a",
          "can10861b"
        ]
      }
    ]

Post-election

XML

    <BallotSelection objectId="cs10861" xsi:type="CandidateSelection">
      <CandidateIds>can10861a can10861b</CandidateIds>
      <VoteCountsCollection>
        <VoteCounts>
          <Type>total</Type>
          <Count>6173433</Count>
        </VoteCounts>
      </VoteCountsCollection>
    </BallotSelection>

JSON

    "BallotSelection": [
      {
        "@type": "CandidateSelection",
        "objectId": "cs10861",
        "PartyIds": [
          "can10861a",
          "can10861b"
        ]
        "VoteCountsCollection": [
          {
            "VoteCounts": [
              {
                "Type": "total",
                "Count": "6173433"
              }
            ]
          }
        ]
      }
    ]

PartySelection

This data entity is for a ballot selection involving a party such as a party list selection on the ballot. It inherits the attributes and elements of BallotSelection.

The table below describes the elements for PartySelection:

Element Multiplicity Type Description
PartyIds 1 IDREFS Unique identifier for one or more Party elements. For associating one or more parties with the party selection.

Its XML syntax is: <BallotSelection xsi:type="PartySelection" ... />

Examples

Pre-election

XML

    <BallotSelection objectId="ps150" xsi:type="PartySelection">
      <PartyIds>par100</PartyIds>
    </BallotSelection>

JSON

    "BallotSelection": [
      {
        "@type": "PartySelection",
        "objectId": "ps150",
        "PartyIds": [
          "par100"
        ]
      }
    ]

Post-election

XML

    <BallotSelection objectId="ps150" xsi:type="PartySelection">
      <VoteCountsCollection>
        <VoteCounts>
          <GpUnitId>ru_wk_200</GpUnitId>
          <Type>total</Type>
          <Count>286050</Count>
        </VoteCounts>
      </VoteCountsCollection>
      <PartyIds>par100</PartyIds>
    </BallotSelection>

JSON

    "BallotSelection": [
      {
        "@type": "PartySelection",
        "objectId": "ps150",
        "PartyIds": [
          "par100"
        ]
      }
    ]
    "BallotSelection": [
      {
        "@type": "PartySelection",
        "objectId": "ps150",
        "VoteCountsCollection": [
          {
            "VoteCounts": [
              {
                "GpUnitId": "ru_wk_200",
                "Type": "total",
                "Count": "286050"
              }
            ]
          }
        ],
        "PartyIds": [
          "par100"
        ]
      }
    ]