Skip to content

Commit

Permalink
updated column names
Browse files Browse the repository at this point in the history
Updated column names to match webreport output
  • Loading branch information
hammerly committed Sep 5, 2023
1 parent a8aaac5 commit a489e36
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions inst/reports/region11/component_summary_by_project/report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ s <- within(site(comp), {
})
cosm <- get_cosoilmoist_from_NASISWebReport(projectname, stringsAsFactors = TRUE)
idx <- with(cosm, {!is.na(cosm$dept_r) & cosm$status == "wet"})
idx <- with(cosm, {!is.na(cosm$soimoistdept_r) & cosm$soimoiststat == "wet"})
if (any(idx) == TRUE) {cosm <- cosm[idx, ]}
cosm <- within(cosm, {
comppct_r2 = ifelse(is.na(comppct_r), 0, comppct_r)
Expand Down Expand Up @@ -217,27 +217,27 @@ ggplot(., aes(x = slopeshape, y = hillslopeprof, fill = mustatus_new)) +
```{r soil moisture, fig.dim = c(8, h_wtables), fig.ext = "png", dev = "png_dplots"}
# component soil moisture month
ggplot(cosm, aes(x = as.integer(month), y = dept_r, lty = status, group = comppct_r)) +
ggplot(cosm, aes(x = as.integer(month), y = soimoistdept_r, lty = soimoiststat, group = comppct_r)) +
geom_rect(aes(xmin = as.integer(month), xmax = as.integer(month) + 1,
ymin = 0, ymax = max(cosm$depb_r),
fill = flodfreqcl)) +
geom_line(cex = 1) +
geom_point() +
geom_ribbon(aes(ymin = dept_l, ymax = dept_h), alpha = 0.2) +
geom_ribbon(aes(ymin = soimoistdept_l, ymax = soimoistdept_h), alpha = 0.2) +
ylim(max(cosm$depb_r), 0) +
xlab("month") + ylab("depth (cm)") +
scale_x_continuous(breaks = 1:12) + #, sec.axis = dup_axis()) + #, labels = month.abb, name="Month") +
facet_wrap(~ comp_id, ncol = 3, scales = "free_x") +
ggtitle("Water Table Levels from Component Soil Moisture Month Data") +
theme(legend.position="top")
ggplot(cosm, aes(x = as.integer(month), y = dept_r, lty = status, group = comppct_r)) +
ggplot(cosm, aes(x = as.integer(month), y = soimoistdept_r, lty = soimoiststat, group = comppct_r)) +
geom_rect(aes(xmin = as.integer(month), xmax = as.integer(month) + 1,
ymin = 0, ymax = max(cosm$depb_r),
fill = pondfreqcl)) +
geom_line(cex = 1) +
geom_point() +
geom_ribbon(aes(ymin = dept_l, ymax = dept_h), alpha = 0.2) +
geom_ribbon(aes(ymin = soimoistdept_l, ymax = soimoistdept_h), alpha = 0.2) +
ylim(max(cosm$depb_r), 0) +
xlab("month") + ylab("depth (cm)") +
scale_x_continuous(breaks = 1:12, sec.axis = dup_axis()) + #, labels = month.abb, name="Month") +
Expand Down

0 comments on commit a489e36

Please sign in to comment.