Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Naar inhoud springen

Sjabloon:Luchthaven-statistieken: verschil tussen versies

Uit Wikipedia, de vrije encyclopedie
Verwijderde inhoud Toegevoegde inhoud
k Bdijkstra heeft pagina Sjabloon:Luchthaven-Statistieken hernoemd naar Sjabloon:Luchthaven-statistieken: is geen eigennaam
Bouzinac (overleg | bijdragen)
Geen bewerkingssamenvatting
Regel 6: Regel 6:
// traductions==> https://commons.wikimedia.org/wiki/Data:I18n/Template:Airport-Statistics.tab
// traductions==> https://commons.wikimedia.org/wiki/Data:I18n/Template:Airport-Statistics.tab


Dernière version : 19 FEB 2021
Dernière version : 03 FEV 2023
-->
-->
<!--en
<!--en
Regel 14: Regel 14:
if you find something wrong in Wikidata for an airport, please change number on the wikidata for this airport : it will automatically show the right value among the wikis.
if you find something wrong in Wikidata for an airport, please change number on the wikidata for this airport : it will automatically show the right value among the wikis.
// Template translations are in https://commons.wikimedia.org/wiki/Data:I18n/Template:Airport-Statistics.tab
// Template translations are in https://commons.wikimedia.org/wiki/Data:I18n/Template:Airport-Statistics.tab
Last version : 19 FEB 2021
Last version : 03 FEV 2023
-->
-->
<includeonly>
<includeonly>
{{Graph:Lines
{{Graph:Lines
| tabletype=query | table=# Scroll down and hit blue arrow down to run and see the results + the sources
| tabletype=query
| table=# Scroll down and hit blue arrow down to run and see the results + the sources
SELECT ?year ?item ?itemLabel (MAX(?number) AS ?passengers)
SELECT ?year ?item ?shortname (MAX(?number) AS ?passengers) (SAMPLE(COALESCE(?reference_URL, ?monthly_reference_URL2)) AS ?sample_reference_URL)
(SAMPLE(COALESCE(?reference_URL, ?monthly_reference_URL2)) AS ?sample_reference_URL)
WITH
WITH
{ SELECT ?item ?statement ?date ?year ?timevalue ?numberperperiod ?reference_URL
{
WHERE {
SELECT ?item ?statement ?date ?year ?timevalue ?numberperperiod ?reference_URL
WHERE
{
?item wdt:{{#if: {{{iata|}}} |P238|}}{{#if: {{{icao|}}} |P239|}}{{#if: {{{faa|}}} |P240|}} ?airport_code
?item wdt:{{#if: {{{iata|}}} |P238|}}{{#if: {{{icao|}}} |P239|}}{{#if: {{{faa|}}} |P240|}} ?airport_code
VALUES ?airport_code
VALUES ?airport_code
{ "{{#invoke:String|replace|{{uc:{{{iata|}}}{{{icao|}}}{{{faa|}}}}}| |" "||}}" }
{
"{{#invoke:String|replace|{{{iata|}}}{{{icao|}}}{{{faa|}}}| |" "||}}"
}
?item p:P3872 ?statement.
?item p:P3872 ?statement.
?statement pqv:P585 ?timevalue;
?statement pqv:P585 ?timevalue; ps:P3872 ?numberperperiod.
ps:P3872 ?numberperperiod.
?timevalue wikibase:timeValue ?date.
?timevalue wikibase:timeValue ?date.
OPTIONAL { ?statement pq:P518 ?applies. }
OPTIONAL { ?statement pq:P518 ?applies. }
Regel 40: Regel 35:
MINUS { ?statement wikibase:rank wikibase:DeprecatedRank }
MINUS { ?statement wikibase:rank wikibase:DeprecatedRank }
BIND (YEAR(?date) AS ?year)
BIND (YEAR(?date) AS ?year)
FILTER (?year >{{{début|1949}}}).
FILTER (?year >{{{début|1949}}}). FILTER (?year < YEAR(NOW()))
FILTER (?year < YEAR(NOW()))
}
}
} AS %airport
} AS %airport
WHERE
WHERE
{ { # Get the sum of monthly values within a year
{
{
# Get the sum of monthly values within a year
SELECT ?item ?year (SUM(?max_numberperperiod) AS ?number) (SAMPLE(?monthly_reference_URL) AS ?monthly_reference_URL2)
SELECT ?item ?year (SUM(?max_numberperperiod) AS ?number) (SAMPLE(?monthly_reference_URL) AS ?monthly_reference_URL2)
WHERE
WHERE
{ # Get the maximal value and a sample reference URL for each unique month
{
{ SELECT ?item ?year (MAX(?numberperperiod) AS ?max_numberperperiod) (SAMPLE(?reference_URL) AS ?monthly_reference_URL)
# Get the maximal value and a sample reference URL for each unique month
{
SELECT ?item ?year (MAX(?numberperperiod) AS ?max_numberperperiod) (SAMPLE(?reference_URL) AS ?monthly_reference_URL)
WHERE
WHERE
{
{ INCLUDE %airport
INCLUDE %airport
?timevalue wikibase:timePrecision ?prec.
?timevalue wikibase:timePrecision ?prec.
FILTER (?prec > 9)# precision more precise or equal to month
FILTER (?prec > 9)# precision more precise or equal to month
} GROUP BY ?item ?year ?date } } GROUP BY ?item ?year }
}
GROUP BY ?item ?year ?date
}
}
GROUP BY ?item ?year
}
UNION
UNION
{
{
Regel 71: Regel 55:
BIND (?reference_URL AS ?sample_reference_URL)
BIND (?reference_URL AS ?sample_reference_URL)
INCLUDE %airport
INCLUDE %airport
}
}
OPTIONAL {?item wdt:P1813 ?this. # has shortname
SERVICE wikibase:label { bd:serviceParam wikibase:language "{{CONTENTLANGUAGE}}". }
FILTER(LANG(?this)="{{CONTENTLANGUAGE}}") }
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],{{CONTENTLANGUAGE}},en". ?item rdfs:label ?itemLabel.}
GROUP BY ?item ?itemLabel ?year
BIND(COALESCE(?this,?itemLabel) as ?shortname)
ORDER BY ?item DESC (?year)
} GROUP BY ?item ?shortname ?year ORDER BY ?item DESC (?year)
|yGrid=true
|yGrid=true
|legend={{#ifexpr:{{#invoke:String|len|{{{iata|}}}{{{icao|}}}{{{faa|}}}}}>4|-|}}
|legend={{#ifexpr:{{#invoke:String|len|{{{iata|}}}{{{icao|}}}{{{faa|}}}}}>4|-|}}
|group=itemLabel
|group=shortname
|yAxis={{#invoke:TNT|msg|I18n/Template:Airport-Statistics.tab|passengers}}
|yAxis={{#invoke:TNT|msg|I18n/Template:Airport-Statistics.tab|passengers}}
|yAxisFormat=.1s
|yAxisFormat=.1s
| yZero=false
| yZero=true
| value=passengers| type=year | xField=year|width={{{width|540}}}
| value=passengers| type=year | xField=year|width={{{width|540}}}
| title={{#if: {{{titre|}}} |{{{titre|}}}|
| title={{#if: {{{titre|}}} |{{{titre|}}}|

Versie van 12 feb 2023 17:05

Geen beschrijving.

Sjabloonparameters[Sjabloongegevens bewerken]

Dit sjabloon heeft een aangepaste opmaak.

ParameterBeschrijvingTypeStatus
IATA-luchthavencodeiata IATA

geen beschrijving

Onbekendvoorgesteld
ICAO-luchthavencodeicao

geen beschrijving

Tekenreeksoptioneel
FAA-luchthavencodefaa

FAA-luchthavencode

Tekenreeksoptioneel
Start jaardébut start

start jaar

Voorbeeld
2000
Getaloptioneel
Breedtewidth Breedte

Breedte

Getaloptioneel
Titeltitre

titel

Onbekendoptioneel