Template:EUPP data/doc#Updating the template

{{Documentation subpage}}

{{Template rating|beta}}

Usage

{{EUPP data||||extra parameters}}

Parameters

class="wikitable"

! scope="col" | Parameter

! scope="col" | Description

scope="row" | 1

| The type of data requested and pulled from Wikidata, from the following list:

  • seats: the number of seats of one or more entities in one or more institutions (P1410);
  • seat share: the share of seats of one or more entities in one or more institutions (based on P1410);
  • seat composition bar: a composition bar showing the seats of one or more entities in one or more institutions (based on P1410);
  • acronym: the short name of the entity (P1813);
  • color: the official colour of the entity as a hex code (P465);
  • country: the country in which the entity is registered (P17);
  • foundation date: the date on which the entity was founded (P571);
  • foundation year: the year in which the entity was founded (P571);
  • individual members: the number of individual members of the entity (P2124);
  • individual members date: the reference date for the number of individual members of the entity (based on P2124);
  • individual members year: the reference year for the number of individual members of the entity (based on P2124);
  • label: the name of the entity;
  • official name: the official long-form name of the entity (P1448);
  • parliamentary group: the parliamentary group the entity belongs to (P4100);
  • public funding: the amount of public funding received by the entity (P12919); or
  • website: the official website of the entity (P856), stripped from "https", "http" and "www" prefixes.

This parameter is mandatory.

scope="row" | 2

| The name of the entity, from the following list:

  • the acronym of the entity (see list below); or
  • its Wikidata qID.

The name can be omitted when the template is called from the Wikipedia page of the entity (alternatively, thisparty can be used to refer to the entity in question).

This parameter is optional when called from the page of the entity.

The following acronyms are used for European parties:

In addition, the following European political alliances are covered:

In addition, four special parameters can be used instead of European parties (so not when |party_type=national party):

  • all: for the seats of all European parties combined;
  • none: for the seats not occupied by members of European parties (not for lower and upper houses); and
  • ind: for independent politicians on the European Council (only).

Notes:

  • the capitalisation of parameters does not matter;
  • given the cost of calling Wikidata when using a specific qID (i.e., not calling Wikidata from a linked Wikipedia page), the special parameter "thisparty" should be used whenever this module is called from the page of a European party; and
  • since the listed European political alliances are not European political parties, they do not count towards to sum of seats occupied by European political parties, nor the seats not occupied by European political parties.
scope="row" | 3

| The name of the institution, from the following list:

For lower and upper houses, the module will sum the number of seats of the European party's member parties across member states.

This parameter is mandatory when data_type is seat, seat share, or seat composition bar.

scope="row" | extra parameters

| The following extra parameters can also be used, depending on the requested data_type:

  • all data_types:
  • reference will display the reference when |reference=yes (this parameter is ignored for the seats of lower or upper houses of European entities, as many national figures are summed);
  • seat share:
  • constituency will override the institution's number of seats (for instance when the party is part of a special constituency);
  • seat composition bar:
  • constituency will override the institution's number of seats (for instance when the party is part of a special constituency);
  • width will specify the width of the bar and can have the following formats: "80" (default unit is pixel), "80px", "80em", or "80%" (without spaces);
  • percent will display the percentage when |percent=yes;
  • bar-color, background-color, and border will override default colours when provided an hexadecimal value (e.g."#123ABC", including the pound sign) or a recognised colour (e.g. "red").
  • all other data_types:
  • verbose: will display an error message when no value exists on Wikidata, as well as a relevant link, when |verbose=yes (otherwise the field is empty).

These parameters are optional.

Test cases

The template's module has two testcase pages:

Updating the template

The template draws its data from two sources:

To update data returned by the module, go to the [https://www.wikidata.org/ Wikidata] page of the entity in question (the link is often provided as a comment in the infobox of the Wikipedia article), and edit the relevant property, preferably by adding a new value and marking it as preferred (instead of deleting outdated information).

Here are some relevant properties for the module:

  • number of seats in assembly: P1410, with the following qualifiers:
  • legislative body: P194
  • executive body (for the European Commission and European Council): P208
  • parliamentary term (for the European Parliament and European Commission): P2937
  • short name/acronym: P1813
  • colour/sRGB color hex triplet: P465
  • country: P17
  • foundation date: P571
  • individual members: P2124
  • official name: P1448
  • parliamentary group: P4100
  • public funding: P12919
  • official website: P856

Wherever possible, try and add:

  • a start time (P580) qualifier (and a matching end time (P582) in the outdated entry) or a point in time (P585) qualifier, and
  • a reference, including the reference URL (P854), title (P1476), retrieved (P813), and publisher qualifiers (P123).

Updating Wikidata ensures that updated and sourced information is available not just to this Wiki, but to all versions of Wikipedia, as well as to other services drawing information from Wikidata.

Examples

= Data type seats =

class="wikitable centre"
Code

! Result

! Output

{{EUPP data|seats|EPP|EP}}

| {{EUPP data|seats|EPP|EP}}

| number of seats of the European People's Party in the European Parliament

{{EUPP data|seats|PES|EC|reference=yes}}

| {{EUPP data|seats|PES|EC|reference=yes}}

| number of seats of the Party of European Socialists in the European Commission, with reference

{{EUPP data|seats|ind|EUCO}}

| {{EUPP data|seats|ind|EUCO}}

| number of seats of independent politicians in the European Council

{{EUPP data|seats|ALDE|ms-lower-house}}

| {{EUPP data|seats|ALDE|ms-lower-house}}

| number of seats of the Alliance of Liberals and Democrats for Europe in member states' lower houses

{{EUPP data|seats|EGP|ms-upper-house|reference=yes}}

| {{EUPP data|seats|EGP|ms-upper-house|reference=yes}}

| number of seats of the European Green Party in member states' upper houses, without reference (see table above)

{{EUPP data|seats|Q208242|EC}}

| {{EUPP data|seats|Q208242|EC}}

| number of seats of the European People's Party (called by its Wikidata qID) in the European Commission

{{EUPP data|seats|Q208242|ms-upper-house}}

| {{EUPP data|seats|Q208242|ms-upper-house}}

| number of seats of the European People's Party (called by its Wikidata qID) in member states' upper houses

{{EUPP data|seats|all|EP}}

| {{EUPP data|seats|all|EP}}

| number of seats of all European parties combined in the European Parliament

{{EUPP data|seats|none|EP}}

| {{EUPP data|seats|none|EP}}

| number of seats not occupied by European parties in the European Parliament

= Data type seat share =

class="wikitable centre"
Code

! Result

! Output

{{EUPP data|seat share|EPP|EP|reference=yes}}

| {{EUPP data|seat share|EPP|EP|reference=yes}}

| share of seats of the European People's Party in the European Parliament, with reference

{{EUPP data|seat share|ind|EUCO}}

| {{EUPP data|seat share|ind|EUCO}}

| share of seats of independent politicians in the European Council

{{EUPP data|seat share|ALDE|ms-lower-house}}

| {{EUPP data|seat share|ALDE|ms-lower-house}}

| share of seats of the Alliance of Liberals and Democrats for Europe in member states' lower houses

{{EUPP data|seat share|Q208242|EC}}

| {{EUPP data|seat share|Q208242|EC}}

| share of seats of the European People's Party (called by its Wikidata qID) in the European Commission

{{EUPP data|seat share|all|EP}}

| {{EUPP data|seat share|all|EP}}

| share of seats of all European parties combined in the European Parliament

= Data type seat composition bar =

class="wikitable centre"
Code

! Result

! Output

{{EUPP data|seat composition bar|EPP|EP|reference=yes}}

| {{EUPP data|seat composition bar|EPP|EP|reference=yes}}

| composition bar of seats of the European People's Party in the European Parliament

{{EUPP data|seat composition bar|ind|EUCO|percent=yes}}

| {{EUPP data|seat composition bar|ind|EUCO|reference=yes}}

| composition bar of seats of independent politicians in the European Council

{{EUPP data|seat composition bar|ALDE|ms-lower-house}}

| {{EUPP data|seat composition bar|ALDE|ms-lower-house}}

| composition bar of seats of the Alliance of Liberals and Democrats for Europe in member states' lower houses

{{EUPP data|seat composition bar|Q208242|EC|percent=yes|reference=yes}}

| {{EUPP data|seat composition bar|Q208242|EC|percent=yes|reference=yes}}

| composition bar of seats of the European People's Party (called by its Wikidata qID) in the European Commission

{{EUPP data|seat composition bar|all|EP|width=80%|background-color=#FFFF00|border=#008080|bar-color=#A020F0}}

| {{EUPP data|seat composition bar|all|EP|width=80%|background-color=#FFFF00|border=#008080|bar-color=#A020F0}}

| composition bar of seats of all European parties combined in the European Parliament, with special parameters

= Other data types =

class="wikitable centre"
Code

! Result

! Output

{{EUPP data|acronym|EPP}}

| {{EUPP data|acronym|EPP}}

| acronym of the European People's Party

{{EUPP data|color|PES}}

| {{EUPP data|color|PES}}

| colour of the Party of European Socialists

{{EUPP data|foundation date|PES}}

| {{EUPP data|foundation date|PES}}

| foundation date of the Party of European Socialists

{{EUPP data|individual members|EPP|reference=yes}}

| {{EUPP data|individual members|EPP|reference=yes}}

| individual members of the European People's Party, with reference

{{EUPP data|label|ALDE}}

| {{EUPP data|label|ALDE}}

| label of the Alliance of Liberals and Democrats for Europe

{{EUPP data|official name|EGP}}

| {{EUPP data|official name|EGP}}

| official name of the European Green Party

{{EUPP data|parliamentary group|EFA}}

| {{EUPP data|parliamentary group|EFA}}

| parliamentary group of the European Free Alliance

{{EUPP data|public funding|EGP}}

| {{EUPP data|public funding|EGP}}

| public funding of the European Green Party

{{Sandbox other||

Category:Europe templates

}}