Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normals API does not accept expected inputs #112

Open
avikarto opened this issue Sep 20, 2022 · 1 comment
Open

Normals API does not accept expected inputs #112

avikarto opened this issue Sep 20, 2022 · 1 comment

Comments

@avikarto
Copy link

According to the docs for Normals,

The loc parameter is required. You can pass one (String) or multiple Meteostat weather station identifiers (Tuple or List), a meteostat.Point or a DataFrame returned by the meteostat.Stations.fetch method.

However, none of these seem to be working correctly. I can get the Normals API to return data with the documented example Normals('10637'), but using any of a real station ID, the station ID DF response, or a Point does not work:

from meteostat import Stations, Normals, Point
Stations.cache_dir = '/my/path'
stations = Stations()

# using the station ID string
res = stations.nearby(lat=35, lon=-80)
station_id_df = res.fetch(1)
station_id = station_id_df.index.values[0]  # KAFP0
id_normals = Normals(station_id).fetch()  # empty DF

# using the station ID Stations DF
df_normals = Normals(station_id_df).fetch()  # empty DF

# using a Point
point = Point(lat=35, lon=-80)
point_normals = Normals(loc=point).fetch()  # empty DF
% pip show meteostat
Name: meteostat
Version: 1.6.5
@clampr
Copy link
Member

clampr commented Mar 2, 2023

Hi,

Probably, no climate normals are available for this location. You could check if there is sufficient amount of daily / monthly data available to aggregate the normals yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants