Code
# Load packages
library(tidyverse)
library(EVR628tools)
library(here)
library(sf)
library(mapview)
# Load data
data("data_hurricanes")
FL_counties <- read_sf(here("data/raw/Florida_County_Boundaries_with_FDOT_Districts_-801746881308969010.gpkg")) |>
janitor::clean_names() |>
st_set_geometry("geometry") |>
select(county_name = name,
county_fips = first_fips)
# Find n storms per county
county_hur <- st_join(FL_counties, data_hurricanes) |>
group_by(county_name, county_fips) |>
summarize(n_storms = n_distinct(name,
na.rm = T),
.groups = "drop")