A presentation about FL hurricanes

A brief analysis

Author
Affiliation

Juan Carlos Villaseñor-Derbez (JC)

Rosenstiel School of Marine, Atmospheric, and Earth Science and Institute for Data Science and Computing

Intro + Objectives

  • Hurricanes affect the FL peninsula almost every year
  • Our goal is to identify the county that has been hit the most frequently (2022-2024)

Methods

  • Combine hurricane track data (vector) and county data (vector)
  • Count number intersections per county
  • Find the most hit county
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")

Results

  • The county with the most hurricanes is Taylor county
  • Between 2022 and 2024, it was hit 4 times

Results

Code
FL_hurricanes <- st_filter(data_hurricanes, FL_counties) |> 
  st_crop(FL_counties)
Warning: attribute variables are assumed to be spatially constant throughout
all geometries
Code
most_hit_county <- county_hur |> 
  filter(n_storms == max(n_storms))

mapview(county_hur,
        zcol = "n_storms",
        layer.name = "# Storms") + 
  mapview(most_hit_county,
          col.regions = "transparent",
          color = "red",
          lwd = 4,
          layer.name = "Taylor county") +
  mapview(FL_hurricanes,
          zcol = "name",
          layer.name = "Storm name",
          color = palette_UM(7))

Final remarks

  • Using Quarto markdown allows you to include R-generated code in cool slides

  • How I would probably go about building these slides

Code
flowchart LR
  A(data_hurricanes) --> C{processing/hurricanes_per_county.R}
  B(FL counties) --> C
  C --> D(county_hur.gpkg)
  C --> E(FL_hurricanes.gpkg)
  D --> F[slides.qmd
  Build leaflet in code chunk]
  E --> F

flowchart LR
  A(data_hurricanes) --> C{processing/hurricanes_per_county.R}
  B(FL counties) --> C
  C --> D(county_hur.gpkg)
  C --> E(FL_hurricanes.gpkg)
  D --> F[slides.qmd
  Build leaflet in code chunk]
  E --> F