GpUnit 和相關元素

地緣政治單位 (GpUnit) 描述任何實體或虛擬單位 表示法或投票/座位彙整。使用這個實體來定義地緣政治 單位,例如城市、行政區、管轄區或行政區,以便建立關聯 與這些國家/地區的比賽、辦事處、票數或其他資訊。

GpUnit

下列實體包含 GpUnit 的參照:

  • ElectionContestOffice 包含必要的參照 連至 GpUnit 元素,該元素定義選舉的管轄區 比賽或辦公室。
  • SummaryCountsVoteCounts 參考編號 GpUnit 連結至已定義的 GpUnit 元素摘要或投票數 區或其他類型的地緣政治單位。

類似 GpUnit 實體的父項-子項關係必須 保持一致例如,所有國會選區都必須有一名家長 就算是特定國會選區 專門研究的種類

屬性

下表說明 GpUnit 的屬性:

屬性 必填與否 類型 說明
objectId 必填 ID 其他元素所使用的不重複內部 ID 這個元素

元素

下表將說明 GpUnit 的元素:

元素 多重性 類型 說明
ComposingGpUnitIds 0 或 1 IDREFS

一或多個 GpUnit 元素的專屬 ID。二手車 參照其他 GpUnit 元素,並將這些元素與 父項 GpUnit。必須定義每項參照的元素 將包含上層的地緣政治單元 GpUnit 元素。

ComposingGpUnitIds 元素只會代表 該特定 GpUnit 的直接子項。例如: 如果 Precincts A 和 B 位於 City M,而城市 M 位於 X 郡,那麼 將 Precincts A 和 B 列為 City M. 子項,City M 是孩子 但不將 Precincts A 和 B 子項設為 郡/縣。

ExternalIdentifiers 0 或 1 ExternalIdentifiers

將 ID 與 GpUnit 建立關聯,例如行政區或 城市的驗證碼。

當您加入 ExternalIdentifiers (如果類型並非 列舉中 IdentifierType, 使用 otherType,並提供您的自訂 在 OtherType 中輸入。

Name 0 或 1 string 地緣政治單位的名稱。
SummaryCounts 0 或更多 SummaryCounts

投票摘要數量,例如:票數、負票數和總數 選票。您可以視需要按照裝置類型和選票進行細分 類別

GpUnit 包含要提供的 SummaryCounts 相應地緣政治地理區域的摘要計數。

ReportingUnit

使用 ReportingUnit 定義地緣政治單位,例如州、城市、鄉鎮、 命名時,請使用 ReportingUnitType 列舉。

Election 會將這個元素參照 指明選舉的地理範圍。在此情況下, 定義選舉範圍的 ReportingUnit 元素可包含 ElectionAdministration,提供選舉主管機關相關資訊。

ReportingUnit 可以是其他 ReportingUnit 的子項,最多 1 個。 但是,如果ReportingUnit需要多個家長,是因為其合法性 跨父項 ReportingUnit 元素,請洽詢你的 Google 聯絡窗口 聯絡以取得專業指引

ReportingUnit 的 XML 語法為 <GpUnit xsi:type="ReportingUnit" ... />

元素

下表將說明 ReportingUnit 的元素:

元素 多重性 類型 說明
AuthorityIds 0 或 1 IDREFS 一或多個 objectId Person 元素,說明負責檢舉 。
ContactInformation 0 或 1 ContactInformation 將聯絡資訊與報表單位建立關聯,例如 投票中心地址。
CountStatus 0 或更多 CountStatus 針對不同類型的選票提供不同的計數狀態 也就是其他項目
ElectionAdministration 0 或 1 ElectionAdministration 提供選舉主管機關相關資訊。使用時機 報告單位是選舉的主管機關。
InternationalizedName 1 InternationalizedText 地理政治單位的本地化完整標準名稱,而非 縮寫。例如「阿拉斯加州」或紐約第 14 屆國會 行政區。」
IsDistricted 0 或 1 boolean IsDistricted 布林值有多種用途, 因為要識別選區,才有強制之規定 其 Type 子元素。您也可以查看 Contest敬上 元素的 ElectoralDistrictId 子元素 與競賽相關的選舉學區。不過, 已定義選區,但未與比賽連結,或標記的類型 選區是使用 OtherType,則之後 需要 IsDistricted 才能識別 「GpUnit」作為學區。IsDistricted 布林值 也可用來表示已將 GpUnit 定義為 管轄區 (例如城市) 也可做為行政區,例如 全市競賽。
IsMailOnly 0 或 1 boolean 指出報表單位是否只處理郵寄或 不在選舉投票選舉中如果沒有,則預設值為 false
SubUnitsReported 0 或 1 integer 已完成的相關子單位 (例如選區) 報表。
TotalSubUnits 0 或 1 integer 相關子單位 (例如:區) 的總數。
Type 1 ReportingUnitType

報表單位的列舉類型,例如州、城市、行政區、 或最迫切的問題

如果列舉中未列出報表單位類型 ReportingUnitType,將 Type 設為 other,並提供您的自訂報表單元類型, OtherType

OtherType 0 或 1 string 用來在 ReportingUnitTypeother
VotersParticipated 0 或 1 integer 參與選舉的選民人數。也就是說 有多少人在意見調查中出現過 開票。
VotersRegistered 0 或 1 integer 居住在 地緣政治單元

範例

XML

    <GpUnit objectId="ru0081" xsi:type="ReportingUnit">
      <ComposingGpUnitIds>ru_wahlkreis1 ru_wahlkreis2</ComposingGpUnitIds>
      <ExternalIdentifiers>
        <ExternalIdentifier>
          <Type>other</Type>
          <OtherType>stable</OtherType>
          <Value>stable-state-0081</Value>
        </ExternalIdentifier>
        <ExternalIdentifier>
          <Type>ocd-id</Type>
          <Value>ocd-division/country:de/state:hb</Value>
        </ExternalIdentifier>
      </ExternalIdentifiers>
      <InternationalizedName>
        <Text language="en">Bremen</Text>
      </InternationalizedName>
      <Name>Bremen</Name>
      <Type>state</Type>
    </GpUnit>

JSON

    "GpUnit": [
      {
        "@type": "ReportingUnit",
        "objectId": "ru0081",
        "ComposingGpUnitIds": [
          "ru_wahlkreis1",
          "ru_wahlkreis2"
        ],
        "ExternalIdentifiers": {
          "ExternalIdentifier" : [
            {
              "Type": "other",
              "OtherType": "stable",
              "Value": "stable-state-0081"
            },
            {
              "Type": "ocd-id",
              "Value": "ocd-division/country:de/state:hb"
            }
          ]
        },
        "InternationalizedName": {
          "Text": [
            {
              "language": "en",
              "value": "Bremen"
            }
          ]
        },
        "Name": "Bremen",
        "Type": "state"
      }
    ]