Skip to contents

Download point-level climate projections using open-meteo API

Usage

get_climate_projections(
  latitude,
  longitude,
  site_id = NULL,
  start_date,
  end_date,
  model = "EC_Earth3P_HR",
  variables = c("temperature_2m_mean")
)

Arguments

latitude

latitude degree north

longitude

longitude degree east

site_id

name of site location (optional, default = NULL)

start_date

Number of days in the future for forecast (starts at current day)

end_date

Number of days in the past to include in the data

model

id of forest model https://open-meteo.com/en/docs/climate-api

variables

vector of name of variable(s) https://open-meteo.com/en/docs/climate-api

Value

data frame with the results from the call to the open-meteo API. The data frame is in a long format and has the following columns: "datetime", "reference_datetime", "site_id", "model_id", "ensemble", "variable", "prediction","unit".

Examples

if (FALSE) { # interactive()

get_climate_projections(
latitude = 37.30,
longitude = -79.83,
start_date = Sys.Date(),
end_date = Sys.Date() + lubridate::years(1),
model = "EC_Earth3P_HR",
variables = c("temperature_2m_mean"))
}