Spatial data on climate variables, extracted from Climatology Lab's TerraClimate.

load_climate(
  dataset,
  raw_data = FALSE,
  time_period,
  language = "eng",
  legal_amazon_only = FALSE
)

Arguments

dataset

A dataset name, choosing which variable will be loaded. One of ("max_temperature", "min_temperature", "wind_speed", "vapor_pressure_deficit", "vapor_pressure", "snow_water_equivalent", "shortwave_radiation_flux", "soil_moisture", "runoff", "precipitation", "potential_evaporation", "climatic_water_deficit", "water_evaporation", "palmer_drought_severity_index"). For extra details, try vignette("TERRACLIMATE").

raw_data

A boolean setting the return of raw (TRUE) or processed (FALSE) data.

time_period

A numeric indicating for which years the data will be loaded, in the format YYYY. Can be any vector of numbers, such as 2010:2012.

language

A string that indicates in which language the data will be returned. Portuguese ("pt") and English ("eng") are supported.

A boolean setting the return of Legal Amazon Data (TRUE) or Country's Data (FALSE). Defaults to FALSE

Value

An sf object with the selected climate data merged onto Brazilian municipalities.

Examples

if (FALSE) { # interactive()
### DO NOT RUN ###
# download maximum temperature data from 2000 to 2001
max_temp <- load_climate(
  dataset = "max_temperature",
  time_period = 2000:2001,
  language = "eng"
)

# download precipitation data only for the legal Amazon in 2010
amz_precip <- load_climate(
  dataset = "precipitation",
  time_period = 2010,
  legal_amazon_only = TRUE,
  language = "eng"
)
}