Skip to content

Commit

Permalink
Added fire weather geoJSON support
Browse files Browse the repository at this point in the history
Fire weather geoJSON support has been added. Testing has been done on
nearly all features. Edge cases are still possible, but those can be
dealt with in time.

The tutorial was also update and some typos fixed.
  • Loading branch information
nawendt committed Mar 17, 2021
1 parent e9a3fa3 commit 32fb533
Show file tree
Hide file tree
Showing 6 changed files with 1,031 additions and 133 deletions.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from setuptools import convert_path, setup
import os


def find_package_tree(root_path, root_package):
"""
Return the package and all its sub-packages.
Expand All @@ -23,9 +24,10 @@ def find_package_tree(root_path, root_package):
for dir_name in dir_names])
return packages


setup(
name='SPCartopy',
version='0.9.0',
version='1.0.0',
packages=find_package_tree('spcartopy', 'spcartopy'),
url='https://github.com/nawendt/SPCartopy',
license='BSD-3',
Expand Down
101 changes: 54 additions & 47 deletions spcartopy/colors.py
Original file line number Diff line number Diff line change
@@ -1,72 +1,79 @@
""" SPC Product Colors """


class Outlooks(object):
categorical = {
"TSTM": {"ec": "#55BB55", "fc": "#C1E9C1", "label": "Thunder",},
"MRGL": {"ec": "#005500", "fc": "#66A366", "label": "Marginal",},
"SLGT": {"ec": "#DDAA00", "fc": "#FFE066", "label": "Slight",},
"ENH": {"ec": "#FF6600", "fc": "#FFA366", "label": "Enhanced",},
"MDT": {"ec": "#CC0000", "fc": "#E06666", "label": "Moderate",},
"HIGH": {"ec": "#CC00CC", "fc": "#EE99EE", "label": "High",},
"HIGH": {"ec": "#CC00CC", "fc": "#EE99EE", "label": "High", },
"MDT": {"ec": "#CC0000", "fc": "#E06666", "label": "Moderate", },
"ENH": {"ec": "#FF6600", "fc": "#FFA366", "label": "Enhanced", },
"SLGT": {"ec": "#DDAA00", "fc": "#FFE066", "label": "Slight", },
"MRGL": {"ec": "#005500", "fc": "#66A366", "label": "Marginal", },
"TSTM": {"ec": "#55BB55", "fc": "#C1E9C1", "label": "Thunder", },
}

tornado = {
"0.02": {"ec": "#005500", "fc": "#66A366", "label": "2%",},
"0.05": {"ec": "#70380f", "fc": "#9d4e15", "label": "5%",},
"0.10": {"ec": "#DDAA00", "fc": "#FFE066", "label": "10%",},
"0.15": {"ec": "#CC0000", "fc": "#E06666", "label": "15%",},
"0.30": {"ec": "#CC00CC", "fc": "#EE99EE", "label": "30%",},
"0.45": {"ec": "#a300cc", "fc": "#d633ff", "label": "45%",},
"0.60": {"ec": "#2952a3", "fc": "#5c85d6", "label": "60%",},
"SIGN": {"ec": "#000000", "fc": "#888888", "label": "10% Sig.",},
"SIGN": {"ec": "#000000", "fc": "#888888", "label": "10% Sig.", },
"0.60": {"ec": "#2952a3", "fc": "#5c85d6", "label": "60%", },
"0.45": {"ec": "#a300cc", "fc": "#d633ff", "label": "45%", },
"0.30": {"ec": "#CC00CC", "fc": "#EE99EE", "label": "30%", },
"0.15": {"ec": "#CC0000", "fc": "#E06666", "label": "15%", },
"0.10": {"ec": "#DDAA00", "fc": "#FFE066", "label": "10%", },
"0.05": {"ec": "#70380f", "fc": "#9d4e15", "label": "5%", },
"0.02": {"ec": "#005500", "fc": "#66A366", "label": "2%", },
}

wind = {
"0.05": {"ec": "#70380f", "fc": "#9d4e15", "label": "5%",},
"0.15": {"ec": "#DDAA00", "fc": "#FFE066", "label": "15%",},
"0.30": {"ec": "#CC0000", "fc": "#E06666", "label": "30%",},
"0.45": {"ec": "#CC00CC", "fc": "#EE99EE", "label": "45%",},
"0.60": {"ec": "#a300cc", "fc": "#d633ff", "label": "60%",},
"SIGN": {"ec": "#000000", "fc": "#888888", "label": "10% Sig.",},
"SIGN": {"ec": "#000000", "fc": "#888888", "label": "10% Sig.", },
"0.60": {"ec": "#a300cc", "fc": "#d633ff", "label": "60%", },
"0.45": {"ec": "#CC00CC", "fc": "#EE99EE", "label": "45%", },
"0.30": {"ec": "#CC0000", "fc": "#E06666", "label": "30%", },
"0.15": {"ec": "#DDAA00", "fc": "#FFE066", "label": "15%", },
"0.05": {"ec": "#70380f", "fc": "#9d4e15", "label": "5%", },
}

hail = {
"0.05": {"ec": "#70380f", "fc": "#9d4e15", "label": "5%",},
"0.15": {"ec": "#DDAA00", "fc": "#FFE066", "label": "15%",},
"0.30": {"ec": "#CC0000", "fc": "#E06666", "label": "30%",},
"0.45": {"ec": "#CC00CC", "fc": "#EE99EE", "label": "45%",},
"0.60": {"ec": "#a300cc", "fc": "#d633ff", "label": "60%",},
"SIGN": {"ec": "#000000", "fc": "#888888", "label": "10% Sig.",},
"SIGN": {"ec": "#000000", "fc": "#888888", "label": "10% Sig.", },
"0.60": {"ec": "#a300cc", "fc": "#d633ff", "label": "60%", },
"0.45": {"ec": "#CC00CC", "fc": "#EE99EE", "label": "45%", },
"0.30": {"ec": "#CC0000", "fc": "#E06666", "label": "30%", },
"0.15": {"ec": "#DDAA00", "fc": "#FFE066", "label": "15%", },
"0.05": {"ec": "#70380f", "fc": "#9d4e15", "label": "5%", },
}

any_severe = {
"0.05": {"ec": "#70380f", "fc": "#9d4e15", "label": "5%",},
"0.15": {"ec": "#DDAA00", "fc": "#FFE066", "label": "15%",},
"0.30": {"ec": "#CC0000", "fc": "#E06666", "label": "30%",},
"0.45": {"ec": "#CC00CC", "fc": "#EE99EE", "label": "45%",},
"0.60": {"ec": "#a300cc", "fc": "#d633ff", "label": "60%",},
"SIGN": {"ec": "#000000", "fc": "#888888", "label": "10% Sig.",},
"SIGN": {"ec": "#000000", "fc": "#888888", "label": "10% Sig.", },
"0.60": {"ec": "#a300cc", "fc": "#d633ff", "label": "60%", },
"0.45": {"ec": "#CC00CC", "fc": "#EE99EE", "label": "45%", },
"0.30": {"ec": "#CC0000", "fc": "#E06666", "label": "30%", },
"0.15": {"ec": "#DDAA00", "fc": "#FFE066", "label": "15%", },
"0.05": {"ec": "#70380f", "fc": "#9d4e15", "label": "5%", },
}

extended_severe = {
"0.15": {"ec": "#DDAA00", "fc": "#FFE066", "label": "15%",},
"0.30": {"ec": "#FF6600", "fc": "#FFA366", "label": "30%",},
"0.30": {"ec": "#FF6600", "fc": "#FFA366", "label": "30%", },
"0.15": {"ec": "#DDAA00", "fc": "#FFE066", "label": "15%", },
}

fire_weather_categorical = {
"ELEV": {"ec": "#e68a00", "fc": "#ffad33", "label": "Elevated",},
"CRIT": {"ec": "#cc0000", "fc": "#ff3333", "label": "Critical",},
"EXTM": {"ec": "#CC00CC", "fc": "#EE99EE", "label": "Extreme",},
"IDRT": {"ec": "#70380f", "fc": "#9d4e15", "label": "Isolated Dry Thunderstorm",},
"SDRT": {"ec": "#cc0000", "fc": "#ff3333", "label": "Scattered Dry Thunderstorm",},
"EXTM": {"ec": "#CC00CC", "fc": "#EE99EE", "label": "Extreme", },
"CRIT": {"ec": "#cc0000", "fc": "#ff3333", "label": "Critical", },
"ELEV": {"ec": "#e68a00", "fc": "#ffad33", "label": "Elevated", },
"SDRT": {"ec": "#cc0000", "fc": "#ff3333", "label": "Scattered Dry Thunderstorm", },
"IDRT": {"ec": "#70380f", "fc": "#9d4e15", "label": "Isolated Dry Thunderstorm", },
}

extended_fire_weather_categorical = {
'D3': {'ec': '#CC00CC', 'fc': '#EE99EE', 'label': 'Day 3 Critical', },
'D4': {'ec': '#cc0000', 'fc': '#ff3333', 'label': 'Day 4 Critical', },
'D5': {'ec': '#a300cc', 'fc': '#d633ff', 'label': 'Day 5 Critical', },
'D6': {'ec': '#005500', 'fc': '#66A366', 'label': 'Day 6 Critical', },
'D7': {'ec': '#2952a3', 'fc': '#5c85d6', 'label': 'Day 7 Critical', },
'D8': {'ec': '#70380f', 'fc': '#9d4e15', 'label': 'Day 8 Critical', },
}

extended_fire_weather = {
"D3": {"ec": "#CC00CC", "fc": "#EE99EE", "label": "Day 3 Critical",},
"D4": {"ec": "#cc0000", "fc": "#ff3333", "label": "Day 4 Critical",},
"D5": {"ec": "#a300cc", "fc": "#d633ff", "label": "Day 5 Critical",},
"D6": {"ec": "#005500", "fc": "#66A366", "label": "Day 6 Critical",},
"D7": {"ec": "#2952a3", "fc": "#5c85d6", "label": "Day 7 Critical",},
"D8": {"ec": "#70380f", "fc": "#9d4e15", "label": "Day 8 Critical",},
extended_fire_weather_probability = {
'WINDRH_0.70': {'ec': '#cc0000', 'fc': '#ff3333', 'label': '70% Critical Wind & RH', },
'WINDRH_0.40': {'ec': '#e68a00', 'fc': '#ffad33', 'label': '40% Critical Wind & RH', },
'DRYT_0.40': {'ec': '#00b2ee', 'fc': '#80ffff', 'label': '40% Critical Dry Thunderstorm', },
'DRYT_0.10': {'ec': '#8b4726', 'fc': '#c5a393', 'label': '10% Critical Dry Thunderstorm', },
}

Loading

0 comments on commit 32fb533

Please sign in to comment.