Skip to contents

Retrieve climate data from the rnoaa::ncdc NOAA API and compute averages over the time period 1990-2019.

Usage

gdt_noaa_climate_data(
  location_id,
  data_type = c("temperature", "precipitation")
)

Arguments

location_id

The ID for the weather station.

data_type

The type of data needed. Must be one of temperature or precipitation.

Value

A vector with climate data (precipitation or temperature) for each month

Examples

if (FALSE) { # interactive()
# Not run: needs a valid NOAA API key
gdt_noaa_climate_data("CITY:SZ000003")
}