Vés al contingut

Plantilla:Infotaula eleccions/ús/en

De la Viquipèdia, l'enciclopèdia lliure


Infobox to show final election results.

Syntax

[modifica]
{{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

[modifica]

The infotaula eleccions runs exclusively from WD information.

Can handle the following types of elections:

  • Sufragi directe: elections by direct voting to a candidate; the one with the most votes wins.
  • Sufragi indirecte: the vote of the voters is equal to the Sufragi directe, but not to select just one elected, but a set of representatives who will choose the president / maximum representative.
  • Sistema electoral de segona volta: 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 winner.
  • Representació proporcional amb llista de partit: Typical voting by parliamentary chambers where a 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.
  • Multiple Elections: These are in fact two or more 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.

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 choice:

Instructions and

WD data model >>

sufragi directe & sufragi indirecte representació proporcional amb llista de partit sistema electoral de segona volta Multiple Elections
Election type >> direct indirect proportional election item round 1 round 2 election item election 1 election 2
Instància de (P31) Election + type + jurisdiction, etc. NO year nor edition Volta d'unes eleccions (Q24097670) Election + type + jurisdiction, etc. NO year nor edition
Estat (P17) obligatori
Jurisdicció (P1001) obligatori
Anterior (P155) obligatori obligatori
Següent (P156) obligatori obligatori
Data (P585) obligatori Single value obligatori Multi-value + P518 linked to each round obligatori Single value
Data d'inici (P580) + Data de finalització (P582) Instead to P585 when ballot period last +1 day; same constraints
Durada (P2047) + P518 = Campanya electoral (Q11642595) opcional opcional
Càrrec a elegir (P541) obligatori

Single value; may be together to a vice-president position, when both are a team option.

common qualifiers: Circumscripció electoral (P768), Legislatura (P2937), De (P642),

obligatori common qualifiers + Nombre d'escons (P1342), Capacitat màxima (P1083) of the chamber, when not all seats are on votation. same rules as "direct election" obligatori multivalue (those correponding to each kind of election)

same qualifiers

obligatori Single value (included in global election item)

same qualifiers

Sistema de votació (P8196) obligatori obligatori
Candidat (P726) obligatori

common qualifiers:Partit (P102) o Representa (P1268), Persona rellevant (P3342), Vots rebuts (P1111), Candidat a la vicepresidència (P6149),

qualifs. when candidate is a political party: Nom curt (P1813), Imatge del logotip (P154), Color (hexadecimal sRGB) (P465),

obligatori Només els "elegits" a la volta-1 Same conditions as the correspondance type of election for this case
Elegit (P991) obligatori

qualifs. Nombre d'electes en una legislatura (P1410) in case of proportional elections

obligatori Single value same qualifiers
Nombre d'electors (P1867) obligatori obligatori
Nombre de vots emesos (P1868) obligatori obligatori obligatori
Nombre de vots vàlids (P1697) obligatori obligatori obligatori
Nombre de vots nuls (P5044) obligatori obligatori obligatori
Nombre de vots en blanc (P5045) obligatori obligatori obligatori
Format per (P527) may point to items of partial results by constituency, which are not covered by this infobox. Point to the round items with Ordre dins la sèrie (P1545) qualifier Point to the round items with Ordre dins la sèrie (P1545) qualifier may point to items of partial results by constituency, which are not covered by this infobox.
Part de (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 global election items with Ordre dins la sèrie (P1545) qualifier it may indicate a kind of grouping, but avoid to confuse with P31 Point to the global election items with Ordre dins la sèrie (P1545) qualifier
Mapa de distribució (P1846) opcional opcional
Data get from higher level
Durada del mandat (P2097) de Càrrec a elegir (P541)
Subclasse de (P279) de Càrrec a elegir (P541) generic name of seat positions
Imatge de la bandera (P41) de Jurisdicció (P1001)
Instància de (P31) de Candidat (P726) to determine if the election is person-oriented or party-oriented
Imatge (P18) de Candidat (P726) o de Representant del partit (P210) candidate personal image in personal oriented elections; or lead candidate in case of proportional list elections
Partit (P102) de Candidat (P726)
Nom curt (P1813) de Candidat (P726) political party acronym, in case of proportional elections
Imatge del logotip (P154) de Candidat (P726) political party logo, in case of proportional elections
Color (hexadecimal sRGB) (P465) de Candidat (P726) used to draw result bars with this colour.

Configuration settings

[modifica]

All content in the infobox is obtained from WD information, as described in the example pages.

The infobox has some parameters that allow you to make changes to its appearance or operation.

  • type_election: The infobox infers the election type or obtains it from Sistema de votació (P8196). If you want to give it manually, the accepted values ​​are: direct (for direct & indirect), proportional, two_rounds, double.
  • election_name: Text displayed as a title at the top of the infobox. It can be useful to put more synthetic text. By default, page name
  • 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, allows you to change the color that identifies the first election or round.
  • roundcolor_2: In double and two-round elections, allows you to change the color that identifies the second election or round.
  • threshold_list: All candidates are shown before the election date. After elections, only those who have won a seat (in the case of proportional elections) or who have obtained more than 2% of the votes are shown. This parameter allows you to alter this threshold. Only the figure must be informed. Ex.: 2.5
  • item: Qid of the item, if not the one of current article.

Documentació tècnica

[modifica]

Vegeu: Plantilla:Infotaula eleccions/doctech/ús amb un resum de la funcionalitat de les diferents subplantilles.