Help Wikitravel grow by contributing to an article! Learn how.

Template talk:Climate

From Wikitravel
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 Wikitravel:Climate Expedition. Template:ClimateCelsius or Template:ClimateFahrenheit are also nice.

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) - - - - - - - - - - - -
Daylight (hrs/day) 9 10 11 11 12 13 13 12 11 11 10 9
Water (°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.
Check Palo Alto's 7 day forecast at NOAA

Usage[edit]

Copy and paste the below wiki markup into a page and give values to as many of the parameters as you wish to use (empty parameters will be gracefully ignored by the template).

Set units = Metric if the table is using Metric units (Celsius and centimeters) or to units = Imperial for Imperial units (Fahrenheit and inches). Please use units of measure appropriate to the location the page describes (Imperial in USA but Metric almost everywhere else) per Wikitravel:Measurements.

{{Climate
| units = Metric
| janhigh =
| febhigh =
| marhigh =
| aprhigh =
| mayhigh =
| junhigh =
| julhigh =
| aughigh =
| sephigh =
| octhigh =
| novhigh =
| dechigh =
| janlow =
| feblow =
| marlow =
| aprlow =
| maylow =
| junlow =
| jullow =
| auglow =
| seplow =
| octlow =
| novlow =
| declow =
| janprecip =
| febprecip =
| marprecip =
| aprprecip =
| mayprecip =
| junprecip =
| julprecip =
| augprecip =
| sepprecip =
| octprecip =
| novprecip =
| decprecip =
| jansnow =
| febsnow =
| marsnow =
| aprsnow =
| maysnow =
| junsnow =
| julsnow =
| augsnow =
| sepsnow =
| octsnow =
| novsnow =
| decsnow =
| jansun =
| febsun =
| marsun =
| aprsun =
| maysun =
| junsun =
| julsun =
| augsun =
| sepsun =
| octsun =
| novsun =
| decsun =
| janh2o =
| febh2o =
| marh2o =
| aprh2o =
| mayh2o =
| junh2o =
| julh2o =
| augh2o =
| seph2o =
| octh2o =
| novh2o =
| dech2o =
| description = '''Here''' type some descriptive text about the location's climate. No literal line breaks are permitted in this text but <br/> and other correctyl formatted html is okay. See [[Template talk:ClimateDev1#Note]] if an '''equal sign''' is needed in the text.
}}

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 Wikitravel: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? - 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. :-) Rogerhc 19:15, 5 June 2007 (EDT)

Variants

Actions

Destination Docents

In other languages