knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of perumapas
is to have an easy way to draw maps with peruvian shapes.
You can install the released version of perumapas from the calderonsamuel r-universe with:
install.packages("perumapas", repos = 'https://calderonsamuel.r-universe.dev')
This is a basic example which shows you how to solve a common problem:
# messages were removed library(perumapas) # usar siempre junto con sf library(sf) # obligatorio! library(ggplot2) # for plotting library(dplyr) # for filtering
You can create maps easily.
mapa_distrital %>% filter(departamento == "LIMA", provincia == "LIMA") %>% ggplot() + geom_sf()
mapa_distrital
has avaiable the ubigeo field to easily join/merge with another dataset.
head(mapa_distrital, 10)
To learn how to use mapa_regional
and mapa_provincial
see vignette('basic-usage')
.
The shapefiles for mapa_distrital
were obtained from https://www.geogpsperu.com/2019/05/limite-distrital-actualizado-inei.html
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.