meteostat.daily
Get daily weather data for a specific station or location.
- Type: Function
- Source Code: GitHub
Parameters
| Parameter | Description | Data Type | Default Value |
|---|---|---|---|
station | Weather station(s) or geographical point(s). | str, Station, Point, List[str], List[Station], List[Point], DataFrame | Required |
start | Start date of the desired period. | datetime, date or None | None |
end | End date of the desired period. | datetime, date or None | None |
parameters | Requested meteorological parameters. | List[Parameter] | Default parameters |
providers | Requested data providers. | List[Provider] | [Provider.DAILY] |
Returns
Example
# Import Meteostat library and dependencies
from datetime import date
import meteostat as ms
# Set time period
start = date(2018, 1, 1)
end = date(2018, 12, 31)
# Get daily data
ts = ms.daily(ms.Station(id='10637'), start, end)
df = ts.fetch()
# Print DataFrame
print(df)