
Get Daily Weather Forecast Data from MET Weather API
Source:R/get_metno_daily_forecast.R
get_metno_daily_forecast.RdRetrieves daily aggregated weather forecast data from the Norwegian Meteorological Institute
(MET.NO) locationforecast API. This is a convenience function that wraps get_metno_forecast
and aggregates the hourly forecast data into daily summaries.
Usage
get_metno_daily_forecast(
latitude,
longitude,
days = 9,
api_key,
timeout = 30,
max_retries = 3,
retry_delay = 1
)Arguments
- latitude
Numeric. The latitude in decimal degrees for the forecast location. Must be within Australian limits (-44 to -10).
- longitude
Numeric. The longitude in decimal degrees for the forecast location. Must be within Australian limits (112 to 154).
- days
Numeric. The number of forecast days to return (1-9, default: 9).
- api_key
Character. Your email address, required for the User-Agent header as per MET Weather API terms of service.
- timeout
Numeric. Request timeout in seconds (default: 30).
- max_retries
Numeric. Maximum number of retry attempts for failed requests (default: 3).
- retry_delay
Numeric. Base delay between retries in seconds (default: 1.0).
Value
A data.table with daily aggregated weather forecasts, including:
date, min_temperature, max_temperature, total_precipitation,
avg_wind_speed, max_wind_speed, avg_relative_humidity,
avg_pressure, avg_cloud_fraction, and dominant_weather_symbol.
Details
The latitude and longitude are truncated to 4 decimal places as per
MET Weather API Terms of Service. The daily aggregation includes minimum and
maximum temperatures, total precipitation, average and maximum wind speeds,
average relative humidity, average air pressure, average cloud fraction, and
a dominant weather symbol for the day.
See also
Other METNO:
get_metno_forecast(),
metno_get_dominant_symbol(),
metno_resample_data_table(),
metno_timeseries_to_data_table()
Other data fetching:
get_ag_bulletin(),
get_coastal_forecast(),
get_data_drill(),
get_data_drill_apsim(),
get_dpird_apsim(),
get_dpird_extremes(),
get_dpird_minute(),
get_dpird_summaries(),
get_metno_forecast(),
get_patched_point(),
get_patched_point_apsim(),
get_precis_forecast(),
get_radar_imagery(),
get_satellite_imagery()
Author
Rodrigo Pires, rodrigo.pires@dpird.wa.gov.au