We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
library("hydrotools") library("httr") ds <- RomDataSource$new( "http://deq1.bse.vt.edu/d.dh", '[email protected]' ) ds$get_token() # Load a feature (measuring point or facility or other) feat <- RomFeature$new(ds,list(hydroid=62173),TRUE) # Historic annual withdrawals ts <- feat$tsvalues(varkey='wd_mgy')[c('tstime', 'tsvalue')] tsz <- zoo::as.zoo(ts$tsvalue, order.by = as.POSIXct(ts$tstime, origin="1970-01-01")) barplot(tsz) # Historic monthly withdrawals ts <- feat$tsvalues(varkey='wd_mgm')[c('tstime', 'tsvalue')] tsd <- as.data.frame(ts) tsz <- zoo::as.zoo(ts$tsvalue, order.by = as.POSIXct(ts$tstime, origin="1970-01-01")) barplot(tsz) # box plot of monthly variation in withdrawal boxplot( ts$tsvalue ~ months(ts$tstime), ylab = paste(ds$get_vardef('wd_mgm')[c('varname','varunits')]), xlab = "Month" ) # Bar Chart of Average Monthly Withdrawals ts$month <- months(ts$tstime) tsmon <- sqldf("select month, avg(tsvalue) as tsvalue from ts group by month") barplot( tsmon$tsvalue ~ tsmon$month, ylab = paste(ds$get_vardef('wd_mgm')[c('varname','varunits')]), xlab = "Month" ) # cross tab months - old school VWUDS format ts$year <- format(strptime(ts$tstime,'%s'), '%Y') ymtabs <- xtabs( tsvalue ~ year + months(tstime), data = ts) ymtabs <- cbind(row.names(ymtabs), as.data.frame.matrix(ftable(ymtabs))) names(ymtabs) <- c(c('Year'), month.abb)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: