Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Humanipedia
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Storm categories/doc
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Module rating|protected}} {{High-use}} {{ombox|text=In order to conform to [[Wikipedia:Manual of Style/Accessibility#Color]] guidelines, do not use storm colors in conjunction with links. This is necessary to avoid problems related to lack of contrast.}} {{Lua |Module:Storm categories/categories |Module:Storm categories/colors |Module:Storm categories/icons |Module:Storm categories/demo |noprotcat=yes }} This template is used to control a multitude of tropical cyclone-related templates: {{t|storm colour}}, {{t|storm name}}, and {{t|storm icon}}. It acts as a centralized location for storm categories to avoid discrepancies between templates, allowing for the same ID to be used across all related templates. Data is located in the following submodules: * [[Module:Storm categories/categories]] for fully-detailed storm categories * [[Module:Storm categories/colors]] for color-only IDs * [[Module:Storm categories/icons]] for icon-only IDs == Usage == This module exports three functions for templates: <code>p.color</code>, <code>p.name</code>, <code>p.sortkey</code>, and <code>p.icon</code>. It also provides <code>p._color</code>, <code>p._name</code>, <code>p._sortkey</code>, and <code>p._icon</code> for use in other modules. All input IDs are case-insensitive, and all non-alphanumeric characters are stripped. === Color === Provides the color of the given tropical cyclone category code. This comes in the format of their raw hexadecimal code. This function is available as a template at {{T|storm colour}}. {| class="wikitable" ! Code ! Output |- ||<code><nowiki><span style="padding:4px;border:1px solid black;background-color:#{{#invoke:Storm categories|color|depression}}">depression</span></nowiki></code> |<span style="padding:4px;border:1px solid black;background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|depression}}">depression</span> |} === Name === Provides the name of the given tropical cyclone category code. A optional basin argument can be provided as the second argument in order to slightly tweak the name of the category, if the given category definition supports it. This function is available as a template at {{T|storm name}}. {| class="wikitable" ! rowspan="2" | Code ! colspan="2" | Interpreted ! rowspan="2" | Output |- ! ID ! Basin |- ||<code><nowiki>{{#invoke:Storm categories|name|severe}}</nowiki></code> |severe |{{gray|''(default)''}} |{{#invoke:Storm categories{{sandbox other|/sandbox}}|name|severe}} |- ||<code><nowiki>{{#invoke:Storm categories|name|spr - cYcL -s TorM}}</nowiki></code> |sprcyclstorm |{{gray|''(default)''}} |{{#invoke:Storm categories{{sandbox other|/sandbox}}|name|spr - cYcL -s TorM}} |- ||<code><nowiki>{{#invoke:Storm categories|name|cat5}}</nowiki></code> |cat5 |{{gray|''(default)''}} |{{#invoke:Storm categories{{sandbox other|/sandbox}}|name|cat5}} |- ||<code><nowiki>{{#invoke:Storm categories|name|cat5|ATl}}</nowiki></code> |cat5 |ATl |{{#invoke:Storm categories{{sandbox other|/sandbox}}|name|cat5|ATl}} |- ||<code><nowiki>{{#invoke:Storm categories|name|cat5|WPac}}</nowiki></code> |cat5 |WPac |{{#invoke:Storm categories{{sandbox other|/sandbox}}|name|cat5|WPac}} |} === Sortkey === The sortkey is a number that aids in sorting categories. Using the sortkey, it is possible to automatically sort a table of tropical cyclones given their category code. Due to the ambiguous nature of sortkeys, tables may be sorted incorrectly if values from other basins were used. For categories that span multiple basins, however, (e.g. <code>depression</code> and <code>storm</code>) they are given the lowest possible sortkeys in order to achieve maximum compatibility. {{#ifeq:{{BASEPAGENAME}}|Storm categories| <p>This sortkey is used in {{T|Tropical cyclone season effects (cyclone)}}, a subtemplate of {{T|Tropical cyclone season effects}}.</p> }} The sortkey format is as follows. Note that not all values between the given ranges were used. The arrangement of these were determined by their positions in the {{T|Storm colour}} template. {| class="wikitable" ! Basin ! Sortkey range |- | {{gray|''Global (unused)''}} | 90000 to 99999 |- | Atl/EPac/SAtl | 80000 to 89999 |- | WPac | 60000 to 69999 |- | Nio | 50000 to 59999 |- | Aus/Fiji | 40000 to 49999 |- | SWio | 30000 to 39999 |- | Historical | 20000 to 29999 |- | Global | 0 to 9999 |} A demonstration of a sortable table using these sortkeys can be found below. Note that it does not use categories outside of its own basin (in this case, the Atl/EPac/SAtl basin) and the global range. {| class="wikitable sortable" ! Category ! data-sort-type="number" | Sortkey ! Code |- style="background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|cat3}}" | | cat3 | {{nts|{{#invoke:Storm categories{{sandbox other|/sandbox}}|sortkey|cat3}}}} || <code><nowiki>{{#invoke:Storm categories|sortkey|cat3}}</nowiki></code> |- style="background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|cat1}}" | cat1 | {{nts|{{#invoke:Storm categories{{sandbox other|/sandbox}}|sortkey|cat1}}}} || <code><nowiki>{{#invoke:Storm categories|sortkey|cat1}}</nowiki></code> |- style="background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|cat5}}" | cat5 | {{nts|{{#invoke:Storm categories{{sandbox other|/sandbox}}|sortkey|cat5}}}} || <code><nowiki>{{#invoke:Storm categories|sortkey|cat5}}</nowiki></code> |- style="background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|cat4}}" | cat4 | {{nts|{{#invoke:Storm categories{{sandbox other|/sandbox}}|sortkey|cat4}}}} || <code><nowiki>{{#invoke:Storm categories|sortkey|cat4}}</nowiki></code> |- style="background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|depression}}" | depression | {{nts|{{#invoke:Storm categories{{sandbox other|/sandbox}}|sortkey|depression}}}} || <code><nowiki>{{#invoke:Storm categories|sortkey|depression}}</nowiki></code> |- style="background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|cat2}}" | cat2 | {{nts|{{#invoke:Storm categories{{sandbox other|/sandbox}}|sortkey|cat2}}}} || <code><nowiki>{{#invoke:Storm categories|sortkey|cat2}}</nowiki></code> |} {{ctop|title=Sorting table which uses different basins}} {| class="wikitable sortable" ! Category ! Sortkey ! Code |- style="background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|typhoon}}" | | typhoon | {{nts|{{#invoke:Storm categories{{sandbox other|/sandbox}}|sortkey|typhoon}}}} || <code><nowiki>{{#invoke:Storm categories|sortkey|typhoon}}</nowiki></code> |- style="background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|potential}}" | potential | {{nts|{{#invoke:Storm categories{{sandbox other|/sandbox}}|sortkey|potential}}}} || <code><nowiki>{{#invoke:Storm categories|sortkey|potential}}</nowiki></code> |- style="background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|cat5}}" | cat5 | {{nts|{{#invoke:Storm categories{{sandbox other|/sandbox}}|sortkey|cat5}}}} || <code><nowiki>{{#invoke:Storm categories|sortkey|cat5}}</nowiki></code> |- style="background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|svrcyclstorm}}" | svrcyclstorm | {{nts|{{#invoke:Storm categories{{sandbox other|/sandbox}}|sortkey|svrcyclstorm}}}} || <code><nowiki>{{#invoke:Storm categories|sortkey|svrcyclstorm}}</nowiki></code> |- style="background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|unknown}}" | unknown | {{nts|{{#invoke:Storm categories{{sandbox other|/sandbox}}|sortkey|unknown}}}} || <code><nowiki>{{#invoke:Storm categories|sortkey|unknown}}</nowiki></code> |- style="background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|supertyphoon}}" | supertyphoon | {{nts|{{#invoke:Storm categories{{sandbox other|/sandbox}}|sortkey|supertyphoon}}}} || <code><nowiki>{{#invoke:Storm categories|sortkey|supertyphoon}}</nowiki></code> |- style="background-color:#{{#invoke:Storm categories{{sandbox other|/sandbox}}|color|niodepression}}" | niodepression | {{nts|{{#invoke:Storm categories{{sandbox other|/sandbox}}|sortkey|niodepression}}}} || <code><nowiki>{{#invoke:Storm categories|sortkey|niodepression}}</nowiki></code> |} {{cbot}} === Icon === Icons exist for some Storm categories for presentation purposes. This function is available as a template at {{T|storm icon}}. <code>p.icon</code> will return wikitext of an image or formatted text. === Full list of available values === The following table is generated by invoking the <code>demo</code> function of this module. Some IDs are only available as colors or icons because they existed as parameters on old non-module template implementations and cannot be feasibly aliased to a specific tropical cyclone category. It will show any color errors, including colors which aren't compliant with the minimal [[Web Content Accessibility Guidelines#WCAG 2.0|Web Content Accessibility Guidelines 2.0]] AA color standards (see [[MOS:COLOR]] for more information). {{#invoke:Storm categories{{sandbox other|/sandbox}}|demo}} <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Storm category templates]] [[Category:Tropical cyclone templates]] [[Category:Non-tropical storms templates]] }}</includeonly>
Summary:
Please note that all contributions to Humanipedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Humanipedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Cbot
(
edit
)
Template:Ctop
(
edit
)
Template:Error
(
edit
)
Template:Gray
(
edit
)
Template:High-use
(
edit
)
Template:Lua
(
edit
)
Template:Module other
(
edit
)
Template:Module rating
(
edit
)
Template:Nts
(
edit
)
Template:Ombox
(
edit
)
Template:Pp
(
edit
)
Template:Protection padlock
(
edit
)
Template:Sandbox other
(
edit
)
Template:T
(
edit
)
Template:Template link
(
edit
)
Template:Tl
(
edit
)
Module:Error
(
edit
)
Module:File link
(
edit
)
Module:Lua banner
(
edit
)
Module:Message box
(
edit
)
Module:Protection banner
(
edit
)
Module:String
(
edit
)