Instructions

Create a web page using R Markdown that features a map created with Leaflet. Host your webpage on either GitHub Pages, RPubs, or NeoCities. Your webpage must contain the date that you created the document, and it must contain a map created with Leaflet. We would love to see you show off your creativity!

The submission

Map 1. Commercial offices of Mercantil Bank in Venezuela

Tha data source

head(gps,1)
##   codigo_oficina nombre_oficina   nombre_region codigo_estado_ine
## 1           9235      LA PELOTA METROPOLITANA I                 1
##     estado_ine codigo_municipio_ine municipio_ine codigo_ciudad_ine
## 1 GRAN CARACAS                10100    LIBERTADOR                14
##   ciudad_ine codigo_urbanizacion_ine urbanizacion_ine
## 1    CARACAS                       7       ALTAGRACIA
##                                                                                                                                                                                                direccion
## 1 AVENIDA URDANETA ENTRE AVENIDA SUR 5 Y AVENIDA NORTE 3, EDIFICIO PLAZA, DIAGONAL A MC DONALD'S. ESTADO DISTRITO CAPITAL, CIUDAD CARACAS, MUNICIPIO LIBERTADOR, PARROQUIA ALTAGRACIA, SECTOR ALTAGRACIA
##   latitud  longitud                  coordenadas
## 1 10.5073 -66.91113 10.5073030000,-66.9111280000

The code

## Reading the data source

file <- "bm_geo.csv"
gps<- read.csv(file)

## showing the content's file
names(gps)

## Creating the Map
library(leaflet)
mi_map <- leaflet() %>% 
  addTiles()

## reading the latitude and the longitude
bmLatLong <- data.frame(
  lat = c(gps$latitud),
  lng = c(gps$longitud))

## reading the names of the offices to read these in the PopUp's markers
bminsSites <- gps$nombre_oficina

bmLatLong %>% 
  leaflet() %>%
  addTiles() %>%
  addMarkers(popup = bminsSites)