Skip to content

Commit

Permalink
Adding calculation of annual pesticide application totals
Browse files Browse the repository at this point in the history
  • Loading branch information
mountaindboz committed Oct 30, 2024
1 parent 3879e36 commit a020613
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
9 changes: 9 additions & 0 deletions manuscript_contam/results/tables/appl_totals.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Year,Region,TotalApplication
2017,Sacramento River,949747.7006285643
2018,Sacramento River,991128.4599104321
2019,Sacramento River,1012281.7256006607
2020,Sacramento River,1186224.0350563223
2017,Toe Drain,908243.7201728999
2018,Toe Drain,919685.4085975249
2019,Toe Drain,913814.3202055886
2020,Toe Drain,886017.2084409726
16 changes: 13 additions & 3 deletions manuscript_contam/src/pesticide_use_figure.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NDFS Contaminants Manuscript
# Purpose: Create figure of the 2017-2020 pesticide use data for the Sacramento
# River and Yolo Bypass regions for the NDFS contaminants manuscript.
# Exploratory figures are in:
# Purpose: Create figure and summary table of the 2017-2020 pesticide use data
# for the Sacramento River and Yolo Bypass regions for the NDFS contaminants
# manuscript. Exploratory figures are in:
# ND-FASTR/manuscript_contam/notebooks/explore_pesticide_use.Rmd
# Author: Dave Bosworth
# Contacts: [email protected]
Expand Down Expand Up @@ -54,3 +54,13 @@ ggsave(
units = "in"
)

# Calculate annual pesticide application totals for each Region and Year
df_pest_use_summ <- df_pest_use %>%
summarize(
TotalApplication = sum(TotalApplication) / 2.205,
.by = c(Year, Region)
)

# Export annual pesticide application totals
df_pest_use_summ %>% write_csv(file = here("manuscript_contam/results/tables/appl_totals.csv"))

0 comments on commit a020613

Please sign in to comment.