if (nzchar(Sys.getenv("NOAA_TOKEN"))) {
# Retrieve token from environment variable
noaa_token <- Sys.getenv("NOAA_TOKEN")
# Get all U.S. state-level location IDs using category "FIPS"
locations <- get_locationid(noaa_token = noaa_token, category_id = "FIPS")
head(locations)
}
Run the code above in your browser using DataLab