`separate_tracks` sorts rows by `forecast_hours` as character instead of integer
SorooshMani-NOAA opened this issue · comments
In the following snippet, the track entries are sorted by forecast_hours
. However these values are not interpreted as integers and are ordered based on string character order.
StormEvents/stormevents/nhc/track.py
Lines 1189 to 1192 in 2895957
An example of the wrong sort:
basin storm_number track_start_time advisory forecast_hours isotach_radius geometry
2 AL 06 2018-08-30 06:00:00 CARQ -12 34.0 POINT (-13.80000 12.90000)
1 AL 06 2018-08-30 06:00:00 CARQ -18 34.0 POINT (-12.30000 12.90000)
0 AL 06 2018-08-30 06:00:00 CARQ -24 34.0 POINT (-10.90000 12.90000)
3 AL 06 2018-08-30 06:00:00 CARQ -6 34.0 POINT (-15.40000 12.90000)
4 AL 06 2018-08-30 06:00:00 CARQ 0 34.0 POINT (-17.00000 12.90000)
5 AL 06 2018-08-30 06:00:00 CARQ 0 50.0 POINT (-17.00000 12.90000)
6 AL 06 2018-08-30 06:00:00 CARQ 0 64.0 POINT (-17.00000 12.90000)