Template:Climate chart/sandbox: Difference between revisions
Thumperward (talk | contribs) hmmm |
|||
(43 intermediate revisions by 17 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{# |
<includeonly>{{#invoke:Climate chart|main}}</includeonly><noinclude> |
||
{{documentation}} |
|||
|<table class="infobox" style="width: 18.2em; float: {{{float|none}}}; clear: {{{clear|{{{float|none}}}}}}; text-align: center; border: solid 1px silver" cellspacing=0 cellpadding=0> |
|||
</noinclude> |
|||
<tr><th colspan=12 style="padding: 2px">[[Template: Climate chart/info|Climate chart]] for {{{1}}}</th></tr> |
|||
<tr><td><table class="infobox" style="width: 100%; margin: 0; float: {{{float|none}}}; clear: {{{clear|{{{float|none}}}}}}; text-align: center; border: none" cellspacing=0 cellpadding=0> |
|||
<tr><td>J</td><td>F</td><td>M</td><td>A</td><td>M</td><td>J</td><td>J</td><td>A</td><td>S</td><td>O</td><td>N</td><td>D</td></tr> |
|||
<tr> |
|||
<td>{{Climate chart/fahrenheit column i|{{{2}}}|{{{3}}}|{{{4}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column i|{{{5}}}|{{{6}}}|{{{7}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column i|{{{8}}}|{{{9}}}|{{{10}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column i|{{{11}}}|{{{12}}}|{{{13}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column i|{{{14}}}|{{{15}}}|{{{16}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column i|{{{17}}}|{{{18}}}|{{{19}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column i|{{{20}}}|{{{21}}}|{{{22}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column i|{{{23}}}|{{{24}}}|{{{25}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column i|{{{26}}}|{{{27}}}|{{{28}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column i|{{{29}}}|{{{30}}}|{{{31}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column i|{{{32}}}|{{{33}}}|{{{34}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column i|{{{35}}}|{{{36}}}|{{{37}}}}}</td> |
|||
</tr> |
|||
<tr><td colspan=12 style="padding: 2px; text-align: left; font-size: 88%; line-height: 1.5em; color: red">average temperatures in °F</td></tr> |
|||
<tr><td colspan=12 style="padding: 2px; text-align: left; font-size: 88%; line-height: 1.5em; color: blue">precipitation totals in inches</td></tr>{{#if:{{{source|}}}|<tr><td colspan=12 style="padding: 2px; text-align: left; font-size: 88%; line-height: 1.5em">''source: {{{source}}}''</td></tr>}} |
|||
</td></tr></table> |
|||
<tr><td colspan=12> |
|||
{{hidden |
|||
| header = Metric conversion |
|||
| style = margin: 0 |
|||
| content = <table class="infobox" style="width: 90%; margin: 0; float: {{{float|none}}}; clear: {{{clear|{{{float|none}}}}}}; text-align: center; border: none" cellspacing=0 cellpadding=0> |
|||
<tr><td>J</td><td>F</td><td>M</td><td>A</td><td>M</td><td>J</td><td>J</td><td>A</td><td>S</td><td>O</td><td>N</td><td>D</td></tr> |
|||
<tr> |
|||
<td>{{Climate chart/celsius column i|{{{2}}}|{{{3}}}|{{{4}}}}}</td> |
|||
<td>{{Climate chart/celsius column i|{{{5}}}|{{{6}}}|{{{7}}}}}</td> |
|||
<td>{{Climate chart/celsius column i|{{{8}}}|{{{9}}}|{{{10}}}}}</td> |
|||
<td>{{Climate chart/celsius column i|{{{11}}}|{{{12}}}|{{{13}}}}}</td> |
|||
<td>{{Climate chart/celsius column i|{{{14}}}|{{{15}}}|{{{16}}}}}</td> |
|||
<td>{{Climate chart/celsius column i|{{{17}}}|{{{18}}}|{{{19}}}}}</td> |
|||
<td>{{Climate chart/celsius column i|{{{20}}}|{{{21}}}|{{{22}}}}}</td> |
|||
<td>{{Climate chart/celsius column i|{{{23}}}|{{{24}}}|{{{25}}}}}</td> |
|||
<td>{{Climate chart/celsius column i|{{{26}}}|{{{27}}}|{{{28}}}}}</td> |
|||
<td>{{Climate chart/celsius column i|{{{29}}}|{{{30}}}|{{{31}}}}}</td> |
|||
<td>{{Climate chart/celsius column i|{{{32}}}|{{{33}}}|{{{34}}}}}</td> |
|||
<td>{{Climate chart/celsius column i|{{{35}}}|{{{36}}}|{{{37}}}}}</td> |
|||
</tr> |
|||
</td></tr> |
|||
<tr><td colspan=12 style="padding: 2px; text-align: left; font-size: 88%; line-height: 1.5em; color: red">average temperatures in °C</td></tr> |
|||
<tr><td colspan=12 style="padding: 2px; text-align: left; font-size: 88%; line-height: 1.5em; color: blue">precipitation totals in mm</td></tr></table>}} |
|||
</table> |
|||
|<table class="infobox" style="width: 18.2em; float: {{{float|none}}}; clear: {{{clear|{{{float|none}}}}}}; text-align: center; border: solid 1px silver" cellspacing=0 cellpadding=0> |
|||
<tr><th colspan=12 style="padding: 2px">[[Template: Climate chart/info|Climate chart]] for {{{1}}}</th></tr> |
|||
<tr><td><table class="infobox" style="width: 100%; margin: 0; float: {{{float|none}}}; clear: {{{clear|{{{float|none}}}}}}; text-align: center; border: none" cellspacing=0 cellpadding=0> |
|||
<tr><td>J</td><td>F</td><td>M</td><td>A</td><td>M</td><td>J</td><td>J</td><td>A</td><td>S</td><td>O</td><td>N</td><td>D</td></tr> |
|||
<tr> |
|||
<td>{{Climate chart/celsius column|{{{2}}}|{{{3}}}|{{{4}}}}}</td> |
|||
<td>{{Climate chart/celsius column|{{{5}}}|{{{6}}}|{{{7}}}}}</td> |
|||
<td>{{Climate chart/celsius column|{{{8}}}|{{{9}}}|{{{10}}}}}</td> |
|||
<td>{{Climate chart/celsius column|{{{11}}}|{{{12}}}|{{{13}}}}}</td> |
|||
<td>{{Climate chart/celsius column|{{{14}}}|{{{15}}}|{{{16}}}}}</td> |
|||
<td>{{Climate chart/celsius column|{{{17}}}|{{{18}}}|{{{19}}}}}</td> |
|||
<td>{{Climate chart/celsius column|{{{20}}}|{{{21}}}|{{{22}}}}}</td> |
|||
<td>{{Climate chart/celsius column|{{{23}}}|{{{24}}}|{{{25}}}}}</td> |
|||
<td>{{Climate chart/celsius column|{{{26}}}|{{{27}}}|{{{28}}}}}</td> |
|||
<td>{{Climate chart/celsius column|{{{29}}}|{{{30}}}|{{{31}}}}}</td> |
|||
<td>{{Climate chart/celsius column|{{{32}}}|{{{33}}}|{{{34}}}}}</td> |
|||
<td>{{Climate chart/celsius column|{{{35}}}|{{{36}}}|{{{37}}}}}</td> |
|||
</tr> |
|||
<tr><td colspan=12 style="padding: 2px; text-align: left; font-size: 88%; line-height: 1.5em; color: red">average temperatures in °C</td></tr> |
|||
<tr><td colspan=12 style="padding: 2px; text-align: left; font-size: 88%; line-height: 1.5em; color: blue">precipitation totals in mm</td></tr>{{#if:{{{source|}}}|<tr><td colspan=12 style="padding: 2px; text-align: left; font-size: 88%; line-height: 1.5em">''source: {{{source}}}''</td></tr>}} |
|||
</td></tr></table> |
|||
<tr><td colspan=12> |
|||
{{hidden |
|||
| header = Imperial conversion |
|||
| style = margin: 0 |
|||
| content = <table class="infobox" style="width: 90%; margin: 0; float: {{{float|none}}}; clear: {{{clear|{{{float|none}}}}}}; text-align: center; border: none" cellspacing=0 cellpadding=0> |
|||
<tr><td>J</td><td>F</td><td>M</td><td>A</td><td>M</td><td>J</td><td>J</td><td>A</td><td>S</td><td>O</td><td>N</td><td>D</td></tr> |
|||
<tr> |
|||
<td>{{Climate chart/fahrenheit column|{{{2}}}|{{{3}}}|{{{4}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column|{{{5}}}|{{{6}}}|{{{7}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column|{{{8}}}|{{{9}}}|{{{10}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column|{{{11}}}|{{{12}}}|{{{13}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column|{{{14}}}|{{{15}}}|{{{16}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column|{{{17}}}|{{{18}}}|{{{19}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column|{{{20}}}|{{{21}}}|{{{22}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column|{{{23}}}|{{{24}}}|{{{25}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column|{{{26}}}|{{{27}}}|{{{28}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column|{{{29}}}|{{{30}}}|{{{31}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column|{{{32}}}|{{{33}}}|{{{34}}}}}</td> |
|||
<td>{{Climate chart/fahrenheit column|{{{35}}}|{{{36}}}|{{{37}}}}}</td> |
|||
</tr> |
|||
</td></tr> |
|||
<tr><td colspan=12 style="padding: 2px; text-align: left; font-size: 88%; line-height: 1.5em; color: red">average temperatures in °F</td></tr> |
|||
<tr><td colspan=12 style="padding: 2px; text-align: left; font-size: 88%; line-height: 1.5em; color: blue">precipitation totals in inches</td></tr> |
|||
</table>}} |
|||
</table> |
|||
}}</includeonly><noinclude>{{doc}}<!-- place category and language links on /doc page, not here --></noinclude> |
Latest revision as of 23:25, 20 December 2024
This is the template sandbox page for Template:Climate chart (diff). See also the companion subpage for test cases. |
Before making any changes to the template, please first try your changes in the /sandbox and compare them on the /testcases page. The tested changes can then be added in one single edit to this template. |
This template uses Lua: |
This template can be used to create climate charts, with average monthly minimum and maximum temperatures.
How to read a climate chart
[edit]This help page is a how-to guide. It explains concepts or processes used by the Wikipedia community. It is not one of Wikipedia's policies or guidelines, and may reflect varying levels of consensus. |
Climate charts provide an overview of the climate in a particular place. The letters in the top row stand for months: January, February, etc. The bars and numbers convey the following information: The blue bars represent the average amount of precipitation (rain, snow etc.) that falls in each month. The blue numbers are the amount of precipitation in either millimeters (liters per square meter) or inches. The red numbers are the average daily high and low temperatures for each month, and the red bars represent the average daily temperature span for each month. The thin gray line is 0 °C or 32 °F, the point of freezing, for orientation.
Maribor, Slovenia | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Climate chart (explanation) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Labuan, Malaysia | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Climate chart (explanation) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Cusco, Peru | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Climate chart (explanation) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
As displayed in the accompanying chart, Maribor has a temperate climate with warm summers and chilly winters. It lies in the northern hemisphere, so the temperatures peak in July and August. The temperature in Labuan, which lies near the equator, hardly changes through the year. Instead of summers and winters, there is a dry season in the beginning of the year, followed by a wet season with high rainfall. Cusco also lies in the Tropical Zone, but at a much higher altitude in the Andean highlands, and also much drier. Almost like in Labuan, the daily high temperature barely changes through the year, but they are significantly cooler due to the altitude. Nights in Cusco are much colder than during the day, especially in the dry months from May to August.
Usage
[edit]- argument 1
- Appears in the heading
- arguments 2–37
- The data. Think of it as 12 rows, one for each month, with left column for average low temperature, middle column for average high temperature and right column for precipitation.
- maxprecip=
- Supply highest monthly precipitation number if the blue precipitation bars pop out of the chart (happens if any of the monthly numbers is greater than about 750 mm (30 in.))
- float=
- left, right or none.
- clear=
- left, right, both or none.
- source=
- Supply the source of your data
Empty syntax
[edit]{{climate chart
| <!--- India --->
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
|maxprecip = <!--- supply largest monthly precipitation, in case it's > 750 mm (30 in.) --->
|float = <!--- left, right, or none --->
|clear = <!--- left, right, both, or none --->
|units = <!--- set to "imperial" if the values are in °F and inches --->
|source = <!--- source of the data --->
}}
Units
[edit]In articles where SI units (°C, mm) are preferred, input the data in those units. This is the default state — no further parameters are needed. In articles where imperial units (°F, inches) are preferred, input data in those units and specify the parameter units=imperial (see below). This parameter must be used so that the units are labeled correctly and so the conversion is done properly.
Examples
[edit]Float: right
[edit]Amsterdam | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Climate chart (explanation) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
{{climate chart
| [[Amsterdam]]
|0.5|5.4|62.1
|0.2|6.0|43.4
|2.4|9.2|58.9
|4.0|12.4|41.0
|7.8|17.1|48.3
|10.4|19.2|67.5
|12.5|21.4|65.8
|12.3|21.8|61.4
|10.2|18.4|82.1
|7.0|14.1|85.1
|3.9|9.2|89.0
|1.9|6.2|74.9
|float=right
|clear=right
}}
Float: left
[edit]Bilbao | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Climate chart (explanation) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
{{climate chart
| [[Bilbao]]
|6|13|15
|6|14|15
|7|16|15
|8|17|17
|11|19|16
|14|22|12
|16|25|11
|16|25|11
|14|24|11
|12|21|15
|9|17|15
|7|14|14
|float=left
|source=[http://www.bbc.co.uk/weather/ BBC Weather]
}}
Non-float
[edit]Coober Pedy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Climate chart (explanation) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
{{climate chart
| [[Coober Pedy, South Australia|Coober Pedy]]
|20.7|36.4|17.4
|20.8|35.7|22.8
|18.2|32.8|12.9
|14|27.6|6.5
|10.1|23.3|13.1
|7.2|18.8|14.4
|6.3|18.7|7.8
|7.4|20.7|9.2
|10.1|24.5|8.4
|13.6|28.9|14.9
|16.6|32.1|11.6
|19.1|34.6|17.5
}}
Imperial units
[edit]Anchorage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Climate chart (explanation) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
{{climate chart
| [[Anchorage, Alaska|Anchorage]]
|9|22|.68
|12|26|.74
|18|34|.65
|29|44|.52
|39|55|.7
|47|62|1.06
|52|65|1.7
|49|63|2.93
|41|55|2.87
|28|40|2.09
|16|28|1.09
|11|24|1.05
|float=right
|clear=right
|units=imperial
}}
Large precipitation numbers (without re-scaling)
[edit]Baguio City, Philippines | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Climate chart (explanation) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
{{climate chart
|[[Baguio City, Philippines]]
|12 |22 |20
|13 |22 |20
|14 |24 |40
|15 |25 |100
|16 |24 |400
|16 |23 |430
|15 |21 |1070
|15 |21 |1160
|15 |21 |710
|15 |22 |380
|15 |23 |120
|13 |23 |50
|float=right
|clear=right
}}
Large precipitation numbers (with re-scaling)
[edit]Baguio City, Philippines | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Climate chart (explanation) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
{{climate chart
|[[Baguio City, Philippines]]
|12 |22 |20
|13 |22 |20
|14 |24 |40
|15 |25 |100
|16 |24 |400
|16 |23 |430
|15 |21 |1070
|15 |21 |1160
|15 |21 |710
|15 |22 |380
|15 |23 |120
|13 |23 |50
|maxprecip=1160
|float=right
|clear=right
}}
Values of |maxprecip=
less than or equal to 750 have no effect.