使用 Contest 描述競賽,並將競賽連結至相關候選人和政黨。
本文將討論 Contest 及其子實體:
ContestCandidateContestPartyContestBallotMeasureContestRetentionContest
類型
Contest 是抽象元素,有三種類型,會根據競賽類型使用:
CandidateContest:如果Contest涉及一或多名候選人,請使用這個類型。PartyContest:如果Contest的選票上有政黨名單選項,請使用這個類型。這也可以做為虛擬競賽,彙整一組較小競賽的結果。BallotMeasureContest:如果Contest涉及一或多項選票措施,請使用這個類型。RetentionContest:如果Contest涉及公民投票,決定民選官員是否應留任或免職,請使用這個型別。
隨著選舉結果出爐,您可以更新動態消息,顯示不同階段的結果,例如出口民調或預估結果。Google 會提供指引,說明我們預期的選舉階段和結果類型。Google 可能會要求提供一或多個階段的資訊。這些階段類型值在選舉之夜可能會有所變動。將初始動態饋給值設為要開始的階段。詳情請參閱「ExternalIdentifiers」元素一節。
屬性
下表說明 Contest 的屬性:
| 屬性 | 是否必要? | 類型 | 說明 |
|---|---|---|---|
objectId |
必填 | ID |
其他元素用來參照這個元素的專屬內部 ID。 |
元素
下表說明 Contest 的元素:
| 元素 | 多重性 | 類型 | 說明 |
|---|---|---|---|
Abbreviation |
0 或 1 | string |
競賽的簡稱。 |
BallotSelection |
0 個以上 | BallotSelection |
將選票上的選項與競賽建立關聯。 如果每個項目都有 |
BallotSubTitle |
0 或 1 | InternationalizedText |
競賽的副標題,必須與選民選票上的顯示方式一致。 |
BallotTitle |
0 或 1 | InternationalizedText |
競賽名稱。標題文字應符合語法指南。 如果是投票議案競賽,標題應與選票上的文字相符。 |
ComposingContestIds |
0 個以上 | IDREFS |
用於定義匯總競賽。舉例來說,在美國總統大選中,全國性選舉會為各州選舉組成競賽 ID。
|
ContestDateStatus |
0 或 1 |
DateStatus
|
這個元素表示選舉的排程更新。預設值為 |
ElectoralDistrictId |
1 | IDREF |
舉例來說,針對特定競賽, |
ExternalIdentifiers |
1 | ExternalIdentifiers |
將 ID 與競賽建立關聯。必須提供穩定 ID。如要提供動態饋給回報的選舉結果階段,請使用 ContestStage 中的值設定 OtherType。 |
FilingDeadline |
0 或 1 | PartialDate |
候選人必須在該日期前登記參賽。 |
HasRotation |
0 或 1 | boolean |
指出競賽中的選項是否會輪播。如未提供這個元素,預設值為 false。 |
Name |
1 | string |
這個屬性應與英文的 BallotTitle 相符,並對應標題語法。 |
Seat |
0 或 1 | string |
競賽的特定席位。 |
SequenceOrder |
0 或 1 | integer |
|
SubsequentContestId |
0 或 1 | IDREF |
用於指向同一相關組合中的後續競賽。舉例來說,在美國選舉中,這類連結通常會從初選指向相關的大選。也可以從一般選舉指向決選。
|
SubUnitsReported |
0 或 1 | integer |
已完成這項選舉投票回報的子單位數量,例如選區。 |
SummaryCounts |
0 個以上 | SummaryCounts |
提供與競賽相關的各種計數摘要。包括含有該競選活動的選票總數,以及棄權、多投、少投或手寫選票的總數。摘要計數可與整個競賽或透過多次使用 SummaryCounts 與其他較低層級的報表單元建立關聯。 |
TotalSubUnits |
0 或 1 | integer |
子單位的總數,例如選票上列有這項選舉的選區。 |
VoteVariation |
0 或 1 | VoteVariation |
與競賽相關聯的投票變化類型,例如
n-of-m。 |
OtherVoteVariation |
0 或 1 | string |
用於在 VoteVariation 為 other 時提供自訂值。 |
StartDate |
0 或 1 | PartialDate |
競賽的行事曆開始日期。請使用開始進行民調的日期,例如 2022-11-08。只有在Contest的開始和結束日期與Election的開始和結束日期不同時,才需要設定開始日期。
|
EndDate |
0 或 1 | PartialDate |
競賽的日曆結束日期。請使用投票結束日期,例如 2022-11-08。只有在Contest的開始和結束日期與Election的開始和結束日期不同時,才需要設定結束日期。
|
CountingDate |
0 或 1 | PartialDate |
選舉競賽的計票日期 (投票後)。如果計票日與投票日不同,例如印度人民院選舉,才需要加入這項資訊。一般來說,計票作業會在投票最後一天 (即選舉日) 進行。EndDate
|
CandidateContest
使用 CandidateContest 描述涉及選取一或多名候選人的競賽。
這個實體可以選擇性地依 ID 參照 Office 或 Party。我們不支援在同一場比賽中代表候選人票券;您只能參考一個 Office。舉例來說,如果候選人是總統和副總統,您需要兩個 Candidate 競賽。每個參照的辦公室都不同。
元素
下表說明 CandidateContest 的元素:
| 元素 | 多重性 | 類型 | 說明 |
|---|---|---|---|
NumberElected |
0 或 1 | integer |
競賽中當選的候選人數,也就是 n-of-m 競賽的 n。如果動態饋給中沒有 NumberElected,系統會使用預設值 1。 |
OfficeIds |
1 | IDREFS |
一或多個 Office 元素的專屬 ID。
將辦公室說明與競賽建立關聯。 |
PrimaryPartyIds |
0 個以上 | IDREFS |
一或多個 Party 元素的專屬 ID,表示 Contest 屬於黨派初選。PrimaryPartyId 僅在大選中具有意義。 |
VotesAllowed |
1 | integer |
每位選民在這個競賽中可投的票數或填寫的候選人姓名數量上限。如果動態饋給中沒有 VotesAllowed,系統會使用預設值 1。 |
Type |
0 個以上 | ElectionType |
競選的列舉型別,例如初選或一般選舉。只有在 Contest 的類型與 Election 的類型不同時,才需要設定 Contest 的類型。 |
範例
XML
<Contest xsi:type="CandidateContest" objectId="cc1-001"> <Abbreviation>KENYAPRES</Abbreviation> <BallotSelection xsi:type="CandidateSelection" objectId="cs1-001-kenyatta">...</BallotSelection> <BallotSelection xsi:type="CandidateSelection" objectId="cs1-001-odinga">...</BallotSelection> <BallotSelection xsi:type="CandidateSelection" objectId="cs1-001-mudavadi">...</BallotSelection> <BallotSelection xsi:type="CandidateSelection" objectId="cs1-001-kenneth">...</BallotSelection> <BallotSelection xsi:type="CandidateSelection" objectId="cs1-001-dida">...</BallotSelection> <BallotSelection xsi:type="CandidateSelection" objectId="cs1-001-karua">...</BallotSelection> <BallotSelection xsi:type="CandidateSelection" objectId="cs1-001-kiyiapi">...</BallotSelection> <BallotSelection xsi:type="CandidateSelection" objectId="cs1-001-muite">...</BallotSelection> <BallotTitle> <Text language="en">2022 Kenya Presidential election</Text> <Text language="es">2022 Elecciones presidenciales de Kenia</Text> <Text language="fr">2022 Élection présidentielle au Kenya</Text> </BallotTitle> <CountStatus>...</CountStatus> <CountingDate>2022-08-11</CountingDate> <ElectoralDistrictId>...</ElectoralDistrictId> <EndDate>2022-08-09</EndDate> <Name>2022 Kenya Presidential election</Name> <StartDate>2022-08-09</StartDate> <SubUnitsReported>48</SubUnitsReported> <SummaryCounts>...</SummaryCounts> <TotalSubUnits>48</TotalSubUnits> <VoteVariation>1-of-m</VoteVariation> <NumberElected>1</NumberElected> <OfficeIds>off9999a</OfficeIds> <VotesAllowed>1</VotesAllowed> <Type>general</Type> </Contest>
JSON
"Contest": [ { "@type": "CandidateContest", "objectId": "cc1-001", "Abbreviation": "KENYAPRES", "BallotSelection": [ { "@type": "CandidateSelection", "objectId": "cs1-001-kenyatta", ... }, { "@type": "CandidateSelection", "objectId": "cs1-001-odinga", ... }, { "@type": "CandidateSelection", "objectId": "cs1-001-mudavadi", ... }, { "@type": "CandidateSelection", "objectId": "cs1-001-kenneth", ... }, { "@type": "CandidateSelection", "objectId": "cs1-001-dida", ... }, { "@type": "CandidateSelection", "objectId": "cs1-001-karua", ... }, { "@type": "CandidateSelection", "objectId": "cs1-001-kiyiapi", ... }, { "@type": "CandidateSelection", "objectId": "cs1-001-muite", ... } ], "BallotTitle": { "Text": [ { "value": "2022 Kenya Presidential election", "language": "en" }, { "value": "2022 Elecciones presidenciales de Kenia", "language": "es" }, { "value": "2022 Élection présidentielle au Kenya", "language": "fr" }, ] }, "CountStatus": "...", "ElectoralDistrictId": "...", "Name": "2022 Kenya Presidential election", "SubUnitsReported": 48, "SummaryCounts": "...", "TotalSubUnits": 48, "VoteVariation": "1-of-m", "NumberElected": 1, "VotesAllowed": 1, "Type": "general" } ]
PartyContest
如果選民要在選票上選擇政黨,請使用 PartyContest。
這項功能也可用於選舉結果動態消息,做為虛擬摘要競選活動,傳達匯總資料 (例如匯總選區競選活動結果的州級政黨競選活動)。
元素
下表說明 PartyContest 的元素:
| 元素 | 多重性 | 類型 | 說明 |
|---|---|---|---|
NumberElected |
0 或 1 | integer |
競賽中當選的候選人數,也就是 n-of-m 競賽的 n。如果動態饋給中沒有 NumberElected,系統會使用預設值 1。 |
VotesAllowed |
0 或 1 | integer |
每位選民在這個競賽中可投的票數或填寫的候選人姓名數量上限。如果動態饋給中沒有 VotesAllowed,系統會使用預設值 1。 |
OfficeIds |
1 | IDREFS |
一或多個 Office 元素的專屬 ID。
將辦公室說明與競賽建立關聯。 |
Type |
0 個以上 | ElectionType |
競選的列舉型別,例如初選或一般選舉。只有在 Contest 的類型與 Election 的類型不同時,才需要設定 Contest 的類型。 |
範例
XML
<Contest xsi:type="PartyContest" objectId="pc20001"> <BallotSelection objectId="ps101321" xsi:type="PartySelection"> <PartyIds>par10132</PartyIds> </BallotSelection> <BallotSelection objectId="ps101322" xsi:type="PartySelection"> <PartyIds>par10133</PartyIds> </BallotSelection> <BallotTitle> <Text language="en">Ballot title example</Text> </BallotTitle> <ContestDateStatus>confirmed</ContestDateStatus> <CountingDate>2022-08-11</CountingDate> <ElectoralDistrictId>...</ElectoralDistrictId> <EndDate>2022-08-09</EndDate> <ExternalIdentifiers>...</ExternalIdentifiers> <Name>Contest name example</Name> <StartDate>2022-08-09</StartDate> <VoteVariation>1-of-m</VoteVariation> <OfficeIds>off9999a</OfficeIds> <Type>general</Type> <VotesAllowed>1</VotesAllowed> </Contest>
JSON
"Contest": [ { "@type": "PartyContest", "objectId": "pc20001", "BallotSelection": [ { "@type": "PartySelection", "objectId": "ps101321", "PartyIds": [ "par10132" ] } ], "BallotSelection": [ { "@type": "PartySelection", "objectId": "ps101322", "PartyIds": [ "par10133" ] } ], "BallotTitle": { "Text": [ { "value": "Ballot title example", "language": "en" } ] }, "ContestDateStatus": "confirmed", "CountingDate": "2022-08-11", "ElectoralDistrictId": "...", "EndDate": "2022-08-09", "ExternalIdentifiers": [ ... ], "Name": "Contest name example", "StartDate": "2022-08-09", "VoteVariation": "1-of-m", "OfficeIds": "off9999a", "Type": "general", "VotesAllowed": 1 } ]
BallotMeasureContest
如果競賽涉及選票措施,請使用 BallotMeasureContest。
元素
下表說明 BallotMeasureContest 的元素:
| 元素 | 多重性 | 類型 | 說明 |
|---|---|---|---|
BallotTitle |
1 | InternationalizedText |
選票的正式名稱,例如「 有些公投會使用單一集體標題,並列出多個編號問題。在這些情況下,標題可以包含問題編號,以區分為每個問題建立的實體。 |
BallotSubTitle |
0 或 1 | InternationalizedText |
選票的副標題 (如果有的話)。 |
BallotText |
1 | InternationalizedText |
選票上顯示的文字。例如:Shall
Article 4 of the Nevada Constitution be amended to require, beginning in
calendar year 2022, that all providers of electric utility services who
sell electricity... in Nevada comes from renewable energy
resources? |
FullText |
0 或 1 | InternationalizedText |
選票提案全文副本。如果選票本身未包含其他文字,請提供這個元素。最多 30,000 個半形字元。 如果提案全文短於 30,000 個字元,且不含任何在動態饋給檔案中無效的格式,請將全文納入 |
InfoUri |
0 或 1 | AnnotatedUri |
接受下列註解的註解 URI,而非其他地方列出的註解:
|
SummaryText |
0 或 1 | InternationalizedText |
投票議案摘要。由一到兩段簡短文字組成,合作夥伴可生成這類文字,用來總結選票全文,例如:
|
ProStatement |
0 或 1 | InternationalizedText |
說明在選票上對這項措施投下「是」票的意義。這並非支持該措施的論點。例如:A "yes" vote supports this initiative to require electric
utilities to acquire 50 percent of their electricity from renewable
resources by 2030. |
ConStatement |
0 或 1 | InternationalizedText |
說明對這項投票議案投下「否」票的意義。這並非反對該措施的論點,例如:A
"no" vote opposes this initiative, thus keeping the existing requirement
that electric utilities acquire 25 percent of their electricity from
renewable resources by 2025. |
Type |
0 或 1 | BallotMeasureType |
投票議案的列舉型別。選取最符合該管轄區投票提案的值。 |
PassageThreshold |
0 或 1 | string |
提案通過所需的最低票數比例。 |
範例
XML
<Contest objectId="bmc0" xsi:type="BallotMeasureContest"> <BallotSelection objectId="bms00" xsi:type="BallotMeasureSelection"> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>bmc0_yes</Value> </ExternalIdentifier> </ExternalIdentifiers> <Selection> <Text language="en">Yes</Text> </Selection> </BallotSelection> <BallotSelection objectId="bms01" xsi:type="BallotMeasureSelection"> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>bmc0_no</Value> </ExternalIdentifier> </ExternalIdentifiers> <Selection> <Text language="en">No</Text> </Selection> </BallotSelection> <BallotSubTitle> <Text language="en">Farm Animal Confinement Initiative</Text> </BallotSubTitle> <BallotTitle> <Text language="en"> California Proposition 12, Farm Animal Confinement Initiative (2018) </Text> </BallotTitle> <ElectoralDistrictId>ru_ca_1</ElectoralDistrictId> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>bmc0</Value> </ExternalIdentifier> </ExternalIdentifiers> <Name> California Proposition 12, Farm Animal Confinement Initiative (2018) </Name> <BallotText> <Text language="en"> Establishes minimum requirements for confining certain farm animals. Prohibits sales of meat and egg products from animals confined in noncomplying manner. Fiscal Impact: Potential decrease in state income tax revenues from farm businesses, likely not more than several million dollars annually. State costs up to $10 million annually to enforce the measure. </Text> </BallotText> <ConStatement> <Text language="en">No means the measure will not be enacted </Text> </ConStatement> <InfoUri Annotation="fulltext"> https://example-government.gov/ballot-measures/California_Proposition_12_2018 </InfoUri> <InfoUri Annotation="wikipedia"> https://en.wikipedia.org/wiki/2018_California_Proposition_12 </InfoUri> <PassageThreshold> <Text language="en">50.01%</Text> </PassageThreshold> <ProStatement> <Text language="en">Yes means the measure will be enacted </Text> </ProStatement> <SummaryText> <Text language="en"> The proposition establishes new minimum requirements on farmers to provide more space for egg-laying hens, breeding pigs, and calves raised for veal. California businesses will be banned from selling eggs or uncooked pork or veal that came from animals housed in ways that did not meet these requirements. </Text> </SummaryText> <Type>ballot-measure</Type> </Contest>
JSON
"Contest": [ { "@type": "BallotMeasureContest", "objectId": "bmc0", "BallotSelection": [ { "@type": "BallotMeasureSelection", "objectId": "bms00", "ExternalIdentifiers": { "ExternalIdentifier" : [ { "Type": "other", "OtherType": "stable", "Value": "bmc0_yes" } ] } } "Text": [ { "value": "Yes", "language": "en" }, ] ], "BallotSelection": [ { "@type": "BallotMeasureSelection", "objectId": "bms01", "ExternalIdentifiers": { "ExternalIdentifier" : [ { "Type": "other", "OtherType": "stable", "Value": "bmc0_no" } ] } } "Text": [ { "value": "No", "language": "en" }, ] ], "BallotSubTitle": { "Text": [ { "value": "Farm Animal Confinement Initiative", "language": "en" } ] }, "BallotTitle": { "Text": [ { "value": "California Proposition 12, Farm Animal Confinement Initiative (2018)", "language": "en" } ] }, "ElectoralDistrictId": "ru_ca_1" "ExternalIdentifiers": { "ExternalIdentifier" : [ { "Type": "other", "OtherType": "stable", "Value": "bmc0" } ] }, "Name": "California Proposition 12, Farm Animal Confinement Initiative (2018)", "BallotText": [ "Text": [ { "value": "Establishes minimum requirements for confining certain farm animals. Prohibits sales of meat and egg products from animals confined in noncomplying manner. Fiscal Impact: Potential decrease in state income tax revenues from farm businesses, likely not more than several million dollars annually. State costs up to $10 million annually to enforce the measure.", "language": "en" } ] ], "ConStatement": [ "Text": [ { "value": "No means the measure will not be enacted", "language": "en" } ] ], "InfoUri": [ { "value": "https://example-government.gov/ballot-measures/California_Proposition_12_2018", "annotation": "fulltext" } ], "InfoUri": [ { "value": "https://en.wikipedia.org/wiki/2018_California_Proposition_12", "annotation": "wikipedia" } ], "PassageThreshold": [ "Text": [ { "value": "50.01%", "language": "en" } ] ], "ProStatement": [ "Text": [ { "value": "Yes means the measure will be enacted", "language": "en" } ] ], "SummaryText": [ "Text": [ { "value": "The proposition establishes new minimum requirements on farmers to provide more space for egg-laying hens, breeding pigs, and calves raised for veal. California businesses will be banned from selling eggs or uncooked pork or veal that came from animals housed in ways that did not meet these requirements.", "language": "en" } ] ], "Type": "ballot-measure", } ]
RetentionContest
如果Contest涉及公民投票,決定民選官員是否應留任或免職,請使用這種類型。
包括美國部分州別的法官留任選舉,決定法官是否應繼續任職下一個任期。這也適用於罷免選舉,決定是否應在官員任期結束前將其免職。
元素
BallotMeasureContest 的所有元素也適用於 RetentionContest。
| 元素 | 多重性 | 類型 | 說明 |
|---|---|---|---|
CandidateID |
1 | IDREF | 代表現任公職人員的候選人 ID |
OfficeID |
0 或 1 | IDREF | 現任官員的辦公室 ID |
範例
XML
<Contest objectId="rc40001" xsi:type="RetentionContest"> <!-- Retention contest selections are actually BallotMeasureSelection objects, and should use the 'bms' objectId prefix.--> <BallotSelection objectId="bms40001a" xsi:type="BallotMeasureSelection"> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>bmc_bms40001a</Value> </ExternalIdentifier> </ExternalIdentifiers> <Selection label="bms40001at"> <Text language="en">Yes</Text> </Selection> </BallotSelection> <BallotSelection objectId="bms40001b" xsi:type="BallotMeasureSelection"> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>bmc_bms40001at</Value> </ExternalIdentifier> </ExternalIdentifiers> <Selection label="bms40001bt"> <Text language="en">No</Text> </Selection> </BallotSelection> <BallotTitle> <Text language="en">Retention of Supreme Court Justice</Text> </BallotTitle> <ElectoralDistrictId>ru0002</ElectoralDistrictId> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>vageneral-cont-2013-va16-country-us</Value> </ExternalIdentifier> </ExternalIdentifiers> <Name>Judicial Retention, Supreme Court</Name> <CandidateId>can12345</CandidateId> <OfficeId>off20006</OfficeId> </Contest>