Hi all,
I am new here and hope I am not asking something that has been answered before; I looked and looked and could not find the answer to this.
I want to add markers from a different dataframe onto a map of North Carolina using plot_ly. However, I am having trouble layering the markers. Here is the code I was thinking:
nc ← sf::st_read(system.file(“shape/nc.shp”, package = “sf”), quiet = TRUE)
plot_ly(nc) %>%
add_markers(data = link2feed_partner_data,
x = ~Longitutde,
y = ~Latitude)
To get around this, I use ggplotly with a ggplot of two geom_sf objects. However, this is quite slow in shiny and not as precise as plot_ly.
Any suggestions?
Thank you!!