Interactive and static maps of California oil spills
# Read in the oil spill data
oil_spill <- read_sf(here("data", "oil_spill", "Oil_Spill_Incident_Tracking_%5Bds394%5D.shp")) %>%
clean_names()
# Read in California counties outline
ca_counties <- read_sf(here("data", "ca_counties", "CA_Counties_TIGER2016.shp")) %>%
clean_names()
# Check CRS (Coordinate Reference System)
# st_crs(oil_spill) # WGS 84
# st_crs(ca_counties) # WGS 84
# Set tmap viewing mode to interactive
tmap_mode("view")
# Make an interactive map
tm_shape(ca_counties) +
tm_borders() +
tm_shape(oil_spill) +
tm_dots(col = "sienna2")