library("dplyr") library("stringr") library("sf") library("leaflet") library("htmltools") library("htmlwidgets") setwd("/home/francois/frigos_localisation") frigo_table_sf <- read.csv("frigo_table.csv") %>% st_as_sf(frigo_table3, coords = c("lon", "lat")) if (file.exists("frigo_table_sf.geojson")){ file.remove("frigo_table_sf.geojson") } frigo_table_sf %>% write_sf("frigo_table_sf.geojson") l <- leaflet(data = frigo_table_sf) %>% addTiles() %>% addMarkers(popup = ~paste0( '

', Quoi, '

', Adresse, "

", Particularités %>% str_replace_all("\\n", "
") )) saveWidget(l, file = "frigo_carte.html")