Hi @chris
Thanks for the help.
For Q1, I’ve changed 8 to 16:
prev_dir = WindRose.prevailing_direction_from_data(met_wind_dir_, 16)[0]
After that the dir_label seem not follow correctly,
so I edited:
# dictionary to map integers to cardinal directions
DIR_TEXT = {
'0': 'N', '1': 'NNE', '2': 'NE', '3': 'ENE', '4': 'E', '5': 'ESE', '6': 'SE', '7': 'SSE',
'8': 'S', '9': 'SSW', '10': 'SW', '11': 'WSW', '12': 'W', '13': 'WNW', '14': 'NW', '15': 'NNW',
'N': 'N', 'NNE': 'NNE', 'NE': 'NE', 'ENE': 'ENE', 'E': 'E', 'ESE': 'ESE', 'SE': 'SE', 'SSE': 'SSE',
'S': 'S', 'SSW': 'SSW', 'SW': 'SW', 'WSW': 'WSW', 'W': 'W', 'WNW': 'WNW', 'NW': 'NW', 'NNW': 'NNW'
}
DIR_RANGE = {
'N': (348.75, 11.25), 'NNE': (11.25, 33.75), 'NE': (33.75, 56.25), 'ENE': (56.25, 78.75),
'E': (78.75, 101.25), 'ESE': (101.25, 123.75), 'SE': (123.75, 146.25), 'SSE': (146.25, 168.75),
'S': (168.75, 191.25), 'SSW': (191.25, 213.75), 'SW': (213.75, 236.25), 'WSW': (236.25, 258.75),
'W': (258.75, 281.25), 'WNW': (281.25, 303.75), 'NW': (303.75, 326.25), 'NNW': (326.25, 348.75)
}
And it return the error message as fllow:
Runtime error (AssertionException): Data Collection must include at least one value
Traceback:
line 1064, in _check_values, "C:\Program Files\ladybug_tools\python\Lib\site-packages\ladybug\_datacollectionbase.py"
line 96, in values, "C:\Program Files\ladybug_tools\python\Lib\site-packages\ladybug\_datacollectionbase.py"
line 93, in __init__, "C:\Program Files\ladybug_tools\python\Lib\site-packages\ladybug\datacollection.py"
line 756, in filter_by_pattern, "C:\Program Files\ladybug_tools\python\Lib\site-packages\ladybug\datacollection.py"
line 231, in script