Highlighting vessels with more than one recorded orca encounter in the Salish Sea region
#TidyTuesday
Author
Steven Ponce
Published
October 14, 2024
Static
NOTE: We used runtime: shiny to make the interactive features of our visualizations work smoothly, especially the interactive orca map. This let us add dynamic, user-driven exploration that wasn’t possible with the usual Quarto options (I needed help figuring it out!).
While it means the final result looks more like markdown and less like a sleek Quarto document, it was the best way to ensure the interactivity worked well.
Steps to Create this Graphic
1. Load Packages & Setup
Show code
## 1. LOAD PACKAGES & SETUP ----pacman::p_load( tidyverse, # Easily Install and Load the 'Tidyverse' ggtext, # Improved Text Rendering Support for 'ggplot2' showtext, # Using Fonts More Easily in R Graphs janitor, # Simple Tools for Examining and Cleaning Dirty Data skimr, # Compact and Flexible Summaries of Data scales, # Scale Functions for Visualization lubridate, # Make Dealing with Dates a Little Easier glue, # Interpreted String Literals patchwork, # The Composer of Plots here, # A Simpler Way to Find Your Files sf, # Simple Features for R ggiraph, # Make 'ggplot2' Graphics Interactive htmltools, # Tools for HTML rnaturalearth, # World Map Data from Natural Earth rnaturalearthhires # High Resolution World Vector Map Data from Natural Earth used inrnaturalearth) # Note: disabled { camcorder }. Issues with plot rendering (ggiraph)# ### |- figure size ---- # camcorder::gg_record(# dir = here::here("temp_plots"),# device = "png",# width = 10,# height = 10,# units = "in",# dpi = 320# )### |- resolution ----showtext_opts(dpi =320, regular.wt =300, bold.wt =800)