Code
# Load packages
library(tidyverse)── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.2 ✔ tibble 3.3.0
✔ lubridate 1.9.4 ✔ tidyr 1.3.1
✔ purrr 1.1.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Code
library(EVR628tools)✔ ✔ ✔ You sucessfully loaded the EVR628tools package ✔ ✔ ✔
Code
library(here)here() starts at /Users/jcvd/GitHub/EVR_628
Code
library(sf)Linking to GEOS 3.13.0, GDAL 3.8.5, PROJ 9.5.1; sf_use_s2() is TRUE
Code
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)Warning in CPL_read_ogr(dsn, layer, query, as.character(options), quiet, : GDAL
Message 1: Non-conformant content for record 1 in column CreationDate,
2025-10-07T20:05:32.0Z, successfully parsed
Code
# 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")