Template talk:Climate

Latest comment: 5 months ago by LPfi in topic Citations for climate charts

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
Climate chart (explanation)
JFMAMJJASOND
 
 
 
0
0
 
 
9
−6
 
 
 
0
2
 
 
6
−3
 
 
 
0
1
 
 
7
−1
 
 
 
0
8
 
 
18
8
 
 
 
0
10
 
 
19
10
 
 
 
0
7
 
 
20
11
 
 
 
0
1
 
 
19
10
 
 
 
0
4
 
 
18
8
 
 
 
0
1
 
 
17
7
 
 
 
0
1
 
 
16
6
 
 
 
0
0
 
 
15
−2
 
 
 
0
0
 
 
14
−4
Average max. and min. temperatures in °C
Precipitation+Snow totals in mm
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
Imperial conversion
JFMAMJJASOND
 
 
 
0
0
 
 
48
21
 
 
 
0
0.1
 
 
43
27
 
 
 
0
0
 
 
45
30
 
 
 
0
0.3
 
 
64
46
 
 
 
0
0.4
 
 
66
50
 
 
 
0
0.3
 
 
68
52
 
 
 
0
0
 
 
66
50
 
 
 
0
0.2
 
 
64
46
 
 
 
0
0
 
 
63
45
 
 
 
0
0
 
 
61
43
 
 
 
0
0
 
 
59
28
 
 
 
0
0
 
 
57
25
Average max. and min. temperatures in °F
Precipitation+Snow totals in inches


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

Note edit

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

Example:

  • 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

Alignment edit

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 Wiki Travel:Measurements#Provide conversions seems to support the idea that both formats should be displayed. -- Ryan • (talk) • 17:12, 1 July 2015 (UTC)Reply

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)Reply
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)Reply

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)Reply

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)Reply

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)Reply

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)Reply

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)Reply
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)Reply
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)Reply

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)Reply

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)Reply

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)Reply

Untested edits edit

Andree.sk has been editing this template to output a fancy-looking bar chart rather than a plain text table.

While this is a great idea that could really improve the look and usability of this template, it must be developed and tested elsewhere, not applied directly to the live template! It should be obvious that changing a template used on close to 1000 pages without any testing is not an appropriate way to make such a change.

These changes so far are broken in multiple ways. They output verbose errors that completely break the HTML if there are any non-numeric values, such as "-" instead of "0" to visually indicate "no precipication" or "no snow". (This is visible even on the example at the top of this Talk page!) The sizing and formatting of the bar chart is also not very robust, and on Snowshoe (after I edited the data to use 0s instead of hyphens) it creates bars which extend far above the bounds of the box.

@Andree.sk: This is a great idea, and I encourage you to keep trying. But you need to do this work on a sandbox page first, and develop a bunch of test cases to show that it will generate proper output for a variety of inputs. It needs to work with a wide variety of data: very hot, very cold, very wet, very dry, etc. Once you have it fully tweaked and tested, then we can apply your improvements to this template, but not before then. --Bigpeteb (talk) 16:48, 24 August 2018 (UTC)Reply

I tested it quite a bit, actually ({{Climate/sandbox}}) - and since there was no more feedback on the Pub, I went forward... I don't know what kinds of abominations are spread across use of this template, didn't see those on the ~ 40-50 random pages I checked. Only thing was the zero precipitation, I wanted to first discuss on pub, how to deal with it (hide the bars, or update all uses of the template to contain the data?) And actually that was the point, to get some additional feedback.
Thanks for that, but next time I'd rather get some constructive feedback (=at least prepare the tests or even better fix the issues). Otherwise it's quite depressing to single-handedly work on these improvements, only to get "accused of not testing stuff". Anyway, I'll have a look on it... Andree.sk (talk) 18:46, 24 August 2018 (UTC)Reply
@Bigpeteb: regarding the over-the-top graphs, it's unfortunately standard behavior of the template (which is taken from wikipedia, and improved a tiny bit). In these cases maxprecip= (here e.g. maxprecip=60) parameter must be given to scale the bars. I don't think this can be reasonably fixed (except for some brutal copy-pasting, since we seem to be missing some useful extensions here, like Extension:Variables), unless I rewrite it to Lua - which I don't really feel like doing right now (the stuff is fragile as it is, and at least some editors here understand the template stuff)... Andree.sk (talk) 19:13, 24 August 2018 (UTC)Reply
Fair enough, sorry I jumped on you so quickly. I haven't been keeping up with the Pub so I hadn't seen the prior discussion. I simply looked at the history of this template and saw half a dozen edits progressively editing the template in place to implement this feature. That and there's no discussion here about any such changes to the template, so I jumped to the wrong conclusion that it was done hastily by someone without much experience.
If you can provide a link to where you're keeping your test cases and development copy of the template, I'd be happy to fill in some test cases.
It would also be helpful to create a new section in this Talk page describing the changes so there's an obvious place for people to point out any problems they find. --Bigpeteb (talk) 20:24, 24 August 2018 (UTC)Reply
@Bigpeteb:, I have put a few tests here: User:Andree.sk/sandbox/climate_test. I'm not sure I can fix the minus thing (last test) easily, and since there only seem to be 4 articles currently using it (Cincinnati, Minneapolis, Detroit and Snowshoe), I'd say we just replace those with zeros and that's that. What do you say? Regarding the over-the-top thing, I see the following (where the scaling param needs to be added): Changwon, Chittagong, Geoje, Gimhae, Milford Sound, Suncheon, Yeosu and (imperial) Snowshoe. Did you some other examples of errors? Unfortunately, I have no idea how to get some 'log of template errors' :-( Andree.sk (talk) 10:42, 25 August 2018 (UTC)Reply

Putting graphs in Template:Climate edit

Swept in from the pub
Climate chart with graph

I have seen that there was a small discussion in here more than a year ago but it was suggested at a late stage that didn't go anywhere with few participants, or an earlier discussion from 3 years ago.

I'm curious as to why the present template for climate is all text and numbers but no graphs. Why aren't we having graphs like the one to the right? My day time job is a climatologist and it is always simpler for humans to compare between graphs at a glance rather than compare the numbers in a table. Take our department's climate data for Toronto as example. Our first tab is always the graph because it gets the message across easily. Only if you want to get nitty and gritty part then you will find the table in second tab.

Since the code is already available in wiki format, we can easily lift it for our use. Those who prefer numbers still have access to it in the graph, while those who are visual learners can benefit tremendously from this addition. OhanaUnitedTalk page 04:16, 7 August 2018 (UTC) Addendum: I wanted to get clarity because Template:Climate chart says "This new template [from 2014] should be discussed on its talk page to explain its purpose and build consensus for usage on the site. Until there is a consensus to keep the template it should not be added to more than one low-visibility article (as an example of usage)..." OhanaUnitedTalk page 20:09, 7 August 2018 (UTC)Reply

I think it has not been implemented because most editors don't have any problems with the current climate template. Also, while the new template gives out more information at a glance, it does take up more space vertically. ϒpsilon (talk) 05:01, 7 August 2018 (UTC)Reply
If I understand correctly, shouldn't traveller comes first? I placed the currently version of the template for Seoul as comparison so everyone can take a look between the graph and the box. The graph gives you a context and scale. At a glance with the box, you wouldn't pick out easily that July and August had the most rain (by a factor of 3) comparing to other months. But the graph shows it right away. Not to mention that one-click expansion gives you the unit conversion to imperial units for our American visitors. Space-wise, while you accurately described the graph taking up more vertical space, you didn't mention that the box takes up more horizontal space.
Climate
Climate chart (explanation)
JFMAMJJASOND
 
 
 
21
 
 
2
−6
 
 
 
25
 
 
5
−3
 
 
 
47
 
 
10
2
 
 
 
65
 
 
18
8
 
 
 
106
 
 
23
13
 
 
 
133
 
 
27
18
 
 
 
395
 
 
29
22
 
 
 
364
 
 
30
22
 
 
 
169
 
 
26
17
 
 
 
52
 
 
20
10
 
 
 
53
 
 
12
3
 
 
 
22
 
 
4
−3
Average max. and min. temperatures in °C
Precipitation+Snow totals in mm
Korea Meteorological Administration
Imperial conversion
JFMAMJJASOND
 
 
 
0.8
 
 
35
21
 
 
 
1
 
 
40
26
 
 
 
1.9
 
 
51
35
 
 
 
2.5
 
 
64
46
 
 
 
4.2
 
 
73
56
 
 
 
5.2
 
 
81
65
 
 
 
16
 
 
83
71
 
 
 
14
 
 
85
72
 
 
 
6.7
 
 
78
63
 
 
 
2
 
 
68
51
 
 
 
2.1
 
 
53
38
 
 
 
0.8
 
 
40
26
Average max. and min. temperatures in °F
Precipitation+Snow totals in inches
OhanaUnitedTalk page 05:48, 7 August 2018 (UTC)Reply
Taking up horizontal space is not really a problem, but we've recently discussed the issues with infoboxes in country articles taking up much horizontal space, and together with region maps that likewise are located in the top of the article they've been forcing all photos (in the case of small countries with short articles) far below where they should be. That problem was luckily solved.
To make it clear, I don't oppose replacing the climate template. I expected the new chart would grow huge when inserted in articles with very much rain but apparently it doesn't.
But, if the community decides we should start using the new chart, someone needs to make sure that they're changed in all articles that have climate tables. ϒpsilon (talk) 06:31, 7 August 2018 (UTC)Reply
On the first look, it seems we could replace {{Climate}} with w:Template:Climate_chart relatively straight-forward-ly (so it'd be fixed everywhere 'for free'). Andree.sk (talk) 06:38, 7 August 2018 (UTC)Reply
I'd support the graph anytime. We don't really have an "real-estate issue" with WV, IMO. I'd say it's the contrary even - esp. on the modern wide-screen desktops the text is really unpleasant to read. In any case, as you said - from the graph, it's immediately obvious when the "best season" is - compared to very hard-to-read table. Andree.sk (talk) 06:38, 7 August 2018 (UTC)Reply
Note - I fixed the WP Climate_chart (sub-)template, now it seems to print fine. This was one of the blockers back then, so perhaps User:RolandUnger and User:Andrewssi2 will be interested? Andree.sk (talk) 15:25, 7 August 2018 (UTC)Reply
I checked several pages on Android that uses the existing box (since that's the biggest "real-estate issue") and it causes page alignment issue. Anchorage and Adelaide 's climate box spills out to the left and you wouldn't see the text for "Daily high", "Daily low" and "Precipitation". Aarhus's climate box spills out to the right and you can scroll to see the furthest right, but you also scrolled the entire page at the same time. But if I go to w:Aarhus that uses climate chart, the mobile version gives me a scrollbar within the template. So from a mobile standpoint, the graph is also superior to the box. OhanaUnitedTalk page 20:04, 7 August 2018 (UTC)Reply
I agree with this proposal, graphs are much easier to interpret than individual numbers. I would suggest to check how graphs come out when articles are printed however (for users who prefer to print articles instead of reading them on digital devices). ArticCynda (talk) 07:24, 7 August 2018 (UTC)Reply
I also support the graphs. Much more visually appealing. Thanks to Ohana United for this. Ground Zero (talk) 11:36, 7 August 2018 (UTC)Reply
I personally am particular to the Walter+Lieth type of diagram, but the graphic style proposed above certainly beats numbers... this is what Walter+Lieth looks like Hobbitschuster (talk) 11:49, 7 August 2018 (UTC)Reply
I was about to propose the same, as the Walter/Lieth style allows for very quick identificaton of humid/arid periods. There doesn't seem to be anything about this on en.wikipedia, but this page gives a pretty good quick introduction. Downside is of course, that there doesn't seem to be an already-existing template for this. --El Grafo (talk) 11:55, 7 August 2018 (UTC)Reply
So fancy! This looks much better than what exists currently. DethDestroyerOfWords (talk) 18:50, 7 August 2018 (UTC)Reply
+1 for graphs PsamatheM (talk) 19:36, 7 August 2018 (UTC)Reply
Agree with the above. As a general comment, Wiki Travel tends to be text heavy and light on visuals/graphics compared to other travel guides. This will go some way towards fixing the imbalance. Gizza (roam) 21:46, 7 August 2018 (UTC)Reply
I think we should also establish which graph to use. Hobbitschuster (talk) 22:39, 7 August 2018 (UTC)Reply
While the Walter+Lieth is technically superior to the WP style, it took me a good while to understand how it works (saw it for the 1st time, too) - and I am relatively technically skilled, IMHO. The WP style is commonly used in mobile apps and on web, so I'd say most of the visitors would be very familiar with it. And finally, we have an implementation of the WP style readily available. Andree.sk (talk) 05:21, 8 August 2018 (UTC)Reply
I like the idea of a graph. Could typical hotter (>30 °C/85 °F) or cooler (?) ranges be lightly highlighted in the background, so that it's easier to get an idea of how hot or cold those numbers are? WhatamIdoing (talk) 00:50, 8 August 2018 (UTC)Reply
Of course, (good) graphs can be read easier and faster at least on smartphones. However, a graph should be visible on all devices but the graph shown above cannot be printed because div-tag background colors are omitted in print which are used for the bars. To prevent excess editing work and time we have to develop a method of implementation firstly. Contrary to the map development we have to cooperate with Wikipedians because they have the same need. Three problems must be solved: (1) where and how to store the climate data? There are two possible repositories: Wikidata or Commons (for instance as JSON data as it is done for map data). (2) We need a Lua application interface to fetch these data into the wiki (Wikidata: a simple one is available; Commons: not yet available). (3) Conversion to a png or svg media file. This can be done for instance with the <graph> tag. In 2015 I made a first simple graph experiment to create a media file. Graph is a strong tool to create more complex charts, too. Unfortunately we do not have the manpower at German Wiki Travel to create a complete solution. That's why I ask to collaborate with Wikipedians and the foundations programmers. --RolandUnger (talk) 04:46, 8 August 2018 (UTC)Reply
Roland, as I wrote above, the WP style can be printed now, as is. Other points are not needed immediately, IMO. We can likely just replace the current template to present the existing data ina graph form. For sure it'd be better to fetch P4150 from wikidata and render it on the fly to svg, but that sounds like a long term task. The data are hardly present anywhere (short of the New York entry), and there's no renderer. I reckon this may take years, right? Andree.sk (talk) 05:21, 8 August 2018 (UTC)Reply
I fear that you are right (taking years). But we should try to ask the English Wikipedians to find a faster way. --RolandUnger (talk) 16:20, 8 August 2018 (UTC)Reply

...looks like nobody's really against this proposal. Shall we implement it then? Andree.sk (talk) 14:51, 16 August 2018 (UTC)Reply

Please do. Everyone loves a graph. --ThunderingTyphoons! (talk) 15:13, 16 August 2018 (UTC)Reply
I'm very much looking forward to the graphs. Thank you for taking this on. Ground Zero (talk) 16:07, 16 August 2018 (UTC)Reply

Request for comments edit

Aarhus, Austin, Palmdale and Irkutsk were switched to the new template, please comment before whole WV is switched... I'd say it would be nice if we could add a "switch units" button, but that would require some CSS+javascript-fu (+that wouldn't print well, obviously; but I guess this isn't really needed). Another issue is that the template doesn't show snowfall or sea temperatures. Perhaps we can fallback to the old table in such cases (+we can add a template parameter to force the graph)? Or merge snowfall with rainfall somehow? Andree.sk (talk) 19:13, 18 August 2018 (UTC)Reply

I believe the old template also didn't differentiate between rainfall and snowfall, but rather generic "precipitation". I also believe that the graph template on Wikipedia has a button for automatic unit conversion. OhanaUnitedTalk page 02:16, 19 August 2018 (UTC)Reply
At the bottom of the template there is some text in red and blue. I think that should just be in plain black, it doesn't look too good. Otherwise I quite like the new template except that the old one was nice, simple, and easy to read. Personally, I prefer the old one. Selfie City (talk) 02:19, 19 August 2018 (UTC)Reply
The old table also uses colors... In any case we can change this to something else (now or later), I don't really have any strong feelings regarding the styling. Andree.sk (talk) 06:53, 19 August 2018 (UTC)Reply
How do you display in alternative units, Change F to C or in to mm? --Traveler100 (talk) 06:10, 19 August 2018 (UTC)Reply
User:OhanaUnited, thanks for the hint - I overlooked that. Looks like WP uses a bit different CSS than WV, but after a tiny fix, now the units can be converted using the same "button" at the bottom of the table. Andree.sk (talk) 06:53, 19 August 2018 (UTC)Reply

Done edit

Now the template is switched, after a short detour. If you find some issues (I didn't in about 50 articles I checked), comment - either it gets fixed right away, or we'll revert it again... Andree.sk (talk) 19:28, 27 August 2018 (UTC)Reply

Sorry to be the bearer of bad news, but I've discovered a problem with the template in the McMurdo Station article — when temperatures go below zero on the graph, they go into the precipitation graph. This should be fixed, if possible. ---Selfie City (talk | contributions) 19:58, 27 August 2018 (UTC)Reply
Yep, it's unfortunately a standard behavior of {{Climate chart}}. Thinking about it, perhaps for this one case we could add some manual "temperature shift" parameter, which would move the 0°C line upward... The current implementation using the templates is quite crazy (so in case of any non-trivial changes, I'd first try to rewrite it into Lua). Andree.sk (talk) 20:08, 27 August 2018 (UTC)Reply
Perhaps we should have a different template designed specifically for places that get sub-zero temperatures in the monthly average, with that slight modification. ---Selfie City (talk | contributions) 20:21, 27 August 2018 (UTC)Reply
And another problem: Death Valley climate chart, this time due to extremely hot temperatures. Look at the top of the graph and you will see what I mean. ---Selfie City (talk | contributions) 20:25, 27 August 2018 (UTC)Reply

@Andree.sk: Thanks for this amazing contribution! The new graphs look so much better. --ThunderingTyphoons! (talk) 20:41, 27 August 2018 (UTC)Reply

Hmm, I think the new table itself looks good in most articles, but unfortunately in many articles it seems to create big white spaces. See Montevideo for a fairly mild example. It would be nice if we could do something about that. The issue with negative temperatures is also a significant problem, though fortunately it doesn't seem to affect too many articles (even in Longyearbyen the chart still looks pretty good). —Granger (talk · contribs) 08:55, 29 August 2018 (UTC)Reply
Yes, I saw that in Atlanta. How could that be fixed, or is there a way you can move the table so there isn't a white space? --Comment by Selfie City (talk about my contributions) 13:56, 29 August 2018 (UTC)Reply
Done, partly :) Some issues were caused by the template (Atlanta), some by the articles (see last Montevideo diff ). I'll try to figure out some simple (at least temporary) solution for the low/big temperatures.... Andree.sk (talk) 19:08, 29 August 2018 (UTC)Reply
It's great to see graph/table design on Wiki Travel enter the space age... --Comment by Selfie City (talk about my contributions) 21:02, 29 August 2018 (UTC)Reply
Thanks, Montevideo looks good now. I'll remove the extra lines like that when I see them in other articles. —Granger (talk · contribs) 00:25, 30 August 2018 (UTC)Reply
Oh, here's a problematic one, this time due to very heavy rains during a couple months of the year. --Comment by Selfie City (talk about my contributions) 17:26, 31 August 2018 (UTC)Reply
Hmm, missed that one... anyway, in those cases, "maxprecip=" has to be added to scale the stuff. E.g. here maxprecip=800 seems to be OK. ||| andree.sk(talk) 18:51, 31 August 2018 (UTC)Reply
The Montevideo newline problem was (I suppose) due to the trailing newline newline between </inludeonly> and <noinclude> in the Climate template. One empty line is allowed and makes grasping the wikitext easier, but two newlines in the template and an empty line in the wikitext makes it two empty lines, which is interpreted differently from one. --LPfi (talk) 14:27, 6 September 2018 (UTC)Reply

Template:Weather box edit

I also added a proof-of-concept template {{Weather box}}, which spits out the {{Climate chart}} instead. The weather box is used on wikipedia to display the climate tables, so basically this means those tables can be copy-pasted into WV without changes, which simplifies the data gathering a bit... Is it a good idea, or should we rather get rid of this to discourage such copying? PS: The template may have some bugs or not work always...... -- andree.sk(talk) 13:51, 5 September 2018 (UTC)Reply

I think we should actually encourage copy-pasting from Wikipedia for climate tables, since we don't have to worry about licensing, etc., that we might have to when copying information from other sources. We can also trust it more to be accurate. If we were talking about whole articles that would be different, but in this situation I don't think this is a bad thing. --Comment by Selfie City (talk about my contributions) 14:42, 5 September 2018 (UTC)Reply
Welp, so I added a bunch of those for test, and mostly it works okay... just FYI. :) -- andree.sk(talk) 19:33, 6 September 2018 (UTC)Reply
What does "mostly" mean? --Comment by Selfie City (talk about my contributions) 19:45, 6 September 2018 (UTC)Reply
This. :-) -- andree.sk(talk) 20:06, 6 September 2018 (UTC)Reply
Any examples? --Comment by Selfie City (talk about my contributions) 20:13, 6 September 2018 (UTC)Reply
Added!-- andree.sk(talk) 16:10, 7 September 2018 (UTC)Reply

Not mobile friendly edit

It seems the new climate table doesn't work too well on mobile. At very least it needs to be horizontally scrollable. Will look into a Extension:TemplateStyles solution unless somebody beats me to it! Jdlrobson (talk) 19:24, 18 November 2018 (UTC)Reply

Not web browser friendly on laptops and PCs edit

This template is creating a lot of white space in article, even when images added, for example Baker (California). And this does not look good either Lancaster (California). Have come across this in a number of articles, do not think it can always be solved by moving the template. Is there a method to place collapsed or go back to the more compact number table without graphics? --Traveler100 (talk) 07:03, 4 December 2018 (UTC)Reply

In those examples the problem is having the chart without accompanying text. One partial solution would be not to add the template if there is nothing special to say. For Lancaster, the climate info in Los Angeles probably suffices, and I think short destination articles in general would not need climate templates, unless the climate differs significantly from the climate in the region. For destinations where the climate is especially important (such as park articles on mountainous regions), there is probably enough text in the climate section to make the template fit nicely. --LPfi (talk) 10:31, 4 December 2018 (UTC)Reply
Sounds reasonable. --Traveler100 (talk) 12:46, 4 December 2018 (UTC)Reply
Is this related to the problem I'm seeing on South_Padre_Island ? Jdlrobson (talk) 01:36, 1 January 2019 (UTC)Reply
No, rather the one of Death Valley mentioned above. I do not know how to fix it. --LPfi (talk) 14:08, 1 January 2019 (UTC)Reply

Template:Climate chart/How to read a climate chart edit

Template:Climate links to Template:Climate chart/How to read a climate chart which is tagged as experimental and "should not be added to more than one low-visibility article". If Template:Climate chart is remaining experimental, perhaps the "How to read" should be copied to Template:Climate/How to read a climate chart?? Nurg (talk) 00:49, 20 January 2019 (UTC)Reply

Option to suppress the display of the "title"? edit

Is it possible to suppress the display of the "title" parameter? Where it is the same as the article title, it is sometimes redundant to display it. Nurg (talk) 00:52, 20 January 2019 (UTC)Reply

@Nurg: Yes. Just pass it an empty "title" parameter. See example to the right. ARR8 (talk | contribs) 02:12, 20 January 2019 (UTC)Reply
Climate chart (explanation)
JFMAMJJASOND
 
 
 
0
 
 
9
−6
 
 
 
0
 
 
6
−3
 
 
 
0
 
 
7
−1
 
 
 
0
 
 
18
8
 
 
 
0
 
 
19
10
 
 
 
0
 
 
20
11
 
 
 
0
 
 
19
10
 
 
 
0
 
 
18
8
 
 
 
0
 
 
17
7
 
 
 
0
 
 
16
6
 
 
 
0
 
 
15
−2
 
 
 
0
 
 
14
−4
Average max. and min. temperatures in °C
Precipitation+Snow totals in mm
No title
Imperial conversion
JFMAMJJASOND
 
 
 
0
 
 
48
21
 
 
 
0
 
 
43
27
 
 
 
0
 
 
45
30
 
 
 
0
 
 
64
46
 
 
 
0
 
 
66
50
 
 
 
0
 
 
68
52
 
 
 
0
 
 
66
50
 
 
 
0
 
 
64
46
 
 
 
0
 
 
63
45
 
 
 
0
 
 
61
43
 
 
 
0
 
 
59
28
 
 
 
0
 
 
57
25
Average max. and min. temperatures in °F
Precipitation+Snow totals in inches

The sunlight and sea temperatures of {{Climate}} can not display. edit

Swept in from the pub

The sunlight and sea temperatures of {{Climate}} can not display.--✈ IGOR ✉ TALK?! .WIKIVOYAGER ! 15:46, 3 June 2019 (UTC)Reply

Yes, and pages like South Pole and McMurdo Station have climate displays that are completely unreadable due to overlapping elements. There might be a parameter to fix at least part of that, but even so, having lived with the new template for a few months, I'm not sure how much I like it (displaying temperatures and precipitation on the same chart even though they use different scales seems very strange), and I don't think it's a perfect fit for every page (as shown by the examples I just gave). --Bigpeteb (talk) 16:06, 3 June 2019 (UTC)Reply

Overlapping figures edit

In Norilsk, the climate chart's precipitation figures overlap with the coldest temperatures, making them very hard to read. Is there some parameter for tweaking the layout? –LPfi (talk) 09:35, 21 February 2021 (UTC)Reply

Mobile version shows both imperial and metric data edit

Unlike the desktop version where one can optionally expand it the "Imperial Conversion" diagram is always shown in the mobile view, taking up unnecessary space. I think the "Conversion" section should be collapsed by default, just like it is in the desktop version. [Example] Bugsinmyfood (talk) 07:31, 3 October 2021 (UTC)Reply

xxxsun and xxxh2o don't show edit

Climate
Climate chart (explanation)
JFMAMJJASOND
 
 
 
17
 
 
24
13
 
 
 
30
 
 
26
15
 
 
 
163
 
 
30
18
 
 
 
451
 
 
35
21
 
 
 
1083
 
 
39
24
 
 
 
2348
 
 
41
26
 
 
 
2467
 
 
42
29
 
 
 
1714
 
 
43
30
 
 
 
853
 
 
40
27
 
 
 
338
 
 
37
23
 
 
 
52
 
 
31
19
 
 
 
11
 
 
26
16
Average max. and min. temperatures in °C
Precipitation+Snow totals in mm
Abu Dhabi has a hot desert climate (BWh). See Abu Dhabi's 10 day forecast.
Imperial conversion
JFMAMJJASOND
 
 
 
0.7
 
 
75
56
 
 
 
1.2
 
 
79
58
 
 
 
6.4
 
 
85
64
 
 
 
18
 
 
94
69
 
 
 
43
 
 
103
75
 
 
 
92
 
 
105
79
 
 
 
97
 
 
108
84
 
 
 
67
 
 
109
85
 
 
 
34
 
 
105
80
 
 
 
13
 
 
98
74
 
 
 
2
 
 
88
66
 
 
 
0.4
 
 
79
60
Average max. and min. temperatures in °F
Precipitation+Snow totals in inches

In some articles, like Abu Dhabi, both xxxsun and xxxh2o are given, but they don't show up in the results of the template. --FredTC (talk) 11:43, 12 October 2021 (UTC)Reply

There doesn't seem to be an issue with this template, so it must be an issue with {{climate chart}}. SHB2000 (talk | contribs | meta.wikimedia) 11:50, 12 October 2021 (UTC)Reply
@SHB2000: You removed the {{Experimental}} from {{climate chart}}. I think there should be a template that says unfinished, which should be added to {{climate chart}}. This because developping {{climate chart}} stopped without implementing all needed functions. And I think the {{climate}} template should go back to this version, as long as the status is unfinished for {{climate chart}}. --FredTC (talk) 07:43, 13 October 2021 (UTC)Reply
I agree the doc is out-of-date with the actual functionality, however...
I wonder, is the h2o/sun information is really so crucial? Sans some extreme environments, I expect it will correlate very closely w/ precipitation mm (like it does @ w:Abu Dhabi#Climate, on the first look). Wouldn't it suffice to note "the maximum rain is in February/March - 3 days a month on average", in the text?
In the end, the graph can be extended (you can suggest by a mockup, how to add the info, while keeping it still readable/compact). Though right now it's a hellish template straight from wikipedia, any significant extension (incl. auto-maxprecip) would most likely require rewrite e.g. in Lua, which... I'd myself probably have fun doing, but I don't feel like doing. Since then 1) I'll have to both constantly read how bad it is, and 2) I'll be the only one who will (be able/willing to) maintain it :-)
I think it was agreed by vote that this graph is better for travellers, than the big colorful table, though less information-dense. But it's been some time, you can always start a new vote to revert it. Or fix it yourself. Or ask nicely for a fix... :) -- andree
Two examples why missing sun and/or h2o can be a problem:
Example 1: The info is quite important for beach lovers. As a beach lover I might want to Find out when the best time is to visit a place, avoiding the peak season. Your suggestion just tells when the peak season will probably be. My personal experience with an outside swimming pool is 18° is OK for a 5-minute swim, 17.5° makes me leave the water at once, making it a 10-seconds swim. So, I need monthly data to make my decision.
Example 2: I want to contribute to an article by adding a {{climate}} and so I consult the template documentation, I see that I can provide monthly data for high, low, precip, snow, sun and h2o. So I start finding out all the data and add the template to the article. Then I click "Show preview" and miss sun and h2o. That makes me angry and I will never contibute to Wiki Travel again.
--FredTC (talk) 13:34, 15 October 2021 (UTC)Reply
I understand .... Removed the values from the doc. I'm sure it's not the solution you wanted, but for now it's best than nothing. I'll ping you if I implement the real thing... -- andree 18:52, 15 October 2021 (UTC)Reply

Another problem edit

When I take the xxxprecip info from w:Mawsynram, things start looking quite strange. While with this version of {{climate}} everything would be OK. --FredTC (talk) 06:51, 14 October 2021 (UTC)Reply

Yeah, I don't know how to fix this issue. @Wauteurz, Andree.sk: any idea why the template is doing this? SHB2000 (talk | contribs | meta.wikimedia) 06:55, 14 October 2021 (UTC)Reply
@FredTC: you meant this fix... (added maxprecip=xxxx)? -- andree 13:49, 14 October 2021 (UTC)Reply
Yes, that feature makes it possible to use the template with such extreme values. Such a pity that it is not documented. --FredTC (talk) 10:50, 15 October 2021 (UTC)Reply
Doc added. -- andree 18:52, 15 October 2021 (UTC)Reply

Snow in hot climates edit

From Talk:Norfolk Island#Climate chart:

I'm glad to have one in the article, but it's confusing that it says "Precipitation+Snow". Of course, no snow amounts are shown, but the word is quite extraneous. Is there any way to delete it? Ikan Kekek (talk) 01:36, 13 December 2019 (UTC)Reply
Not that I can see. Add it as a conversation in Template talk:Climate? --Joshlama1 (talk) 03:37, 13 December 2019 (UTC)Reply

I think the "+snow" could be removed by a change in {{Climate chart}}, which is called by this template. It is inserted in three (?) places by the following code:

+<span style="color: #abc">Snow</span>

Putting this in a suitable if clause should remove it:

if {{{jansnow}} or {{{febsnow}}} ... or {{{decsnow}}} then +<span style="color: #abc">Snow</span>

I am not overly confident in fiddling with the code and did not find a good solution, although this should be trivial. Perhaps Andrewssi2 could take a look?

LPfi (talk) 14:23, 20 June 2022 (UTC)Reply

Looks broken on mobile edit

The two main issues I'm noticing on mobile devices are:

  1. chart is scrolling horizontally.
  2. both imperial and metric versions are displayed

solution: reduce padding between month columns, and hide the inactive measurement.

Could be as simple as:

.content .infobox tbody > tr > td, .content .infobox tbody > tr > th {+ display: flex;+ justify-content: center;}.content .infobox th, .content .infobox td {- padding: 7px 10px;+ padding: 7px 0;}.content .infobox > tbody, .content .infobox > caption {+ width: 100%;}+ /* Just hide the second chart for now. */+ .content .infobox > tbody > tr:last-child {+  display: none;+ }

Also, and this is a personal preference thing, I'd like to see the "snow" stack above the "rain". You can't compare the amount of rain across months (in locations with snowfall). Plus it just feels weird to me to see rain on top of snow I guess lol. Thanks for making this template! It looks so much better, I really can't even remember what we were using before. I can offer some styling help, but not sure I have permission. Thanks again! ButteBag (talk) 02:02, 30 September 2022 (UTC)Reply

Request relocating templatedata to Template:Climate/doc edit

Can whomever with the ability to edit this page relocate the templatedata content to Template:Climate/doc, to enable templatedata to be edited without modification to the template itself? There are issues with the templatedata for this template, which I would like to fix, e.g. units of measure (i.e. C vs F) comes after half of the list of temperature fields, etc.Rosspotter (talk) 05:11, 5 October 2022 (UTC)Reply

@Rosspotter: Done. By any chance, do you want the template editor right so you can edit protected templates? SHB2000 (talk | contribs | meta) 05:34, 5 October 2022 (UTC)Reply

Citations for climate charts edit

Swept in from the pub

I thought it was standard or at least considered a good practice to cite the source for a climate chart in each article, but there seems to be no consistency about this, most city articles appear to lack such citations, and even a star article like Chicago cites the source for its climate chart only implicitly in a link to a 7-day forecast. What does everyone think? I wasn't sure which page was most appropriate for this discussion, so I started it here. Ikan Kekek (talk) 08:24, 13 October 2023 (UTC)Reply

In large, coastal or mountainous regions, it is important to know what exact info the chart is conveying. As we cannot trust the original editor to have thought about every possible problem, having a source where such details can be checked is essential. Ideally there would be a link that the reader can check, but having an HMTL comment could be enough, allowing at least editors to check. I think we should add parameters to the chart templates (and instructions to their documentation) to get some consistency – perhaps a recommended source-url parameter and an optional source-label parameter.
Template:Climate says that the description parameter is to (optionally) be used for the source and a forecast link. For Chicago#Climate, I assume the actual source is elsewhere. The documentation should at least be amended not to recommend "source: Wikipedia". –LPfi (talk) 09:37, 13 October 2023 (UTC)Reply
I assume that anything in the US is using the source listed in Template:Climate#Autogenerating unless a source is specified.
I think this template is a good candidate for Wikidata. I don't know if they're set up to handle that kind of data, but I'd much prefer that we typed something like {{Climate chart|d=Q12345}} than typing out 48 monthly parameters by hand. WhatamIdoing (talk) 17:52, 13 October 2023 (UTC)Reply
There is also the data namespace at Commons. A drawback of both is that they are non-obvious and arcane to say locals, who might notice some oddities and know a better source. As whether data is often copied from Wikipedia in English, cooperating with that project to find a good way to share the data would be ideal. Adding the parameters one by one to Wikidata is twenty times more cumbersome than adding them directly as template parameters. –LPfi (talk) 07:33, 14 October 2023 (UTC)Reply
Ideally, these data (including the reference) should reside in Wikidata so that it can act as a centralized source of info to be used for different display formats in Wikipedia and Wiki Travel. OhanaUnitedTalk page 14:57, 16 October 2023 (UTC)Reply
Yes, either there or at Commons. But I assume that Wikidata is really awkward for entering such data by hand. If we want the data to be at Wikidata, we need instructions on how to add it there, and probably a tool for doing it while keeping sane. If we want it shared between projects, we need communication between projects. Any takers? –LPfi (talk) 16:40, 16 October 2023 (UTC)Reply
Return to "Climate" page.
🔥 Popular: