# your code here
library(leaflet)
library(sf)
## Linking to GEOS 3.13.1, GDAL 3.11.0, PROJ 9.6.0; sf_use_s2() is TRUE
setwd("C:/Users/HP G5/Documents/RStudio")

LE TABEAU DE DONNEES DE LA POPULATION( Femmes et Hommes) ELECTORALE DE 2020, LA LOGITUDE ET LA LATITUDE DE CHAQUE REGION

data=read.csv("C:/Users/HP G5/Desktop/Copie de Population-Electorale-2020.csv")
print(data)
##                              REGIONS  HOMMES  FEMMES Latitudes Longitudes
## 1                      AGNEBY-TIASSA  119958  112465  5.968502  -4.542048
## 2                             BAFING   35367   34124  8.457986  -7.422837
## 3                             BAGOUE   56535   59331  9.896245  -6.448633
## 4                             BELIER   66121   71736  6.907274  -4.919434
## 5                               BERE   50569   45117  8.425938  -6.011008
## 6                           BOUNKANI   34650   32019  9.079957  -3.329365
## 7                            CAVALLY   60281   49988  6.303215  -7.573283
## 8        DISTRICT AUTONOME D'ABIDJAN 1063257  988142  5.409118  -4.042210
## 9  DISTRICT AUTONOME DE YAMOUSSOUKRO   68900   66354  6.869145  -5.282328
## 10                             FOLON   17794   18899 10.104917  -7.451411
## 11                             GBEKE  191863  198596  7.699177  -5.096522
## 12                            GBOKLE   36335   28822  5.254467  -5.928269
## 13                               GOH  122130  114128  5.232233  -6.636089
## 14                          GONTOUGO  101284  108602  7.923439  -3.369677
## 15                      GRANDS-PONTS   69841   65301  5.454016  -4.648892
## 16                            GUEMON   98037   86274  5.454016  -4.648892
## 17                            HAMBOL   65334   65811  8.620199  -4.813653
## 18                    HAUT-SASSANDRA  184814  170006  7.030471  -6.618953
## 19                             IFFOU   55208   60741  7.497754  -4.121354
## 20                  INDENIE-DJUABLIN   69105   66547  6.621645  -3.468958
## 21                        KABADOUGOU   40884   43184  9.304360  -7.335841
## 22                    LA ME(Lagunes)  104843  105230  5.375680  -3.827110
## 23                       LOH-DJIBOUA  119958  109740  5.694542  -5.499447
## 24                          MARAHOUE  115943  107414  7.138203  -5.756930
## 25                           MORONOU   60344   64905  6.594265  -4.157999
## 26                              NAWA  103607   86459  5.947812  -6.686106
## 27                              N'ZI   43762   52288  7.010366  -4.417876
## 28                              PORO  149762  154077  9.476002  -5.731222
## 29                         SAN-PEDRO  101464   78376  4.758999  -6.646392
## 30                         SUD-COMOE  120427  113040  5.683248  -3.174296
## 31                          TCHOLOGO   66699   63547  9.546602  -4.784512
## 32                            TONKPI  153868  142939  7.372142  -7.944586
## 33                        WORODOUGOU   43093   41174  8.397718  -6.757576
## 34                          DIASPORA   56940   40729  6.835626  -5.325193
## 35             COTE D'IVOIRE (Total) 3848977 3646105  7.989737  -5.567946
leaflet(data) %>%
  addTiles() %>%
  addMarkers(lng = ~Longitudes, lat = ~Latitudes, popup = ~REGIONS)
leaflet(data) %>%
  addTiles() %>%
  addMarkers(
    lng = ~Longitudes, 
    lat = ~Latitudes,
    popup = ~paste0(
  "<div style='background-color:#f9f9f9; padding:10px;'>",
  "<b style='color:#2c3e50;'>", REGIONS, "</b><br>",
  "<span style='color:#007BFF;'>Hommes: ", HOMMES, "</span><br>",
  "<span style='color:#E91E63;'>Femmes: ", FEMMES, "</span>",
  "</div>"
))