\thispagestyle{headerandfooter}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE, dpi = 300, fig.align = "center", out.width = "100%") options(scipen = 999)
source(here::here("analysis", "report-cards", "99-report_card_setup.R"))
bcu <- bcus[[params$reef]] bcu_ext <- bcus_ext[[params$reef]] tile_indicator <- bcus_tiles_indicator[[params$reef]] bcu_top_pressures <- top_pressures[[params$reef]] bcu_prefs <- bcus_prefs[[params$reef]] bcu_percentiles <- bcus_percentiles[[params$reef]] bcu_name <- recode_bcus(params$reef) bcu_wcs_map <- bcus_wcs_maps %>% filter(bcu == params$reef) %>% pull(wcs_map)
r bcu_name
knitr::include_graphics(here::here("data", "report-cards", "wcs-maps", glue("{bcu_wcs_map}.jpg")))
indicator_maps_file <- layout_indicator_maps(bcu, tile_indicator, bcu_ext) knitr::include_graphics(indicator_maps_file)
\clearpage \enlargethispage{4\baselineskip}
first_pressure <- bcu_top_pressures %>% filter(rank == 1) %>% pull(indicator_label) second_pressure <- bcu_top_pressures %>% filter(rank == 2) %>% pull(indicator_label)
r first_pressure
r second_pressure
plot_pressure_ranking_percentiles(bcu_percentiles, bcu_top_pressures)
\vspace{-0.35in}
indicator_plots <- lapply(c( "grav_NC", "sediment", "nutrient", "pop_count", "num_ports", "reef_value" ), function(x) plot_indicator_dumbbell(top_pressures, bcus_regions, params$reef, x)) climate_plots <- lapply(c( "score", "scorecn", "scorecy", "scorepfc", "scoreth", "scoretr" ), function(x) plot_indicator_dumbbell(top_pressures, bcus_regions, params$reef, x))
ggpubr::get_legend(indicator_plots[[1]]) %>% ggpubr::as_ggplot()
\vspace{-0.45in}
wrap_plots(append(indicator_plots, climate_plots), ncol = 2, byrow = FALSE, widths = c(0.5, 0.5) ) + plot_layout(guides = "collect") & theme( legend.position = "none", legend.box = "horizontal" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.