Mal:Wikidatapowered


Infobox to show the aggregated final results of the elections. It also shows results of binary (Yes/No) or multiple choice referendums.

Syntax

rediger
{{infotaula eleccions}}

It does not require any parameters to work. 100% of the content is fetched from Wikidata (WD).

Instructions of what properties to use and how to fill them to get the desired result can be found in the following sections.

However, in #Configuration settings you will find some settings for making configuration changes.

Operation

rediger

The infobox election runs exclusively from WD information.

It can handle the following types of elections:


  • Direkte valg: elections by direct voting to a candidate; the one with the most votes wins.
  • Indirekte valg: the vote of the voters is equal to the Direkte valg, but not to select just one final elected, but a set of representatives who will choose the president / maximum representative.
  • Valgsystem med to runder: It is a direct vote in which, if no candidate obtains an absolute majority, a second ballot is held in which only the two most voted candidates participate, and the winner of this second ballot are the final elected.


  • Party-list proportional representation: Typical voting by parliamentary chambers where a political party or coalition is voted on a list. In this case, the application of a formula on the number of votes determines the number of seats or positions obtained by the party list. This list can be open or closed. This aspect is indifferent to the infobox, as it only shows the final results, but not the elected deputies.


  • Plurality block voting or multi-vote : These are elections where each voter can vote for more than one candidate. In this modality there are as many votes as positions to be filled, and in the case of limited voting ( Q3786779), fewer are available. In the multi-vote method, the infobox only works with the information from P991, ie after the election date, to avoid long lists of valgkandidat (P726) that will not be elected. Although voting is by candidate and not by party lists, the infotable can present information of the elects aggregated by party (when the P991 contains seter i lovgivende forsamling (P1410)), showing the seats won. Another modality is to present the list of elected people, showing the votes obtained; in this case, the ratios shown represent the support received by voters, not the distribution rate, because the sum may be greater than 100%, as it is a multi-vote model. This double modality allows to manage the item with the global results and the items with the detailed results by constituency.


  • Double Elections: These are in fact two elections held on the same election day. They are usually two-chamber elections in bicameral systems, but there are also municipal elections that elect mayor and councilors separately, with two direct votes. The infobox only handle TWO elections with one office each.


  • Folkeavstemning: are votes where, unlike elections, the vote is not a support for a political option , but for or against a question-shaped text. In very exceptional cases, referendums don't have a binary answer, but a "choice" between several possible answers. To address these cases, the information structure is analogous to that described for an election, with small differences.

In the following summary we see the properties used and the structures of WD corresponding to the examples of the documentation for each type of election:

Instructions and

WD data model >>


Direkte valg / indirekte valg party-list proportional representation Valgsystem med to runder Plurality block voting Double Elections Referendums
Election type >> direct indirect proportional election item round 1 round 2 item eleccions election item election 1 election 2





forekomst av (P31)



> > > > > > > qualifiers:
Election + type + jurisdiction, etc. NO year nor edition valgomgang (Q24097670) Election + type + jurisdiction, etc. NO year nor edition gruppe av politiske valg (Q76853179) + Election + type + jurisdiction, etc. NO year nor edition Election + type + jurisdiction, etc. NO year nor edition Mandatori.

Must be  = folkeavstemning (Q43109) or one of its subclasses.

forrige (P155),
as qualifier of P31
obligatorisk obligatorisk
← 1st.round
obligatorisk obligatorisk obligatorisk
neste (P156),
as qualifier of P31
obligatorisk obligatorisk
2nd.round →
obligatorisk obligatorisk obligatorisk
bilde (P18) optional, (Only when qualif.
motiv (P180) = stemmeseddel (Q905151))
optional, (Only when qualif.
motiv (P180) = stemmeseddel (Q905151))
optional, (Only when qualif.
motiv (P180) = stemmeseddel (Q905151))
land (P17) obligatorisk
jurisdiksjon (P1001) obligatorisk
tidspunkt (P585) obligatorisk. If it is multi-value and does not refer to the same call, it must be accompanied by P518 indicating the meaning of that date. obligatorisk. 2 values + P518 linked to each round obligatorisk. same rules as "direct election"
startdato (P580) + sluttdato (P582) Instead to P585 when ballot was not on specifics days, but in a period; same constraints
varighet (P2047) + P518 = valgkampanje (Q11642595) optional optional optional
tillitsverv (P541) obligatorisk

enkeltverdibegrensning, may be together to a vice-president position, when both are a team option.
- - -
common qualifiers: valgdistrikt (P768), parlamentsperiode (P2937), av (P642), antall valgkretser (P4253),

obligatorisk + common qualifiers + antall representanter (P1342), maksimal kapasitet (P1083) from the chamber, when not all seats are on votation. same rules as "direct election" same rules as "proportional election" obligatorisk enkeltverdibegrensning same qualifiers
voting system (P8196) obligatorisk obligatorisk obligatorisk obligatorisk
valgkandidat (P726) obligatorisk

common qualifiers: bilde (P18), medlem av politisk parti (P102) o representerer (P1268), partisekretær (P210), visepresidentkandidat (P6149), stemmetall (P1111) (mandatory), nummer i rekken (P1545)


qualifs. related to political party: kort navn (P1813), liten logo eller ikon (P8972) or logo (P154), sRGB-farge (hex) (P465), koalisjon (P5832), angivelig det samme som (P460)

obligatorisk only "elected candidates" in round 1 optional. Only the seats won by the elected candidates are listed in the aggregate item of the election Same conditions as the correspondance type of election for this case Only when multi-response. +stemmetall (P1111) + sRGB-farge (hex) (P465)
valgte inn (P991) obligatorisk

qualifs. seter i lovgivende forsamling (P1410) in case of proportional elections

obligatorisk, enkeltverdibegrensning obligatorisk

qualifs. seter i lovgivende forsamling (P1410), in case of aggregated item

same qualifiers optional
stemmeberettigede (P1867) obligatorisk obligatorisk optional obligatorisk obligatorisk
avgitte stemmer (P1868) obligatorisk obligatorisk optional obligatorisk obligatorisk
antall gyldige stemmer (P1697) obligatorisk obligatorisk optional obligatorisk obligatorisk
antall ugyldige stemmer (P5044) obligatorisk obligatorisk optional obligatorisk obligatorisk
antall blanke stemmer (P5045) obligatorisk obligatorisk optional obligatorisk obligatorisk
har bestanddel (P527) May point to items of partial results by constituency, which are not covered by this infobox. Point to the round items with nummer i rekken (P1545) qualifier May point to items of partial results by constituency, which are not covered by this infobox. Point to the round items with nummer i rekken (P1545) qualifier May point to items of partial results by constituency, which are not covered by this infobox.
del av (P361) it may indicate that it is part of some grouping, such as "elections to the European Parliament of the year xxxx". Point to the related election items with nummer i rekken (P1545) qualifier it may indicate that it is part of some grouping, such as "elections to the European Parliament of the year xxxx". it may indicate a kind of grouping, but avoid to confuse with P31 Point to the related election items with nummer i rekken (P1545) qualifier it may indicate that it is part of some grouping, such as "Referendums from independence preparation period".
fordelingskart (P1846) optional, (Only when qualif.
motiv (P180) = valgresultat (Q19571328))
optional, (Only when qualif.
motiv (P180) = valgresultat (Q19571328))
optional, (Only when qualif.
motiv (P180) = valgresultat (Q19571328))
offisielt nettsted (P856) optional optional optional
emneknagg (P2572) optional optional optional
umiddelbar årsak til (P1536) optional.

It allows building a box at the foot with the succession of individual positions (presidents, mayors, etc.); ex.:2016 Tokyo gubernatorial election (Q24639891). Or, the investiture of an elected president among the deputies of the election we are dealing with; ex:2021 Catalan parliament election (Q48838589)
When the value of P1536 or the qualif. P3831 or the P31 of the item of P1536 = appointment (Q1318578) or Investitur (Q167407), a position succession box will be built with the data of the qualifiers and/or from the item pointed by P1536.
Any P1536 values that do not meet the described conditions will be listed as a normal line in the info table; ex: 2015 Catalan regional election (Q17082048).

Same description as another type of election. optional
tittel (P1476) obligatorisk
number of support votes (P8683) obligatorisk:P8683 + optional:sRGB-farge (hex) (P465), av (P642)
number of negative votes (P8682) obligatorisk:P8682 + optional:sRGB-farge (hex) (P465), av (P642)
Data get from higher level
valgperiode (P2097) from tillitsverv (P541)
underklasse av (P279) from tillitsverv (P541) generic name of seat positions
flaggbilde (P41) from jurisdiksjon (P1001)
forekomst av (P31) from valgkandidat (P726) to determine if the election is person-oriented or party-oriented
bilde (P18) from valgkandidat (P726) o de partisekretær (P210) candidate personal image in personal oriented elections; or lead candidate in case of proportional list elections
medlem av politisk parti (P102) from valgkandidat (P726)
kort navn (P1813) from valgkandidat (P726) political party acronym, in case of proportional elections
logo (P154) from valgkandidat (P726) political party logo, in case of proportional elections
sRGB-farge (hex) (P465) from valgkandidat (P726) used to draw result bars with this colour.


Configuration settings

rediger

Any information displayed by this infobox is fetched from WD, as it is described in exemples and documentations sections.

In addition, the infobox has some manual parameters to make changes to his appearance or operation.

  • type_election: The infobox infers the election type or obtains it from voting system (P8196). If you want to select it manually, the accepted values are: direct, proportional, two_rounds, double.
  • election_name / name: Text to show as a title, above of the infobox. It may be useful to put more synthetic text. By default, the article name is used.
  • id_position1: In "double elections", the letter "A" is used by default to indicate the results of the first election. This parameter allows you to indicate which character you want to use instead.
  • id_position2: Similar to above, to swap the letter "B" for another digit.
  • roundcolor_1: In double and two-round elections, it allows you to change the color that identifies the first election or first round.
  • roundcolor_2: In double and two-round elections, it allows you to change the color that identifies the second election or second round.
  • yes_color: Bar color for the "Yes" option in a referendum. By default is  #2ca02c .
  • not_color: Bar color for the "No" option in a referendum. By default is  #d62728 .
  • threshold_list
All candidates are shown before the election date. After elections only are shown: those who have won a seat or who have obtained more than 2% of the votes in the case of proportional elections, or more than 25% for non-proportional elections. This parameter allows you to alter this threshold. Only the figure must be informed (as 3.5 or 1.0, etc.).
  • item: Item Qid to use, when is different from the present article
  • debug: The infobox election has a debug system that displays the value of the parameter collection that any of the subtemplates has received. Possible values for this parameter are:
  • core: data passed to /core
  • prepdemo: data passed to /prepare for demography
  • preprefe: data passed to /prepare for referendum
  • prepcand: data passed to /prepare for each candidate
  • prepmult: data passed to /prepare_multi
  • showblok: data passed to /showblocks. Must be accopanied with a Qnnnnnn of candidate
  • showrefe: data passed to /showblocks for referendum

Tech documentation

rediger

See: template:Infobox election/doctech/dok for schema and functionalities of involved sub-templates.

Examples

rediger
Infobox election samplesMal:Wikidatapowered
Basic samples: direct, proportional, two rounds Direct election: USA president, president elected from chamber deputies, etc.
Double election: two assembly chambers, etc. Double election: more samples, etc.
Series: Part of double + only aggregate + constituency level Series: Constituency level with "direct election" + 2 aggregate level:State & country
Series: Local elections Referendums: Two-rounds, multi-option and basic yes-no referendum
Infobox electionDirekte valg / indirekte valg
Presidentvalget i Finland 2018 (Q1658720)
Tidspunkt28. januar 2018 Redigere verdien på Wikidata
Typepresidentvalg i Finland Redigere verdien på Wikidata
TillitsvervFinlands president. Valgperiode: 6 år Redigere verdien på Wikidata
Valgdeltakelse
Valgmanntall4 498 004 Redigere verdien på Wikidata
3 001 325
66,73 / 100
Antall gyldige stemmer2 991 529    Antall blanke stemmer  ?    Antall ugyldige stemmer 9 042
Valgresultat Redigere verdien på Wikidata
Sauli NiinistöValgte inn
1 874 334 / 2 991 529
 
 ← 2012 Redigere verdien på WikidataFinland Redigere verdien på Wikidata 2024 Redigere verdien på Wikidata  → 
Infobox electionparty-list proportional representation
2015 Catalan regional election (Q17082048)
Tidspunkt27. september 2015 Redigere verdien på Wikidata
Typeelection to the Parliament of Catalonia (en) Oversett og nyvalg Redigere verdien på Wikidata
Tillitsverv135 medlem av det katalanske parlament ≈ Catalonias 11. parlament. Valgperiode: 4 år Redigere verdien på Wikidata
Valgkampanje15 dag Redigere verdien på Wikidata
Valgdeltakelse
Valgmanntall5 310 103 Redigere verdien på Wikidata
4 130 196
77,78 / 100
Prosentpoeng 10.02
Antall gyldige stemmer4 114 244    Antall blanke stemmer 21 895   Antall ugyldige stemmer 15 952
Valgresultat Redigere verdien på Wikidata
<1
2>
JxSí  — Raül Romeva
1 628 714 / 4 114 244
Deputert 62
<1
2>
CS  — Inés Arrimadas
736 364 / 4 114 244
Prosentpoeng 10.33
Deputert 9 → 25 Antall representanter 16
<1
2>
PSC  — Miquel Iceta
523 283 / 4 114 244
Prosentpoeng 1.71
Deputert 20 → 14 Antall representanter 6
<1
2>
CSQP  — Lluís Rabell
Tilsvarende parti: Initiative for Catalonia Greens-United and Alternative Left (en) Oversett
367 613 / 4 114 244
Prosentpoeng 0.96
Deputert 13 → 11 Antall representanter 2
<1
2>
PPC  — Xavier García Albiol
349 193 / 4 114 244
Prosentpoeng 4.49
Deputert 19 → 11 Antall representanter 8
<1
2>
CUP-CC  — Antonio Baños Boncompain
Tilsvarende parti: Candidatura d'Unitat Popular-Alternativa d'Esquerres (en) Oversett
337 794 / 4 114 244
Prosentpoeng 4.73
Deputert 3 → 10 Antall representanter 7
Democratic Union of Catalonia (en) Oversett
103 293 / 4 114 244
Deputert

Redigere verdien på Wikidata
Presidential investiture in Catalonia, 2016 (en) Oversett Redigere verdien på Wikidata
Erstatter:Valgt representant:
Artur MasCarles Puigdemont Redigere verdien på Wikidata
Umiddelbar årsak til
12. januar 2016: Puigdemont Government (en) Oversett Redigere verdien på Wikidata
 ← 2012 (en) Oversett Redigere verdien på WikidataCatalonia Redigere verdien på Wikidata 2017 Redigere verdien på Wikidata  → 
Infobox electionValgsystem med to runder
Presidentvalget i Frankrike 2017 (Q7020999)
Tidspunkt23. april 2017, første valgrunde av presidentvalget i Frankrike 2017
7. mai 2017, andre runde av presidentvalget i Frankrike 2017 Redigere verdien på Wikidata
Typepresidentvalg i Frankrike Redigere verdien på Wikidata
TillitsvervFrankrikes president. Valgperiode: 5 år Redigere verdien på Wikidata
Valgkampanje14 dag Redigere verdien på Wikidata
Valgdeltakelse
Første valgomgang Redigere verdien på Wikidata
Valgmanntall47 582 183 Redigere verdien på Wikidata
37 003 728
77,77 / 100
Prosentpoeng 1.65
Antall gyldige stemmer36 054 394    Antall blanke stemmer 659 997   Antall ugyldige stemmer 289 337
Andre valgomgang Redigere verdien på Wikidata
Valgmanntall47 568 693 Redigere verdien på Wikidata
35 467 327
74,56 / 100
Prosentpoeng 5.79
Antall gyldige stemmer31 381 603    Antall blanke stemmer 3 021 499   Antall ugyldige stemmer 1 064 225
Valgresultat Redigere verdien på Wikidata Redigere verdien på Wikidata
Emmanuel Macron  — Renaissance
1
8 656 346 / 36 054 394
2
20 743 128 / 31 381 603
Marine Le Pen  — Rassemblement national
1
7 678 491 / 36 054 394
Prosentpoeng 3.4
2
10 638 475 / 31 381 603
François Fillon  — Les Républicains
1
7 212 995 / 36 054 394
 

Redigere verdien på Wikidata
Investitur Redigere verdien på Wikidata
Erstatter:Valgt representant:
François HollandeEmmanuel Macron Redigere verdien på Wikidata
Umiddelbar årsak til
presidentskapet til Emmanuel Macron Redigere verdien på Wikidata
 ← 2012 Redigere verdien på WikidataFrankrike Redigere verdien på Wikidata 2022 Redigere verdien på Wikidata  →