Last updated: 2018-08-09
workflowr checks: (Click a bullet for more information) ✖ R Markdown file: uncommitted changes
The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish
to commit the R Markdown file and build the HTML.
✔ Environment: empty
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
✔ Seed:
set.seed(20180713)
The command set.seed(20180713)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
✔ Session information: recorded
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
✔ Repository version: 9972b21
wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: Extra feature drafts/
Ignored: data/big_data/
Unstaged changes:
Modified: Shiny2.0/ShinyApp1.R
Modified: Shiny2.0/rsconnect/documents/ShinyApp1.R/shinyapps.io/pesticide-explorer/Shiny2.dcf
Modified: analysis/California.Rmd
Modified: analysis/Data.Rmd
Modified: analysis/Tox_load_vig.Rmd
Modified: analysis/neonic_vig.Rmd
Staged changes:
Modified: analysis/about.Rmd
Modified: analysis/about_tox_load.Rmd
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
File | Version | Author | Date | Message |
---|---|---|---|---|
html | 9972b21 | ssoba | 2018-08-09 | HTML files for last commit |
Rmd | fcdea4c | ssoba | 2018-08-09 | Added select all/deselect all buttons to shiny. Facetted a plot in neonicotinoid vignette. All features on website and Shiny are finishsed! |
Rmd | e7d10a2 | ssoba | 2018-08-08 | Revised CA vignette and facetted a plot in intensity vignette |
html | e7d10a2 | ssoba | 2018-08-08 | Revised CA vignette and facetted a plot in intensity vignette |
Rmd | acb68e5 | ssoba | 2018-08-07 | Added contact and oral toxic loads to Graphs tab and California Vignette. Also added a final graph to California vignette. |
html | acb68e5 | ssoba | 2018-08-07 | Added contact and oral toxic loads to Graphs tab and California Vignette. Also added a final graph to California vignette. |
html | f4ef47c | ssoba | 2018-08-07 | Forgot to wflow_build the last commit |
Rmd | bb1bf40 | ssoba | 2018-08-06 | Got rid of code in GitHub site. Wrote Limitations to Data section and broadened introduction. Moved descriptions in shiny and extended sidebar |
html | bb1bf40 | ssoba | 2018-08-06 | Got rid of code in GitHub site. Wrote Limitations to Data section and broadened introduction. Moved descriptions in shiny and extended sidebar |
Rmd | 8df77d9 | ssoba | 2018-08-06 | changed theme |
html | 8df77d9 | ssoba | 2018-08-06 | changed theme |
html | 15a59b5 | ssoba | 2018-08-03 | Spelling fixes |
html | 1d48d55 | ssoba | 2018-08-03 | Build site. |
Rmd | dd313f8 | ssoba | 2018-08-01 | Fixed all spelling mistakes and some formatting issues |
html | dd313f8 | ssoba | 2018-08-01 | Fixed all spelling mistakes and some formatting issues |
html | 8b09700 | ssoba | 2018-08-01 | Build site. |
Rmd | 4b1a915 | ssoba | 2018-07-31 | Added Vignette tab to nav bar, fixed California vignette to be insecticides not all pesticides. Cleaned up the Home page |
html | 4b1a915 | ssoba | 2018-07-31 | Added Vignette tab to nav bar, fixed California vignette to be insecticides not all pesticides. Cleaned up the Home page |
Rmd | ca7e234 | ssoba | 2018-07-27 | Adding new tab to Shiny app and started toxic load per kg applied vignette |
html | ca7e234 | ssoba | 2018-07-27 | Adding new tab to Shiny app and started toxic load per kg applied vignette |
html | a5bfaaa | ssoba | 2018-07-26 | updating html files |
Rmd | 465368d | ssoba | 2018-07-25 | fixed filepath name to enable link to work |
Rmd | 672cebf | ssoba | 2018-07-20 | Added some new pages: the California story |
html | 672cebf | ssoba | 2018-07-20 | Added some new pages: the California story |
As you may have noticed from the Contact Toxicity By State graph (located at the bottom), California had a really high toxic load. Why is that? Let’s look at some other visualizations of our data to find an answer.
First, let’s look at what kind of crops we have in CA as of 2014:
Version | Author | Date |
---|---|---|
e7d10a2 | ssoba | 2018-08-08 |
f4ef47c | ssoba | 2018-08-07 |
bb1bf40 | ssoba | 2018-08-06 |
1d48d55 | ssoba | 2018-08-03 |
8b09700 | ssoba | 2018-08-01 |
4b1a915 | ssoba | 2018-07-31 |
Now let’s see how intense these crops were measured in toxic load per acre.
Version | Author | Date |
---|---|---|
e7d10a2 | ssoba | 2018-08-08 |
acb68e5 | ssoba | 2018-08-07 |
bb1bf40 | ssoba | 2018-08-06 |
1d48d55 | ssoba | 2018-08-03 |
8b09700 | ssoba | 2018-08-01 |
4b1a915 | ssoba | 2018-07-31 |
ca7e234 | ssoba | 2018-07-27 |
672cebf | ssoba | 2018-07-20 |
Pasture and hay occupies the most acreage, but Cotton has the highest Contact toxic load per acre of insecticide applied, followed by Other Crops, Vegetables and Fruit, then Orchards and Grapes. When we look at the Oral toxic load, we see the same 4 crops rank in the highest toxic load per acre measurements.
Although these four crops occupy a smaller area, they require a lot more insecticide applications and thus have a higher toxic load per acre value. But they don’t look like they occupy that much of the total crop area (see first plot).
Let’s look at the total crop area graph again, but this time without pasture and hay:
Version | Author | Date |
---|---|---|
e7d10a2 | ssoba | 2018-08-08 |
bb1bf40 | ssoba | 2018-08-06 |
8df77d9 | ssoba | 2018-08-06 |
1d48d55 | ssoba | 2018-08-03 |
dd313f8 | ssoba | 2018-08-01 |
ca7e234 | ssoba | 2018-07-27 |
672cebf | ssoba | 2018-07-20 |
In this adjusted total crop area plot, we see that Orchards and Grapes account for a huge chunk of crop area in California! They are only second to Pasture and Hay!
Once we remove Pasture and Hay, we can see that Orchards and Grapes account for much more area than we may have originally thought. Given this fact and the fact that insecticides used on Orchards and Grapes are some of the strongest (3rd highest toxic load per acre), it makes sense why California had a such a high toxic load for the entire state: It’s because of the high concentration of Orchard and Grape crops! In fact, about 80% of all fruits and vegetables for the nation are grown in California.
This last plot shows the contribution of different crops to total toxic load in California (both contact and oral). We can clearly see that Orchards and Grapes contribute the most both for both contact and oral toxic load.
Version | Author | Date |
---|---|---|
e7d10a2 | ssoba | 2018-08-08 |
acb68e5 | ssoba | 2018-08-07 |
8b09700 | ssoba | 2018-08-01 |
4b1a915 | ssoba | 2018-07-31 |
An important note: California data does not include insecticides applied as seed treatments. Meaning, the patterns we have seen here are most likely an underestimate of the true value.
We just saw how insecticide intensity makes California stand out. Follow this link to see national trends in insecticide intensity.
sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 16299)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] bindrcpp_0.2.2 scales_0.5.0 forcats_0.3.0 stringr_1.3.1
[5] purrr_0.2.5 readr_1.1.1 tidyr_0.8.1 tibble_1.4.2
[9] ggplot2_2.2.1 tidyverse_1.2.1 dplyr_0.7.5
loaded via a namespace (and not attached):
[1] tidyselect_0.2.4 reshape2_1.4.3 haven_1.1.2
[4] lattice_0.20-35 colorspace_1.3-2 htmltools_0.3.6
[7] yaml_2.1.19 rlang_0.2.1 R.oo_1.22.0
[10] pillar_1.2.3 foreign_0.8-70 glue_1.2.0
[13] R.utils_2.6.0 modelr_0.1.2 readxl_1.1.0
[16] bindr_0.1.1 plyr_1.8.4 munsell_0.5.0
[19] gtable_0.2.0 workflowr_1.1.1 cellranger_1.1.0
[22] rvest_0.3.2 R.methodsS3_1.7.1 psych_1.8.4
[25] evaluate_0.10.1 labeling_0.3 knitr_1.20
[28] parallel_3.5.0 broom_0.4.4 Rcpp_0.12.17
[31] backports_1.1.2 jsonlite_1.5 mnormt_1.5-5
[34] hms_0.4.2 digest_0.6.15 stringi_1.1.7
[37] grid_3.5.0 rprojroot_1.3-2 cli_1.0.0
[40] tools_3.5.0 magrittr_1.5 lazyeval_0.2.1
[43] crayon_1.3.4 whisker_0.3-2 pkgconfig_2.0.1
[46] xml2_1.2.0 lubridate_1.7.4 rstudioapi_0.7
[49] assertthat_0.2.0 rmarkdown_1.10 httr_1.3.1
[52] R6_2.2.2 nlme_3.1-137 git2r_0.22.1
[55] compiler_3.5.0
This reproducible R Markdown analysis was created with workflowr 1.1.1