Description Usage Arguments Details Value Examples
get_daymet_featureids
Queries and retrieves daymet data from postgres database stored in an array format
1 | get_daymet_featureids(con, featureids)
|
con |
database connection returned from RPostgreSQL::dbConnect |
featureids |
numeric or character vector of featureids |
Intended for use with the sheds_new database on the osensei server
Returns Dreturns data frame of daymet data with columns: [featureid, date, tmax, tmin, prcp, dayl, srad, vp, swe]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
con <- dbConnect(dbDriver("PostgreSQL"), dbname="daymet")
x0 <- get_daymet_featureids(con) # throws error: missing featureids
x0 <- get_daymet_featureids(con, featureids = "") # returns empty dataframe
x1 <- get_daymet_featureids(con, featureids = c(201407698))
x2 <- get_daymet_featureids(con, featureids = c(201407698, 201407699))
x3 <- get_daymet_featureids(con, featureids = c("201407698", "201407699"))
x5 <- get_daymet_featureids(con, featureids = c(201407698, 201407699, 201407700, 201407701, 201407702))
dbDisconnect(con)
# ggplot(x2, aes(date, tmin)) +
# geom_line() +
# facet_wrap(~featureid)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.