predictions with interval="hilo" return values as string
GClunies opened this issue · 1 comments
GClunies commented
Requesting tide predictions with interval="hilo" returns the value as string. This creates issues for plotting (out of order y-axis values - see stack overflow answer here for explanation)
Example code that reproduces the issue:
# Get data from NOAA CO-OPS API
df_hl = coops.get_data(
begin_date="20181224",
end_date="20190107",
stationid="9447717",
product="predictions",
datum="NAVD",
interval="hilo",
units="english",
time_zone="lst_ldt")
df_hl.info()
<class 'pandas.core.frame.DataFrame'>
DatetimeIndex: 54 entries, 2018-12-24 06:52:00 to 2019-01-06 23:32:00
Data columns (total 2 columns):
hi_lo 54 non-null object
predicted_wl 54 non-null object
dtypes: object(2)
memory usage: 1.3+ KB
The datatype for predicted_wl
should be float.
This issue should be checked for other products as well.
GClunies commented
This is being addressed in new noaa_coops package.