\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")))

Global Pressure Indicators

indicator_maps_file <- layout_indicator_maps(bcu, tile_indicator, bcu_ext)
knitr::include_graphics(indicator_maps_file)

\clearpage \enlargethispage{4\baselineskip}

Top Two Pressures

first_pressure <- bcu_top_pressures %>%
  filter(rank == 1) %>%
  pull(indicator_label)

second_pressure <- bcu_top_pressures %>%
  filter(rank == 2) %>%
  pull(indicator_label)
  1. r first_pressure

  2. r second_pressure

Pressure Ranking

plot_pressure_ranking_percentiles(bcu_percentiles, bcu_top_pressures)

\vspace{-0.35in}

Global Context

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"
  )


WCS-Marine/local-reef-pressures documentation built on Feb. 13, 2022, 9:26 a.m.