local p = {}  
-- Define categories  
-- All sortkeys have been guessed. They may be changed by common sense
-- or consensus at Wikipedia talk:WikiProject Tropical cyclones
local cats = {
---
-- TROPICAL CYCLONES
---
severe = {
color = "C0FFC0",
name = "Severe tropical storm",
sortkey = 120,
icon = ""
},
mtstorm = {
color = "4DFFFF", -- Old did not support. Value guessed.
name = "Moderate tropical storm",
sortkey = 105,
icon = ""
},
storm = {
color = "4DFFFF",
name = "Tropical storm",
sortkey = 100,
icon = ""
},
severedep = {
color = "6EC1EA", -- Old did not support. Value guessed.
name = "Severe tropical depression",
sortkey = 120
},
moddepression = {
color = "6EC1EA", -- Old did not support. Value guessed.
name = "Moderate tropical depression",
sortkey = 95
},
depression = {
color = "6EC1EA",
name = "Tropical depression",
sortkey = 90,
icon = ""
},
disturbance = {
color = "1591DE",
name = "Tropical disturbance",
sortkey = 80,
icon = ""
},
subtropicalcyclone = {
color = "4DFFFF",
name = "Subtropical cyclone",
sortkey = 70
},
subtropical = {
color = "4DFFFF",
name = "Subtropical storm",
sortkey = 65,
icon = ""
},
subdepression = {
color = "6EC1EA",
name = "Subtropical depression",
sortkey = 62,
icon = ""
},
overland = {
color = "6EC1EA",
name = "Overland depression",
sortkey = 60,
icon = ""
},
subdisturbance = {
color = "1591DE",
name = "Subtropical disturbance",
sortkey = 55,
icon = ""
},
extratropical = {
color = "CCCCCC",
name = "Extratropical cyclone",
sortkey = 50,
icon = ""
},
monsoondepression = {
color = "6EC1EA",
name = "Monsoon depression",
sortkey = 30,
icon = ""
},
potential = {
color = "1591DE",
name = "Potential tropical cyclone",
sortkey = 25,
icon = ""
},
posttropical = {
color = "CCCCCC",
name = "Post-tropical depression",
sortkey = 70,
icon = ""
},
remnant = {
color = "CCCCCC",
name = "Post-tropical depression",
sortkey = 70,
icon = ""
},
unknown = {
color = "C0C0C0",
name = "Unknown-strength storm",
sortkey = 0,
icon = "**?**"
},
-- SSWHS hurricane categories
cat5 = {
color = "A188FC",
name = {
atl = "Category 5 hurricane",
epac = "Category 5 hurricane",
satl = "Category 5 hurricane",
wpac = "Category 5-equivalent super typhoon",
default = "Category 5-equivalent tropical cyclone"
},
sortkey = 80050,
icon = ""
},
cat4 = {
color = "FF738A",
name = {
atl = "Category 4 hurricane",
epac = "Category 4 hurricane",
satl = "Category 4 hurricane",
wpac = "Category 4-equivalent typhoon",
default = "Category 4-equivalent tropical cyclone"
},
sortkey = 80040,
icon = ""
},
cat3 = {
color = "FF9E59",
name = {
atl = "Category 3 hurricane",
epac = "Category 3 hurricane",
satl = "Category 3 hurricane",
wpac = "Category 3-equivalent typhoon",
default = "Category 3-equivalent tropical cyclone"
},
sortkey = 80030,
icon = ""
},
cat2 = {
color = "FFD98C",
name = {
atl = "Category 2 hurricane",
epac = "Category 2 hurricane",
satl = "Category 2 hurricane",
wpac = "Category 2-equivalent typhoon",
default = "Category 2-equivalent tropical cyclone"
},
sortkey = 80020,
icon = ""
},
cat1 = {
color = "FFFFD9",
name = {
atl = "Category 1 hurricane",
epac = "Category 1 hurricane",
satl = "Category 1 hurricane",
wpac = "Category 1-equivalent typhoon",
default = "Category 1-equivalent tropical cyclone"
},
sortkey = 80010,
icon = ""
},
supertyphoon = {
color = "FF738A",
name = "Category 4-equivalent super typhoon",
sortkey = 80045,
icon = ""
},
typhoon = {
color = "FFD98C",
name = "Typhoon",
sortkey = 60010
},
-- HKO
svtyphoon = {
color = "FF738A",
name = "Severe typhoon",
sortkey = 60015
},
vstyphoon = {
color = "FF738A",
name = "Very strong typhoon",
sortkey = 60020,
icon = ""
},
vityphoon = {
color = "A188FC",
name = "Violent typhoon",
sortkey = 60030,
icon = ""
},
-- PAGASA
styphoon = {
color = "A188FC",
name = "Supertyphoon",
sortkey = 60050
},
sprcyclstorm = {
color = "A188FC",
name = "Super cyclonic storm",
sortkey = 50020,
icon = ""
},
esvrcyclstorm = {
color = "FF738A",
name = "Extremely severe cyclonic storm",
sortkey = 50015,
icon = ""
},
vsvrcyclstorm = {
color = "FFD98C",
name = "Very severe cyclonic storm",
sortkey = 50010,
icon = ""
},
svrcyclstorm = {
color = "C0FFC0",
name = "Severe cyclonic storm",
sortkey = 50008,
icon = ""
},
niocyclone = {
color = "4DFFFF",
name = "Cyclonic storm",
sortkey = 50006,
icon = ""
},
deepdepression = {
color = "6EC1EA",
name = "Deep depression",
sortkey = 50002,
icon = ""
},
niodepression = {
color = "1591DE",
name = "Depression",
sortkey = 50001,
icon = ""
},
nioland = {
color = "1591DE",
name = "Land depression",
sortkey = 50000,
icon = ""
},
aus5 = {
color = "A188FC",
name = "Category 5 severe tropical cyclone",
sortkey = 40015,
icon = ""
},
aus4 = {
color = "FF738A",
name = "Category 4 severe tropical cyclone",
sortkey = 40013,
icon = ""
},
aus3 = {
color = "FFD98C",
name = "Category 3 severe tropical cyclone",
sortkey = 40010,
icon = ""
},
aus2 = {
color = "C0FFC0",
name = "Category 2 tropical cyclone",
sortkey = 40008,
icon = ""
},
aus1 = {
color = "4DFFFF",
name = "Category 1 tropical cyclone",
sortkey = 40006,
icon = ""
},
low = {
color = "6EC1EA",
name = "Tropical low",
sortkey = 40002,
icon = ""
},
sublow = {
color = "6EC1EA",
name = "Subtropical low",
sortkey = 40000
},
vintense = {
color = "A188FC",
name = "Very intense tropical cyclone",
sortkey = 30010,
icon = ""
},
intense = {
color = "FF738A",
name = "Intense tropical cyclone",
sortkey = 30008,
icon = ""
},
tropicalcyclone = {
color = "FFD98C",
name = "Tropical cyclone",
sortkey = 30006,
icon = "**TC**"
},
mstorm = {
color = "4DFFFF",
name = "Moderate tropical storm",
sortkey = 30004,
icon = ""
},
zodw = {
color = "1591DE",
name = "Zone of disturbed weather",
sortkey = 30000,
icon = ""
},
shemsvrtc = {
color = "FFD98C",
name = "Severe tropical cyclone",
sortkey = 20020
},
shem5 = {
color = "A188FC",
name = "Severe tropical cyclone",
sortkey = 20010
},
shem4 = {
color = "FFD98C",
name = "Tropical cyclone",
sortkey = 20008
},
shem2 = {
color = "C0FFC0",
name = "Tropical cyclone",
sortkey = 20008
},
shem1 = {
color = "4DFFFF",
name = "Tropical cyclone",
sortkey = 20008
},
---
-- WINTER STORMS
---
-- Regional Snowfall Index
rsi0 = {
color = "CCCCCC",
name = "Category 0 \"Nuisance\"",
sortkey = 80100,
icon = ""
},
rsi1 = {
color = "FFFFD9",
name = "Category 1 \"Notable\"",
sortkey = 80110,
icon = ""
},
rsi2 = {
color = "FFD98C",
name = "Category 2 \"Minor\"",
sortkey = 80120,
icon = ""
},
rsi3 = {
color = "FF9E59",
name = "Category 3 \"Major\"",
sortkey = 80130,
icon = ""
},
rsi4 = {
color = "FF738A",
name = "Category 4 \"Crippling\"",
sortkey = 80140,
icon = ""
},
rsi5 = {
color = "A188FC",
name = "Category 5 \"Extreme\"",
sortkey = 80150,
icon = ""
},
-- Winter Storm Severity Index
wssinone = {
color = "CCCCCC",
name = "No impacts",
sortkey = 80200,
},
wssilimited = {
color = "1591DE",
name = "Limited impacts",
sortkey = 80210,
},
wssiminor = {
color = "FFFFD9",
name = "Minor impacts",
sortkey = 80220,
},
wssimoderate = {
color = "FF9E59",
name = "Moderate impacts",
sortkey = 80230,
},
wssimajor = {
color = "FF738A",
name = "Major impacts",
sortkey = 80240,
},
wssiextreme = {
color = "A188FC",
name = "Extreme impacts",
sortkey = 80250,
},
spia0 = {
color = "4DFFFF",
name = "Ice Damage Index: 0",
sortkey = 80300,
icon = ""
},
spia1 = {
color = "FFFFD9",
name = "Ice Damage Index: 1",
sortkey = 80301,
icon = ""
},
spia2 = {
color = "FFD98C",
name = "Ice Damage Index: 2",
sortkey = 80302,
icon = ""
},
spia3 = {
color = "FF9E59",
name = "Ice Damage Index: 3",
sortkey = 80303,
icon = ""
},
spia4 = {
color = "FF738A",
name = "Ice Damage Index: 4",
sortkey = 80304,
icon = ""
},
spia5 = {
color = "A188FC",
name = "Ice Damage Index: 5",
sortkey = 80305,
icon = ""
},
---
-- TORNADOES
---
efu = {
color = "CCCCCC",
name = "EFU tornado",
sortkey = 1001,
icon = ""
},
ef0 = {
color = "4DFFFF",
name = "EF0 tornado",
sortkey = 1000,
icon = ""
},
ef1 = {
color = "FFFFD9",
name = "EF1 tornado",
sortkey = 1010,
icon = ""
},
ef2 = {
color = "FFD98C",
name = "EF2 tornado",