GpUnit 和相关元素

地缘政治单元(即 GpUnit)用于描述广告系列的任何物理或虚拟单元, 代表性或投票/席位汇总。使用此实体定义地缘政治 (如市、区、管辖区或选区) 竞选、公职、票数或与这些地区有关的其他信息。

GpUnit

以下实体包含对 GpUnit 的引用:

  • ElectionContestOffice 包含必需的引用 添加到用于定义选举管辖区的 GpUnit 元素中, 竞赛或办公室。
  • SummaryCountsVoteCounts 参考文件 GpUnit 将摘要或投票数关联到以下元素所定义的 GpUnit 元素: 选区或其他类型的地缘政治单位。

类似 GpUnit 实体的父子关系必须是 保持一致。例如,所有国会选区都必须有一位父级选区, 即使某个国会选区是州或省级行政区 位于县。

属性

下表介绍了 GpUnit 的属性:

属性 是否必需? 类型 说明
objectId 必填 ID 供其他元素引用的唯一内部标识符 该元素。

元素

下表介绍了 GpUnit 的元素:

元素 多样性 类型 说明
ComposingGpUnitIds 0 或 1 IDREFS

一个或多个 GpUnit 元素的唯一标识符。已使用 来引用其他 GpUnit 元素并将其与 父级 GpUnit。必须定义引用的每个元素 (针对父级中包含的地缘政治单元) GpUnit 元素。

使用 ComposingGpUnitIds 元素仅表示 该特定 GpUnit 的直接子项。例如: 如果选区 A 和 B 位于城市 M,而城市 M 位于 X 县,则 将 A 和 B 选为城市 M 的子级。那么 C 城市 M 就是一个孩子 但将 A 区和 B 区的子区域设为属于 X 县 X 县。

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 的子级。 但是,如果 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,则 IsDistrictedGpUnit区。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"
      }
    ]