Skip to content

Commit 5df3587

Browse files
Merge pull request #41 from DOI-USGS/narration-fixes
Narration fixes
2 parents 2e03640 + 77f5504 commit 5df3587

26 files changed

+525
-210
lines changed

2_process.R

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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,

3_visualize/src/plot_stripswarm.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ event_swarm_plot_compressed_vertical <- function(swarm_data){
1414
theme_nothing() +
1515
# To check line-up of scales on website, uncomment out lines 17-19, comment
1616
# out line 21, and uncomment out line 22
17-
# theme(axis.text.x = element_blank(),
18-
# axis.text.y = element_text(size = 14, color = 'blue', angle = 180),
19-
# panel.grid.major.y = element_line(color = 'blue', linetype = "dashed")) +
17+
#theme(axis.text.x = element_blank(),
18+
# axis.text.y = element_text(size = 14, color = 'blue', angle = 180),
19+
# panel.grid.major.y = element_line(color = 'blue', linetype = "dashed")) +
2020
scale_y_date(breaks = scales::date_breaks(width = '1 years'),
2121
labels = NULL,
2222
#labels = scales::date_format('%Y'), # use to check line-up on website
@@ -57,7 +57,7 @@ event_violin_vertical <- function(drought_data, major_drought_periods,
5757
size = 2.5, angle = 180, hjust = 0, vjust = 0,
5858
family = supporting_font) +
5959
geom_violin(data = drought_data,
60-
aes(x = threshold, y = date),
60+
aes(x = 2, y = date),
6161
color = NA,
6262
fill = color_scheme$drought_event_highlight,
6363
scale = "count",

src/App.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@200;300;400;500;600;700;800&display=swap');
7676
$SourceSans: 'Source Sans Pro', sans-serif;
7777
$textcolor: #333534;
78-
@import url('https://fonts.googleapis.com/css2?family=Nanum+Pen+Script&display=swap');
79-
$writeFont: 'Nanum Pen Script', cursive;
78+
@import url('https://fonts.googleapis.com/css2?family=Edu+TAS+Beginner&display=swap');
79+
$writeFont: 'Edu TAS Beginner', cursive;
8080
// whole page except header fit within viewport - no scrolling
8181
#app {
8282
width: 100%;
@@ -168,7 +168,7 @@ a:active {
168168
}
169169
.droughtText.notesText{
170170
font-family: $writeFont;
171-
font-size: 2.5rem;
171+
font-size: 1.9rem;
172172
}
173173
input[type=button] {
174174
font-family: $SourceSans;
-64.5 KB
Loading
-75 KB
Loading
-62.7 KB
Loading
-51.2 KB
Loading
-44 KB
Loading
-7.35 KB
Loading
14.2 KB
Loading

0 commit comments

Comments
 (0)