responses <- readxl::read_excel("Responses.xlsx")
responses %<>%
separate(lat_lon, into = c("lat", "lon"), ", ") %>%
filter(!is.na(lon))
responses_map <- st_as_sf(responses,
coords = c("lon", "lat"),
crs = 4326)
responses_map <- responses_map[c(1, 2, 5, 6),]
leafIcons <- icons(
iconUrl = c(
"Images/pontoon 2.png",
"Images/zoo 2.png",
"Images/bike.png",
"Images/shakespeare 2.png"
),
iconWidth = 150, iconHeight = 150,
iconAnchorX = 75, iconAnchorY = 75
)
m <- leaflet(responses_map) %>%
addProviderTiles(providers$Stadia.StamenWatercolor) %>%
addMarkers(
icon = leafIcons,
#clusterOptions = markerClusterOptions(),
label = c("Taylorsville Lake", "Louisville Zoo", "Big Four Bridge", "Shakespeare in the Park"),
labelOptions =
labelOptions(
noHide = F,
direction = "bottom",
opacity = 0.8,
style = list(
"font-family" = "Arial",
"font-size" = "24px",
"border-color" = "rgba(0,0,0,0.5)")))
m