Created
June 2, 2021 00:41
-
-
Save adamhsparks/dfe8e4986e3d465ff35a910b60d73e27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################## | |
# title : EPIRICE-sim-bs-lb.R; | |
# purpose : Install the epicrop package and simulate rice brown spot and | |
# rice leaf blast epidemics; | |
# producer : prepared by A. Sparks; | |
# last update : in Perth, WA, Australia, Jun 2021; | |
# inputs : na; | |
# outputs : leaf blast and brown spot model outputs of unmanaged disase | |
# epidemics; | |
# remarks : Prepared for Jean Fabrice Adanve; | |
# license : MIT; | |
############################################################################## | |
if (!require("remotes")) | |
install.packages("remotes") | |
remotes::install_github("adamhsparks/epicrop" | |
) | |
library("epicrop") | |
library("ggplot2") | |
# Fetch weather for year 2000 wet season for a 120 day rice variety at the IRRI | |
# Zeigler Experiment Station | |
wth <- get_wth( | |
lonlat = c(121.25562, 14.6774), | |
dates = "2000-07-01", | |
duration = 120 | |
) | |
wth | |
bs <- predict_brown_spot(wth = wth, emergence = "2000-07-01") | |
bs | |
lb <- predict_leaf_blast(wth = wth, emergence = "2000-07-01") | |
lb | |
ggplot(data = bs, | |
aes(x = dates, | |
y = severity)) + | |
labs(y = "Severity (%)", | |
x = "Date") + | |
geom_line() + | |
geom_point() + | |
labs(title = "Brown spot disease progress over time", | |
subtitle = "Results for wet season year 2000 at IRRI Zeigler Experiment | |
Station shown", | |
caption = "Weather data acknowledgement: These data were obtained from | |
the NASA Langley Research Center POWER Project nfunded through the NASA | |
Earth Science Directorate Applied Science Program.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment