Template talk:Infobox Weather
From Wikipedia, the free encyclopedia
Contents |
[edit] Examples
Month | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | Year |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Avg high °F | x | x | x | x | x | x | x | x | x | x | x | x | x |
Avg low °F | x | x | x | x | x | x | x | x | x | x | x | x | x |
Avg high °C | x | x | x | x | x | x | x | x | x | x | x | x | x |
Avg low °C | x | x | x | x | x | x | x | x | x | x | x | x | x |
Precipitation (in) | x | x | x | x | x | x | x | x | x | x | x | x | x |
Precipitation (cm) | x | x | x | x | x | x | x | x | x | x | x | x | x |
Source: Weatherbase [1] Jan 2006 |
[edit] Code to produce the above box with editors notes on use
{{Infobox Weather <!-- This was created with weatherbase.com in mind as the source, but --> |metric_first = <!--Entering Yes or True will swap unit order to metric first then Imperial --> <!--Leave blank for Imperial--> |single_line= <!--Entering Yes will place some units on the same line on compact the box vertically--> |location = Example City <!-- any source can be used.--> |Jan_Hi_°F = x |Feb_Hi_°F = x <!--ALL fields must be filled in. Exception = built in {{cite web}} below. --> |Mar_Hi_°F = x |Apr_Hi_°F = x <!--If only Imperial/English units are available, you must convert to metric |May_Hi_°F = x (either cm or mm) and enter where needed--> |Jun_Hi_°F = x |Jul_Hi_°F = x <!--If only SI/metric units are available, you must also convert to Imperial |Aug_Hi_°F =x units and enter where needed.--> |Sep_Hi_°F =x |Oct_Hi_°F =x <!-- www.weatherbase.com gives global weather info in both Imperial and metric.--> |Nov_Hi_°F =x |Dec_Hi_°F =x |Year_Hi_°F = x |Jan_Hi_°C = x |Feb_Hi_°C = x |Mar_Hi_°C = x |Apr_Hi_°C = x |May_Hi_°C = x |Jun_Hi_°C = x |Jul_Hi_°C = x |Aug_Hi_°C = x |Sep_Hi_°C = x |Oct_Hi_°C = x |Nov_Hi_°C = x |Dec_Hi_°C = x |Year_Hi_°C = x |Jan_Lo_°F = x |Feb_Lo_°F = x |Mar_Lo_°F = x |Apr_Lo_°F = x |May_Lo_°F = x |Jun_Lo_°F =x |Jul_Lo_°F =x |Aug_Lo_°F =x |Sep_Lo_°F =x |Oct_Lo_°F =x |Nov_Lo_°F =x |Dec_Lo_°F =x |Year_Lo_°F =x |Jan_Lo_°C = x |Feb_Lo_°C = x |Mar_Lo_°C = x |Apr_Lo_°C = x |May_Lo_°C = x |Jun_Lo_°C =x |Jul_Lo_°C =x |Aug_Lo_°C =x |Sep_Lo_°C =x |Oct_Lo_°C =x |Nov_Lo_°C =x |Dec_Lo_°C =x |Year_Lo_°C =x <!--Optional REC temps; should be used very sparely in general articles--> |Jan_REC_Hi_°F = |Feb_REC_Hi_°F = |Mar_REC_Hi_°F = |Apr_REC_Hi_°F = |May_REC_Hi_°F = |Jun_REC_Hi_°F = |Jul_REC_Hi_°F = |Aug_REC_Hi_°F = |Sep_REC_Hi_°F = |Oct_REC_Hi_°F = |Nov_REC_Hi_°F = |Dec_REC_Hi_°F = |Year_REC_Hi_°F = |Jan_REC_Hi_°C = |Feb_REC_Hi_°C = |Mar_REC_Hi_°C = |Apr_REC_Hi_°C = |May_REC_Hi_°C = |Jun_REC_Hi_°C = |Jul_REC_Hi_°C = |Aug_REC_Hi_°C = |Sep_REC_Hi_°C = |Oct_REC_Hi_°C = |Nov_REC_Hi_°C = |Dec_REC_Hi_°C = |Year_REC_Hi_°C = |Jan_REC_Lo_°F= |Feb_REC_Lo_°F = |Mar_REC_Lo_°F = |Apr_REC_Lo_°F = |May_REC_Lo_°F = |Jun_REC_Lo_°F = |Jul_REC_Lo_°F = |Aug_REC_Lo_°F = |Sep_REC_Lo_°F = |Oct_REC_Lo_°F = |Nov_REC_Lo_°F = |Dec_REC_Lo_°F = |Year_REC_Lo_°F = |Jan_REC_Lo_°C = |Feb_REC_Lo_°C = |Mar_REC_Lo_°C = |Apr_REC_Lo_°C = |May_REC_Lo_°C = |Jun_REC_Lo_°C = |Jul_REC_Lo_°C = |Aug_REC_Lo_°C = |Sep_REC_Lo_°C = |Oct_REC_Lo_°C = |Nov_REC_Lo_°C = |Dec_REC_Lo_°C = |Year_REC_Lo_°C = |Jan_Precip_inch = x |Feb_Precip_inch = x |Mar_Precip_inch = x |Apr_Precip_inch = x |May_Precip_inch =x |Jun_Precip_inch =x |Jul_Precip_inch =x |Aug_Precip_inch =x |Sep_Precip_inch =x |Oct_Precip_inch =x |Nov_Precip_inch =x |Dec_Precip_inch =x |Year_Precip_inch =x <!--This is in CENTImetres not MILLImetres.--> <!--If the source uses mm be sure to enter the values in the mm fields.--> <!--If the source is metric be sure to use the unit that the source reports --> |Jan_Precip_cm = x |Jan_Precip_mm = |Feb_Precip_cm = x |Feb_Precip_mm = |Mar_Precip_cm = x |Mar_Precip_mm = |Apr_Precip_cm = x |Apr_Precip_mm = |May_Precip_cm = x |May_Precip_mm = |Jun_Precip_cm = x |Jun_Precip_mm = |Jul_Precip_cm = x |Jul_Precip_mm = |Aug_Precip_cm = x |Aug_Precip_mm = |Sep_Precip_cm = x |Sep_Precip_mm = |Oct_Precip_cm = x |Oct_Precip_mm = |Nov_Precip_cm = x |Nov_Precip_mm = |Dec_Precip_cm = x |Dec_Precip_mm = |Year_Precip_cm = x |Year_Precip_mm = |source = Weatherbook <ref name= >{{cite web <!--BUILT in ref name and cite web.--> | url =http://www.weatherbase.com| title = | accessdate = | accessmonthday = | accessyear = | author = | last = | first = | date = | year = | month = | publisher = | language = }}</ref> |accessdate = Jan 2006 <!--accessdate that shows in weatherbox--> <!--For a second source--> |source2 = <ref name= >{{cite web | url = | title = | accessmonthday = | accessyear = | publisher = | language = }}</ref> |accessdate2 = }}
[edit] Unit order
|metric_first = Yes
This will swap the unit order to metric first then Imperial. See Montreal for an example.
Template:Infobox Weather metric, for the same box but with metric listed first. —The preceding unsigned comment was added by CambridgeBayWeather (talk • contribs) 11:45, 13 December 2006 (UTC).
- In order to maintain just one standard infobox, I have added the metric first option. By entering Yes this will swap the order of the units to well metric first. —MJCdetroit 15:29, 13 December 2006 (UTC)
[edit] Comments
It looks good and the weatherbase source looks good as well. It appears that they are using Toronto/Pearson Airport at Environment Canada as the source. I wonder if people would be interested in the maximum/minimums for the town as well? CambridgeBayWeather (Talk) 03:17, 6 November 2006 (UTC)
- I don't know. They can always be optional for a town. Where editors may want an expanded version for say an article that was specifically about the climate of a location. In any case thanks. —MJCdetroit 03:46, 6 November 2006 (UTC)
[edit] Precipitation unit change
I think the units should change from cm to mm. Total precipitation is always in mm; only snowfall is listed in cm because it takes 10 times as much snow to equal the same amount of rainfall but total precipitation is always in mm. Making this change will make the infobox more consistent within the articles they are placed within. With millimetres you also avoid the decimal point- so no fractions making it easier to read and it is preferred to have units in multiples of 1000 (ie mm, m, km etc.). Samy23 03:02, 16 December 2006 (UTC)
- I debated this when I developed this template. I even mentationed it to User:CambridgeBayWeather a few days ago . I settled with centimetres because the main website that I kept seeing used with this type of table was www.weatherbase.com and they used cm. However, I think that I am going to expand this template in the future to include an option for having millimetres displayed if the that's what the source unit is. It will take some time to put together because it would have to be able to display mm or cm but not both. —MJCdetroit 04:53, 16 December 2006 (UTC)
Yes having both cm and mm would indeed be a bad idea but as you can see most articles have -total- precipitation listed as mm. Samy23 00:52, 17 December 2006 (UTC)
- I'll see what I can do. It will probably be at least a week or two if not more. —MJCdetroit 04:46, 17 December 2006 (UTC)
- Done. It was easier than I thought. Now there is the option to report in whatever metric unit (cm or mm) the source reports without converting. If you enter a value for Jan_Precip_mm, then all precipitation values must be in millimeters. The reverse in regards to centimeters is also true. That way it is either millimeters (mm) or centimeters (cm), but not both. Just as the manual of style states please use the source's reported unit. If the source reports in centimeters please report centimeters in the infobox and don't convert to millimeters. —MJCdetroit 02:09, 18 December 2006 (UTC)
- Because Toronto's source was in millimeters I changed that weatherbox. Please see that acticle for an example. —MJCdetroit 02:37, 18 December 2006 (UTC)
-
-
- It looks good. Should have thought about that myself. Slight correction though Samy23, there will still be the decimal point with mm. Quoting from MANOBS "3.7.2 Unit of Measurement. The millimetre is the unit of measurement of liquid precipitation. The vertical depth of water or water equivalent is normally expressed to the nearest 0.2mm." I think that most countries report/record in mm. If you go to the US Govt. weather site, precpitation shows up in inches but if you click on metric you get mm. CambridgeBayWeather (Talk) 04:11, 18 December 2006 (UTC)
- What is the US government's weather website? The one that I found I wasn't very impressed with it. Just wondering. —MJCdetroit 16:32, 18 December 2006 (UTC)
- It looks good. Should have thought about that myself. Slight correction though Samy23, there will still be the decimal point with mm. Quoting from MANOBS "3.7.2 Unit of Measurement. The millimetre is the unit of measurement of liquid precipitation. The vertical depth of water or water equivalent is normally expressed to the nearest 0.2mm." I think that most countries report/record in mm. If you go to the US Govt. weather site, precpitation shows up in inches but if you click on metric you get mm. CambridgeBayWeather (Talk) 04:11, 18 December 2006 (UTC)
-
-
-
-
-
- The National Oceanic and Atmospheric Administration has several free products. This is a list of their most popular. For use in cities, etc, you would want Climate normals. After that you want Monthly Station Normals - CLIM81 and pick the state. It will give you all (a lot) the stations for that state in Imperial meaure only but a choice of PDF or ASCII. If you look at the small print it says that 1 year "unlimited access" can be purchased. Ignore it, when clickd on it tells you subscription already purchased. It says that a CD can be purchased, the Environment Canada site also has that and it has downloadable CD image files which have more information than the web site. CambridgeBayWeather (Talk) 18:38, 18 December 2006 (UTC)
-
-
-
-
-
-
-
- I just looked at the PDF and ASCII for Alaska, the normals (PDF) has the headers that explain what the abbreviations mean while the ASCII one is missing them. CambridgeBayWeather (Talk) 18:46, 18 December 2006 (UTC)
-
-
-
[edit] Added an option to compact the infobox vertically
I added an option to compact the infobox if desired. Just add the line |single_line= Yes and this will compact the infobox. See Chicago for an example. —MJCdetroit 16:37, 6 January 2007 (UTC)
- It may make the infobox longer in the horizontal direction. —MJCdetroit 20:29, 6 January 2007 (UTC)
- And less tall. --Paul 17:50, 7 January 2007 (UTC)
- I made the font size to equal 83%. This will help with the elongation. If single_line does not equal yes then it will default to 90%. —MJCdetroit 02:41, 22 January 2007 (UTC)
- And less tall. --Paul 17:50, 7 January 2007 (UTC)
[edit] Added option of displaying record tempertures and a second source.
I added the option of showing record temperatures for the various months. I would careful about adding this data to general articles. It would probably look best in an article about the climate of a certain place, but then again, it is optional so we'll let the editors of individual articles decide. I also added an optional second source line. —MJCdetroit 21:25, 12 January 2007 (UTC)
An example can be seen at Kuala Lumpur. —MJCdetroit 01:58, 13 January 2007 (UTC)
[edit] Add colors?
Recently, I noticed other weather infoboxes for other cities have a gradient of colors, depending upon the temperature. For instance, London's climate section includes this. I think this adds a nice visual touch to correspond with the varying temperatures. What does anyone think? —Un sogno modesto 01:28, 20 February 2007 (UTC)