diff --git a/_targets.R b/_targets.R index 501db96..fe706f8 100644 --- a/_targets.R +++ b/_targets.R @@ -33,7 +33,7 @@ list( # Read in data from gage-flow-conditions pipeline output tar_target( dv, - read_csv("https://labs.waterdata.usgs.gov/visualizations/data/flow_conditions_202408.csv", col_types = "cTnnnn") + read_csv("https://labs.waterdata.usgs.gov/visualizations/data/flow_conditions_202409.csv", col_types = "cTnnnn") ), tar_target( date_start, @@ -270,6 +270,7 @@ list( tar_target( intro_question_ig_png, intro_image(plot_nat_clean = explainer_intro_background, date_start, - font_legend, width = 1080, height = 1080, file_png = "out/intro_question_ig.png") + font_legend, width = 1080, height = 1080, text_size = 19, + file_png = "out/intro_question_ig.png") ) ) \ No newline at end of file diff --git a/out/explainer_flow_national_ig.png b/out/explainer_flow_national_ig.png index 50cabcf..530ada4 100644 Binary files a/out/explainer_flow_national_ig.png and b/out/explainer_flow_national_ig.png differ diff --git a/out/flow_cartogram.png b/out/flow_cartogram.png index bc920de..4a6acaf 100644 Binary files a/out/flow_cartogram.png and b/out/flow_cartogram.png differ diff --git a/out/flow_cartogram_ig.png b/out/flow_cartogram_ig.png index f12d1a1..56b9ac6 100644 Binary files a/out/flow_cartogram_ig.png and b/out/flow_cartogram_ig.png differ diff --git a/out/flow_national_ig.png b/out/flow_national_ig.png index d03f804..32f36b4 100644 Binary files a/out/flow_national_ig.png and b/out/flow_national_ig.png differ diff --git a/out/intro_question_ig.png b/out/intro_question_ig.png index 2fe238e..b78efd5 100644 Binary files a/out/intro_question_ig.png and b/out/intro_question_ig.png differ diff --git a/src/explainer_prep.R b/src/explainer_prep.R index 3dc200e..deda7c7 100644 --- a/src/explainer_prep.R +++ b/src/explainer_prep.R @@ -160,7 +160,8 @@ intro_background <- function(national_data, percentile_bin, pal){ #' @param width width of final png #' @param height height of final png #' @param file_png file path for final png -intro_image <- function(plot_nat_clean, date_start, font_legend, width, height, file_png){ +#' @param text_size size of text +intro_image <- function(plot_nat_clean, date_start, font_legend, width, height, file_png, text_size){ plot_month <- lubridate::month(date_start, label = TRUE, abbr = FALSE) plot_margin <- 0.025 @@ -185,10 +186,11 @@ intro_image <- function(plot_nat_clean, date_start, font_legend, width, height, height = 1.18, width = 1.18) + draw_label(sprintf("A look at %s's\nstreamflow across\nthe U.S.", plot_month), x = 0.05, y = 0.5, - size = 22, + size = text_size, hjust = 0, vjust = 0.5, fontfamily = font_legend, - color = "#222222") + color = "#222222", + lineheight = 1.2) ggsave(file_png, width = width, height = height, dpi = 300, units = c("px"))