In this work we are presenting some advantages of using Rmarkdown and leaflet in working with maps. This gives a comfortable alternatives to the traditional softwares that are used.
library(knitr)
library(maps)
library(leaflet)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
The following accompanying codes produces maps of key places in Nigeria.
olu <- leaflet() %>%
addTiles() %>% # Add default OpenStreetMap map tiles
addMarkers(lat=4.982873, lng = 8.334503, popup = "THE CITY OF CALABAR, Calabar") %>%
addMarkers(lat = 6.3858,lng = 9.3745,popup ="Obudu ranch mountain resort,Obudu") %>%
addMarkers(lat = 9.0833,lng = 7.5361, popup="ASO ROCK, ABJ") %>%
addMarkers(lat = 7.7833333333,lng = 10.00000000, popup ="RIVER BENUE, MARKURDI") %>%
addMarkers(lat=7.4273,lng=4.9091, popup="IPETU-IJESA, OSUN") %>%
addMarkers(lat=4.8177,lng=8.02593, popup="NSIT ATAI, AKWA IBOM STATE")
olu
Also taking a look at the famous river Niger.
ade<- leaflet() %>%
addTiles() %>%
addMarkers(lat = 13.8601, lng = -3.333328, popup = "RIVER NIGER")
ade
CONCLUSION ———- Using the Rmarkdown and leaflet to present maps makes less stressful and does not require full knowledge of the usual map applications.