Description Usage Arguments Value Examples
View source: R/narr_data_functions.R
get averaged NARR data for lat, lon, start_date, and end_date
1 2 3 4 5 6 7 | get_narr_data(
d,
type = "coords",
narr_variables = c("hpbl", "vis", "uwnd.10m", "vwnd.10m", "air.2m", "rhum.2m",
"prate", "pres.sfc"),
...
)
|
d |
data.frame with columns 'lat', 'lon', 'start_date', and 'end_date' |
type |
type of input data. either 'coords' if starting from lat and lon columns, or 'narr_cell' if starting from narr cell ids. |
narr_variables |
a character string of desired narr variables; a subset of c("hpbl", "vis", "uwnd.10m", "vwnd.10m", "air.2m", "rhum.2m", "prate", "pres.sfc") |
... |
further arguments passed onto s3::s3_get_files |
a data.frame identical to the input data.frame but with appended average NARR values
1 2 3 4 5 6 7 8 9 10 11 | if (FALSE) {
d <- data.frame(
id = c('1a', '2b', '3c'),
lat = c(39.19674, 39.19674, 39.48765),
lon = c(-84.582601, -84.582601, -84.610173),
start_date = as.Date(c("3/8/17", "2/6/12", "6/18/20"), format = "%m/%d/%y"),
end_date = as.Date(c("3/15/17", "2/13/12", "6/25/20"), format = "%m/%d/%y")
)
get_narr_data(d, narr_variables = c("air.2m", "rhum.2m"))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.