計數

Counts 未直接使用或參照,這個函式只會做為 下列實體的擴充版本:

Counts 可讓你依裝置特性或類型篩選票數 選票或註釋你也可以將計數連結至定義的 GpUnit 例如國家/地區

元素

下表將說明 Counts 的元素:

元素 多重性 類型 說明
GpUnitId 0 或 1 IDREF 的專屬識別碼 GpUnit敬上 元素。用於將計數與地理政治單位建立關聯,例如 縣/市或鄉鎮。
IsSuppressedForPrivacy 0 或 1 boolean 用於指出是否基於選民隱私而隱藏選票。如果這是 不存在,則預設值為 false
Type 0 或 1 CountItemType

使用的計數類型,做為投票數的篩選條件,例如 選舉日或提早投票

如果 Count 項目的類型未列在 CountItemType 列舉,將 Type 設為 other 並在當中加入自訂類型 OtherType

OtherType 0 或 1 string Typeother 時使用,以指定其內容 。

SummaryCounts

使用 SummaryCounts 表示整個比賽或地緣政治單元的摘要 數。

SummaryCounts包含 Counts 為 因而沿用 Counts。不過,SummaryCounts 並非 Counts 的類型,而是 直接納入 ContestGpUnit

SummaryCounts 可用來提供整個地理位置的 與 Contest 相關的其他計數,例如 選票、附票總數、下票和寫票。 SummaryCounts 可以選擇性地參照針對以下項目定義的 GpUnit 元素: 較低層級的報表單元以便將摘要計數與其他項目建立關聯 比賽範圍內較低層級的報表單位。

SummaryCounts 也能用來提供 GpUnit。舉例來說,為國家/地區定義的 GpUnit 可包含 SummaryCounts,提供摘要計數。SummaryCounts (在這個例子中為 未在 Counts 中加入 GpUnitId 元素。

Counts 中,如果列舉項目的類型未列於列舉項目 CountItemType,使用 other 和 在 OtherType 中加入自訂類型。

元素

下表將說明 SummaryCounts 的元素:

元素 多重性 類型 說明
BallotsCast 0 或 1 integer 票數。
BallotsOutstanding 0 或 1 integer 尚未統計選票數。
BallotsRejected 0 或 1 integer 已拒絕的選票數量。
Overvotes 0 或 1 integer 超出票數。
Undervotes 0 或 1 integer 不認同票數。
WriteIns 0 或 1 integer 寫入次數。

範例

XML

    <SummaryCounts>
      <BallotsCast>2089540</BallotsCast>
      <WriteIns>2087</WriteIns>
    </SummaryCounts>

JSON

    "SummaryCounts": [
      {
        "BallotsCast": "2089540",
        "WriteIns": "2087"
      }
    ]

VoteCounts

使用 VoteCounts 說明投票數 BallotSelectionContest

元素

下表將說明 VoteCounts 的元素:

元素 多重性 類型 說明
Count 0 或 1 float

得票數,以 0 到 100 之間的數字表示。於 特殊情況下,計數可包含小數元件。適用對象 例如,請將 14.2% 回報為 14.2,而不是 0.142。

如需支援的票數類型清單,請參閱 結果分頁類型

範例

XML

    <VoteCounts>
      <GpUnitId>ru_001</GpUnitId>
      <Type>total</Type>
      <Count>6173433</Count>
    </VoteCounts>
    <VoteCounts>
      <GpUnitId>ru_001</GpUnitId>
      <Type>other</Type>
      <OtherType>projected-vote-percent</OtherType>
      <Count>22.3</Count>
    </VoteCounts>

JSON

    "VoteCounts": [
      {
        "GpUnitId": "ru_001",
        "Type": "total",
        "Count": "6173433"
      },
      {
        "GpUnitId": "ru_001",
        "Type": "other",
        "OtherType": "projected-vote-percent",
        "Count": "22.3"
      }
    ]