@@ -60,7 +60,7 @@ p2_targets <- list(
6060 join_and_filter_full_drought_record(df_1921 = p2_1921_2020_drought_prop_jd_7d ,
6161 df_1951 = p2_1951_2020_drought_prop_jd_7d ,
6262 df_1981 = p2_1981_2020_drought_prop_jd_7d ,
63- percentile = 2 )
63+ percentile = 20 )
6464 ),
6565
6666 # determine the 2000 most severe droughts
@@ -70,6 +70,14 @@ p2_targets <- list(
7070 n = 2000 )
7171 ),
7272
73+ # identify specific drought events that happened during major events
74+ tar_target(p2_2000_severe_2pct_droughts_joined ,
75+ p2_2000_severe_2pct_droughts | >
76+ filter(start > = p2_major_droughts_with1970 $ start ,
77+ start < = p2_major_droughts_with1970 $ end ) | >
78+ mutate(drought_name = p2_major_droughts_with1970 $ major_drought_id ),
79+ pattern = map(p2_major_droughts_with1970 )),
80+
7381 # Identify drought chunks
7482 tar_target(p2_drought_chunks ,
7583 identify_drought_chunks(drought_prop = p2_2000_severe_2pct_droughts ,
@@ -104,6 +112,18 @@ p2_targets <- list(
104112 " 1992-10-31" , " 2015-09-30" ))
105113 ) | >
106114 mutate(duration = as.duration(interval(start , end )) / ddays(1 ))),
115+ # add 1970s drought for summaries for website
116+ tar_target(p2_major_droughts_with1970 ,
117+ tibble(
118+ name = c(" Dust Bowl" , " 1950s Drought" , " 1960s Drought" ,
119+ " 1980s Drought" , " Turn-of-the-Century Drought" , " 1970s Drought" ),
120+ major_drought_id = c(" 1930" , " 1952" , " 1962" , " 1987" , " 1999" , " 1976" ),
121+ start = as.Date(c(" 1930-02-01" , " 1952-11-01" , " 1962-12-01" ,
122+ " 1987-05-01" , " 1999-09-01" , " 1976-01-01" )),
123+ end = as.Date(c(" 1941-08-31" , " 1957-08-31" , " 1968-10-31" ,
124+ " 1992-10-31" , " 2015-09-30" , " 1978-03-01" ))
125+ ) | >
126+ mutate(duration = as.duration(interval(start , end )) / ddays(1 ))),
107127
108128 # # Expand to determine all days within drought
109129 tar_target(p2_major_droughts_expanded ,
0 commit comments