library(sf)
## Linking to GEOS 3.9.1, GDAL 3.4.0, PROJ 8.1.1; sf_use_s2() is TRUE
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.5     ✓ purrr   0.3.4
## ✓ tibble  3.1.6     ✓ dplyr   1.0.7
## ✓ tidyr   1.1.4     ✓ stringr 1.4.0
## ✓ readr   2.1.1     ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(mapview)
## Warning: multiple methods tables found for 'direction'
## Warning: multiple methods tables found for 'gridDistance'
library(leaflet)
crashes <- read_sf("~/Downloads/Crashes_Involving_Cyclists.geojson")
greenways <- read_sf("~/Downloads/Greenways_in_Wake_County.geojson")
mapviewOptions(fgb = FALSE)
mapview(crashes, color = "red") +
  mapview(greenways, color = 'green')
## Warning in validateCoords(lng, lat, funcName): Data contains 1 rows with either
## missing or invalid lat/lon values and will be ignored