Template talk:Climate

From Wikivoyage
Jump to: navigation, search

Template:Climate formats simple climate info. Give it Metric or Imperial units of measure depending which is appropriate for the location you describe. This is part of Project:Climate Expedition.

 Climate Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Daily highs (°C) 9 6 7 18 19 20 19 18 17 16 15 14
Nightly lows (°C) -6 -3 -1 8 10 11 10 8 7 6 -2 -4
Precipitation (mm) 0 2 1 8 10 7 1 4 1 1 0 0
Snowfall (cm) - - - - - - - - - - - -
Sunshine (hrs/day) 9 10 11 11 12 13 13 12 11 11 10 9
Sea (°C) 13 13 13 14 14 15 15 16 14 13 13 13

Here type some descriptive text -- about the location's climate. No literal line breaks are permitted in this text but "<br/>"
and other correctly formatted html and wiki markup is okay, including nested templates -- Template:ForecastNOAA, or a normal wiki URL link, can give a 7 day forecast link.
See Palo Alto's 7 day forecast

Why this template[edit]

This is a refactor (script rewritten for simplification) and adjustment of Template:ClimateCelsius. This version works for Metric units and Imperial units, depending on what you set its 'units' parameter to. It has improved styling. It includes a text area at the bottom for brief text description of climate and or links to forecast sites.

See also Project:Climate Expedition and Template:ClimateCelsius and Template:ClimateFahrenheit


To include an equal sign (=) in a named template parameter may require some escaping of one kind or another.


  • You might put a URL containing an equal sign into [] like this: [http://example.com/me?something=xyz]
  • You might use a template containing just an equal sign (I have not tested this however): {{equal sign}}

Help understanding this stuff is at mediawiki.org and meta


I'd really like to understand why anyone thinks that left-aligning or center-aligning numbers, so that the digits don't line up at all, looks better. Sure, that's how HTML tables do it by default, so there are plenty of examples of lazily-coded tables like this on the web, but if you look at any spreadsheet program, you'll see that they right-align numeric values in columns. There's a reason for this, and if you think back to when you were learning how to add and subtract numbers above 9, you'll remember that it helped if the "ones" lined up, the "tens" lined up, etc. I'm seriously curious: why do you think that looks bad? And why do you think that having a column of numbers jumping to the left and right as you go down (especially when there are negative signs) doesn't look sloppy? - (WT-en) Todd VerBeek 10:23, 5 June 2007 (EDT)

When numbers are center aligned they jump neither to the left nor right but stay center aligned under the month at the top of the column that is their point of reference. That is the reason center aligned looks best here. Left or right alignment would space the numbers unevenly under that point of reference, the month header. How best to align the numbers depends on the kind of table one is preparing. Because this table is not a mathematical nor accounting spreadsheet, the decimal columns are not the primary point of reference here, the months at column tops are. This table is a presentation of relevant climactic conditions arranged in columns by month. Addition and subtraction is not expected here. It comes down to the purpose of the table and clean presentation of that purpose. I'm in sympathy with right aligned numbers in a math context. It is just that this isn't that. This is not expected to look right to a mathematician nor someone with a mathematical bias, but right and clear to the common traveler. Thank you for your concern, patience and understanding. Hope this helps. :-) (WT-en) Rogerhc 19:15, 5 June 2007 (EDT)

Unit display - any objections to displaying both Imperial and Metric?[edit]

I just reverted an addition of what at first appeared to be a duplicate climate table added to Grand Canyon by User:M.ye86, and afterwards realized that the user was adding a Celsius version of the existing Fahrenheit data. The current template already automatically converts the underlying data, but it is displayed only in a mouseover, so would there be any objection to just modifying the template to display both at once? If that was done then we would have six rows where now there are three on Grand Canyon#South Rim. Alternately we could try to squeeze everything into the existing three rows, but I think that would make the template too wide. Note that Wikivoyage:Measurements#Provide conversions seems to support the idea that both formats should be displayed. -- Ryan • (talk) • 17:12, 1 July 2015 (UTC)

Isn't it possible to put the preferred unit type (imperial/metric) in the User Preferences as a setting OR use a user's IP location to show the right units? --M.ye86 (talk) 18:44, 1 July 2015 (UTC)
There isn't a straightforward way of displaying different article content for different users that I'm aware of. It could potentially be done using a Javascript solution, but that seems like overkill to me for this specific use case. -- Ryan • (talk) • 13:16, 2 July 2015 (UTC)

Should we return the right-alignment of the climate table?[edit]

You-know-who recently removed some parameters on this template, and the climate table now sits on the left side in articles. I think this messes up the formatting (creating an ugly blank space to the right of the climate box) and would suggest reverting the edit. ϒpsilon (talk) 13:40, 14 September 2015 (UTC)

Yes, definitely. I don't think this will be controversial. I will simply revert his edit. Ikan Kekek (talk) 20:37, 14 September 2015 (UTC)

Daylight or sunshine hours?[edit]

I have edited quite a lot of weather boxes in Wikipedia and I am transferring them to wikivoyage where the weather section is not that developed for most cities. For the sunshine parameter, it says daylight but I think this is inaccurate since it is referring to the theoretical amount of sunshine each place receives in a month (see the page on Daylight on Wikipedia). I suggest changing it to sunshine hours/day since this information is what many tourists look into. Ssbbplayer (talk) 02:51, 19 February 2016 (UTC)

Climate box not rendered as part of PDFs and Wiki books. Can someone fix?[edit]

Hi there ... somehow this template does not appear as part of an article when the article is rendered into a PDF or exported as a book - just check it out. Could someone fix this clitch? Cheers Ceever (talk) 15:06, 31 March 2017 (UTC)

I have raised the more general issue in the pub (the bottom-most conversation) I ask you to please refrain from converting boxes to flowing text until this issue is addressed there. Hobbitschuster (talk) 15:17, 31 March 2017 (UTC)
For climate I understand. Nevertheless, just note that the usage of some flowing text boxes is quite arbitrary. And often warnings actually are supposed to be mentioned under stay safe or such. Be assured I will not convert all such boxes into regular subchapters, especially when the information is of temporary nature. However, we have a given structure of chapters and information (as discussed just lately), which we should use to give the traveller a common and constant experience. Ceever (talk) 07:20, 1 April 2017 (UTC)
User:Ceever, I strongly urge you to participate in the discussion here in order to not have this fractured over several different places. Hobbitschuster (talk) 15:29, 1 April 2017 (UTC)

Use of { {Climate} } and Source & Attribution For The Information/Data[edit]

Swept in from the pub

Climate box (the { {climate} } template). I notice that Wikipedia where it provides its { { weatherbox } } acknowledges a source for the data. I assume most climate data is "owned" by somebody. For example Leeds has a { { climate } } with what I'd guess is UK Met Office data. Wikipedia has a { {weatherbox } for the same city. The Wikipedia one acknowledges the source. Very useful data for WV and a great feature but how does one stand taking such information from e.g. the UK Met Office web site, particularly without attribution?

Reason for raising it: I think is is so useful I'd like to add some to other cities but I don't want to start major issues where maybe I shouldn't (or should add something) or can we just take the data from Wikimedia and if so should we also add the source link to the "description" of the { {climate} } PsamatheM (talk) 16:38, 1 May 2017 (UTC)

The climate data is not copyright protected (as it is just data). Systematically using climate data from any one source would perhaps violate the EU database right, but usage in a few places is no problem. Thus attribution is not needed for legal reasons, unless I have missed something. Wikipedia needs attribution for any fact for verifiability, but that is not an issue for us. We can attribute the data out of courtesy or to give a link to further information, otherwise an HTML comment would probably be enough (handy for updating). --LPfi (talk) 16:36, 2 May 2017 (UTC)

Rainy days[edit]

Do we have anyone onboard who is proficient with templates? In Wikipedia's climate tables there is a row with average rainy days per month and I think this would be very useful in our template as well. ϒpsilon (talk) 18:29, 17 November 2017 (UTC)