Builds a Leaflet map of H3 fishing effort with one layer per year, toggled via a radio-button year control. Hexagon colour reflects a log-scaled effort metric. A basemap switcher (Dark / Light / Satellite) is provided via a custom control in the top-right corner.
Usage
plot_effort_map(effort, metric = c("fishing_hours", "n_trips"))Details
The function accepts the output of [aggregate_pds_effort()] (which includes a `year` column) and aggregates effort to the H3 cell level within each year before building the map layers. An all-time view can be approximated by first collapsing the data across years: “`r all_time <- h3_grid |> dplyr::group_by(h3_index) |> dplyr::summarise( fishing_hours = sum(fishing_hours), n_trips = sum(unique_trips), .groups = "drop" ) |> dplyr::mutate(year = "All years") plot_effort_map(all_time) “`