# NOT RUN {
#Northern VA flooding every April
county_cd <- c(rep("51013", 5), rep("51107", 5), rep("51059", 5))
start_date <- rep(c("2010-04-01", "2011-04-01", "2012-04-01", "2013-04-01", "2014-04-01"), 3)
end_date <- rep(c("2010-04-30", "2011-04-30", "2012-04-30", "2013-04-30", "2014-04-30"), 3)
input_df <- data.frame(county_cd = county_cd, start_date = start_date, end_date = end_date,
stringsAsFactors = FALSE)
#With default values
VA_floods <- long_term_flood(input_df)
#Using NWS values
VA_floods <- long_term_flood(input_df, threshold = "NWS")
# }
Run the code above in your browser using DataLab