get_NADP_precip: get_NADP_precip: Downloads and cleans hourly precipitation...

View source: R/get_NADP_precip.R

get_NADP_precipR Documentation

get_NADP_precip: Downloads and cleans hourly precipitation data from NADP

Description

This function uses start date, end date and stationID to download NADP hourly precipitation data, and converts preciptation from inches to cm. Note that some stations may have different download links, and may not always work. The link used to download the NADP data was generated for station: ME98.

Usage

get_NADP_precip(
  start_date = paste0("04/01/", as.numeric(format(Sys.Date(), "%Y"))),
  end_date = paste0("10/31/", as.numeric(format(Sys.Date(), "%Y"))),
  stationID = "ME98",
  quietly = FALSE
)

Arguments

start_date

Quoted date for first day of period (eg "04/01/2018")

end_date

Quoted date for last day of period (eg "10/31/2018")

stationID

Quoted name of station to pull data from (eg "ME98" is ACAD's weather station)

quietly

TRUE or FALSE. If FALSE, code will not print progress into console. Defaults to FALSE

Value

Returns a data frame with Date, hour (0-23), timestamp (Y-M-D H:M:S), and precip_cm

Examples

## Not run: 
precip_2018 <- get_NADP_precip(start_date='04/01/2018', end_date='10/31/2018', stationID='ME98')

## End(Not run)

KateMMiller/wetlandACAD documentation built on Dec. 21, 2024, 1:14 a.m.