Toggle menu
243,8 tis.
103
18
640,1 tis.
Hrvatska internetska enciklopedija
Toggle preferences menu
Toggle personal menu
Niste prijavljeni
Your IP address will be publicly visible if you make any edits.

Predložak:Aerodrom-Statistika/doc: razlika između inačica

Izvor: Hrvatska internetska enciklopedija
m bnz
Nema sažetka uređivanja
 
Redak 1: Redak 1:
{{dokumentacijska podstranica}}
==Primjeri==
==Primjeri==
<pre>{{Aerodrom-Statistika|iata=PUY ZAG}}</pre>
<pre>{{Aerodrom-Statistika|iata=PUY ZAG}}</pre>

Posljednja izmjena od 23. travanj 2025. u 01:55

Primjeri

{{Aerodrom-Statistika|iata=PUY ZAG}}


<graph> {

 //
 // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:Lines
 //            Please do not modify it anywhere else, as it may get copied and override your changes.
 //            Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:Lines
 //
 // Template translation is in https://commons.wikimedia.org/wiki/Data:Original/Template:Graphs.tab
 //
 "version": 2,
 "width": 540,
 "height": 300,
 "padding": "strict",
 "signals": [{"name": "rightwidth", "expr": "width + padding.right"}],
 "data": [{
   "name": "chart",

"url": "wikidatasparql:///?query=%23%20Scroll%20down%20and%20hit%20blue%20arrow%20down%20to%20run%20and%20see%20the%20results%20%2B%20the%20sources%0ASELECT%20%3Fyear%20%3Fitem%20%3FitemLabel%20%28MAX%28%3Fnumber%29%20AS%20%3Fpassengers%29%0A%20%20%28SAMPLE%28COALESCE%28%3Freference_URL%2C%20%3Fmonthly_reference_URL2%29%29%20AS%20%3Fsample_reference_URL%29%0AWITH%0A%7B%0A%20%20SELECT%20%3Fitem%20%3Fstatement%20%3Fdate%20%3Fyear%20%3Ftimevalue%20%3Fnumberperperiod%20%3Freference_URL%0A%20%20WHERE%0A%20%20%7B%0A%20%20%20%20%3Fitem%20wdt%3AP238%20%3Fairport_code%0A%20%20%20%20VALUES%20%3Fairport_code%20%0A%20%20%20%20%7B%0A%20%22PUY%22%20%22ZAG%22%0A%20%20%20%20%7D%0A%20%20%20%20%3Fitem%20p%3AP3872%20%3Fstatement.%0A%20%20%20%20%3Fstatement%20pqv%3AP585%20%3Ftimevalue%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20ps%3AP3872%20%3Fnumberperperiod.%0A%20%20%20%20%3Ftimevalue%20wikibase%3AtimeValue%20%3Fdate.%0A%20%20%20%20OPTIONAL%20%7B%20%3Fstatement%20pq%3AP518%20%3Fapplies.%20%7D%0A%20%20%20%20OPTIONAL%20%7B%20%3Fstatement%20prov%3AwasDerivedFrom%20%2F%20%28pr%3AP854%7Cpr%3AP4656%29%20%3Freference_URL.%20%7D%0A%20%20%20%20FILTER%20%28BOUND%28%3Fapplies%29%3Dfalse%20%7C%7C%20%3Fapplies%20%3D%20wd%3AQ2165236%20%29%0A%20%20%20%20MINUS%20%7B%20%3Fstatement%20wikibase%3Arank%20wikibase%3ADeprecatedRank%20%7D%0A%20%20%20%20BIND%20%28YEAR%28%3Fdate%29%20AS%20%3Fyear%29%0A%20%20%20%20FILTER%20%28%3Fyear%20%3E1949%29.%0A%20%20%20%20FILTER%20%28%3Fyear%20%3C%20YEAR%28NOW%28%29%29%29%0A%20%20%7D%0A%7D%20AS%20%25airport%0AWHERE%0A%7B%0A%20%20%7B%0A%20%20%20%20%23%20Get%20the%20sum%20of%20monthly%20values%20within%20a%20year%0A%20%20%20%20SELECT%20%3Fitem%20%3Fyear%20%28SUM%28%3Fmax_numberperperiod%29%20AS%20%3Fnumber%29%20%28SAMPLE%28%3Fmonthly_reference_URL%29%20AS%20%3Fmonthly_reference_URL2%29%0A%20%20%20%20WHERE%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%23%20Get%20the%20maximal%20value%20and%20a%20sample%20reference%20URL%20for%20each%20unique%20month%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20SELECT%20%3Fitem%20%3Fyear%20%28MAX%28%3Fnumberperperiod%29%20AS%20%3Fmax_numberperperiod%29%20%28SAMPLE%28%3Freference_URL%29%20AS%20%3Fmonthly_reference_URL%29%0A%20%20%20%20%20%20%20%20WHERE%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20INCLUDE%20%25airport%0A%20%20%20%20%20%20%20%20%20%20%3Ftimevalue%20wikibase%3AtimePrecision%20%3Fprec.%0A%20%20%20%20%20%20%20%20%20%20FILTER%20%28%3Fprec%20%3E%209%29%23%20precision%20more%20precise%20or%20equal%20to%20month%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20GROUP%20BY%20%3Fitem%20%3Fyear%20%3Fdate%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20GROUP%20BY%20%3Fitem%20%3Fyear%0A%20%20%7D%0A%20%20UNION%0A%20%20%7B%0A%20%20%20%20%3Ftimevalue%20wikibase%3AtimePrecision%209%20.%0A%20%20%20%20BIND%20%28%3Fnumberperperiod%20AS%20%3Fnumber%29%0A%20%20%20%20BIND%20%28%3Freference_URL%20AS%20%3Fsample_reference_URL%29%0A%20%20%20%20INCLUDE%20%25airport%0A%20%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22hr%22.%20%7D%0A%7D%0AGROUP%20BY%20%3Fitem%20%3FitemLabel%20%3Fyear%0AORDER%20BY%20%3Fitem%20DESC%20%28%3Fyear%29",

   "format": {"type": "json"


   },
   "transform": [
     // Convert xField parameter into a field "_xfield"
     {"type": "formula", "field": "_xfield", "expr":

"datetime(datum.year, 0, 1)"

     }
     , {"type": "sort", "by": ["_xfield"]}

, {"type": "formula", "field": "_yfield", "expr": "datum.passengers" }

   ]
 },
 ],
 "scales": [
   {
     "name": "x",
     "type": "time",
     "domain": {"data": "chart", "field": "_xfield"},
     "range": "width",


   },
   {
     "name": "y",
     "type": "linear",
     "range": "height",
     "domain": {"data": "chart", "field": "_yfield"},

"zero": false,


   },
   {
     "name": "color",
     "type": "ordinal",
     "range": "category10", 
     "domain": {"data": "chart", "field": "itemLabel"}
   },
 ],

"legends": [{

   "fill": "color",
   "stroke": "color",


 }],
 "axes": [
   {"scale": "x", "type": "x", "tickSizeEnd": 0

, "ticks": 7


},

   {"scale": "y", "type": "y", "tickSizeEnd": 0

, "title": "Lua pogreška: Modul:TNT:172: '''Missing JsonConfig extension, or not properly configured; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Template:Airport-Statistics.tab. See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates'''." , "format": ".1s" , "grid": true }

 ],
 "marks": [
   // Group data by the group parameter or "key", and draw lines, one line per group
   {
     "type": "group",
     "from": {
       "data": "chart",
       "transform": [{"type": "facet", "groupby": ["itemLabel"]}]
     },
     "marks": [
       {
         "type": "line",
         "properties": {
           "enter": {
             "y": {"scale": "y", "field": "_yfield"},
             "x": {"scale": "x", "field": "_xfield"},
             "stroke": {"scale": "color", "field": "itemLabel"},
             "interpolate": {"value": "monotone"},
             "strokeWidth": {"value": 2.5}
           }
         }
       }
     ],
   }

// Draw title at the top of the graph , {

     "type": "text",
     "properties": {
       "enter": {
         "x": {"signal": "rightwidth", "mult": 0.5},
         "y": {"value": -15},
         "text": {"value": "Lua pogreška: Modul:TNT:172: '''Missing JsonConfig extension, or not properly configured;

Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Template:Airport-Statistics.tab. See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates'''. Lua pogreška: Modul:TNT:172: '''Missing JsonConfig extension, or not properly configured; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Template:Airport-Statistics.tab. See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates'''. PUY ZAG Lua pogreška: Modul:TNT:172: '''Missing JsonConfig extension, or not properly configured; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Template:Airport-Statistics.tab. See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates'''."},

         "fontWeight": {"value": "bold"},
         "align": {"value": "center"},
         "baseline": {"value": "bottom"},
         "fill": {"value": "#000"}
       }
     }
   }
 ]

} </graph> Lua pogreška: Modul:TNT:172: '''Missing JsonConfig extension, or not properly configured; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab. See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates'''..


<templatedata> { "params": { "iata": { "aliases": [ "IATA" ], "label": "IATA kod", "type": "string", "suggested": true }, "icao": { "aliases": [ "ICAO" ], "label": "ICAO kod", "type": "string" }, "faa": { "aliases": [ "FAA" ], "label": "FAA kod", "type": "string" }, "début": { "aliases": [ "godina" ], "label": "Početna godina", "example": "2000", "type": "number" }, "width": { "aliases": [ "širina" ], "label": "širina", "type": "number" }, "titre": { "aliases": [ "titula" ], "label": "Titula" } } } </templatedata>

Sadržaj