library(readxl)
library(sf)
## Linking to GEOS 3.11.2, GDAL 3.7.2, PROJ 9.3.0; sf_use_s2() is TRUE
library(leaflet)
library(leaflet.extras)
library(dplyr)
##
## Attachement du package : 'dplyr'
## Les objets suivants sont masqués depuis 'package:stats':
##
## filter, lag
## Les objets suivants sont masqués depuis 'package:base':
##
## intersect, setdiff, setequal, union
library(data.table)
##
## Attachement du package : 'data.table'
## Les objets suivants sont masqués depuis 'package:dplyr':
##
## between, first, last
library(htmltools)
dep <- st_read("C:/Users/HP 830 G6/Downloads/20231121/IRIS_IDF/IRIS IDF/IRIS_INSEE_2021_IRIS_INSEE_2021_IRIS.shp")
## Reading layer `IRIS_INSEE_2021_IRIS_INSEE_2021_IRIS' from data source
## `C:\Users\HP 830 G6\Downloads\20231121\IRIS_IDF\IRIS IDF\IRIS_INSEE_2021_IRIS_INSEE_2021_IRIS.shp'
## using driver `ESRI Shapefile'
## Simple feature collection with 5265 features and 18 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: 161045.9 ymin: 6126895 xmax: 396132.6 ymax: 6315905
## Projected CRS: WGS 84 / Pseudo-Mercator
dep <- st_transform(dep, crs = st_crs(4326))
Carte <- leaflet()%>%
addTiles(group = "OSM")%>%
addPolygons(data = dep,
label = dep$NOM_COMMUN, popup = dep$CODE_DEPAR)
Carte