Skip to contents

Fetches historical daily weather data for a location and date range. Uses the free Open-Meteo archive API (no API key required).

Usage

fetch_weather_openmeteo(lat, lon, start_date, end_date)

Arguments

lat

Numeric. Latitude.

lon

Numeric. Longitude.

start_date

Date or character. Start date (YYYY-MM-DD).

end_date

Date or character. End date (YYYY-MM-DD).

Value

data.frame with columns: date, temperature_max, temperature_min, precipitation_sum, wind_speed_max, rain_sum. Returns NULL on failure.