tbep-tech / wqtrends Goto Github PK
View Code? Open in Web Editor NEWR package to assess water quality trends with generalized additive models
Home Page: https://tbep-tech.github.io/wqtrends
License: Creative Commons Zero v1.0 Universal
R package to assess water quality trends with generalized additive models
Home Page: https://tbep-tech.github.io/wqtrends
License: Creative Commons Zero v1.0 Universal
If justify = "center"
and win
is odd, the current lines don't fix the center of the window correctly:
Lines 57 to 65 in b50f0e2
This was an attempt at fixing the window to be exactly centered for an odd number of years, at the expense of not including the exact number of years specified in win
.
Use floor
instead and get rid of the exception for odd years. This will create an off-centered window (only by one year), but it will always calculate the window width exactly as specified by the user.
Need to add warning or fix for this.
Estimates of seasonal averages for GPP give very small standard error estimates on the back-transformed results. Works fine for chl:
library(wqtrends)
library(dplyr)
library(ggplot2)
tomod <- rawdat %>%
filter(station %in% 32) %>%
filter(param %in% 'chl')
gam2 <- anlz_gam(tomod, mod = 'gam2', trans = 'log10')
avgs <- anlz_avgseason(mods = list(gam2), doystr = 90, doyend = 180)
ggplot(avgs, aes(x = yr, y = predicted)) +
geom_point() +
geom_errorbar(aes(ymin = predicted - se, ymax = predicted + se))
GPP gives very small standard error:
tomod <- rawdat %>%
filter(station %in% 32) %>%
filter(param %in% 'gpp')
gam2 <- anlz_gam(tomod, mod = 'gam2', trans = 'log10')
avgs <- anlz_avgseason(mods = list(gam2), doystr = 90, doyend = 180)
ggplot(avgs, aes(x = yr, y = predicted)) +
geom_point() +
geom_errorbar(aes(ymin = predicted - se, ymax = predicted + se))
GPP using identity transformation looks better.
tomod <- rawdat %>%
filter(station %in% 32) %>%
filter(param %in% 'gpp')
gam2 <- anlz_gam(tomod, mod = 'gam2', trans = 'ident')
avgs <- anlz_avgseason(mods = list(gam2), doystr = 90, doyend = 180)
ggplot(avgs, aes(x = yr, y = predicted)) +
geom_point() +
geom_errorbar(aes(ymin = predicted - se, ymax = predicted + se))
The small CI values occur for both BoxCox and log transformations of GPP. It is likely an error with the back-transformation bias correction factor starting here:
Line 99 in 1b5f809
Could use predict function by requesting specific terms
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.