download_ncei.Rd
It downloads monthly data from NOAA National Centers for Environmental Information (NCEI; https://www.ncdc.noaa.gov/cag/statewide/time-series), reshape the data to one column, and save the data to a specified location. It returns a dataframe with 2 columns. One column contains raw values and the other column contains scaled values with specified outpSut range. The values are average values from all states.
download_ncei(
years,
states,
states_id,
parameter,
output_dir,
scale_range = c(0, 2)
)
a vector of years.
a vector of state names.
a vector of corresponding state ids from the NCEI website.
name of the parameter. Either "pcp" or "pdsi". pcp means precipitation and pdsi means Palmer Drought Severity Index.
path to output csv file.
output range (numeric vector of length two).