https://github.com/calderonsamuel/ubigeosperu
https://github.com/calderonsamuel/ubigeosperu
geocoding peru peruvian peruvian-cities r
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/calderonsamuel/ubigeosperu
- Owner: calderonsamuel
- License: other
- Created: 2019-11-16T16:15:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-27T22:00:45.000Z (about 5 years ago)
- Last Synced: 2025-01-30T21:18:21.158Z (4 months ago)
- Topics: geocoding, peru, peruvian, peruvian-cities, r
- Language: R
- Size: 78.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# ubigeosperu
[](https://www.repostatus.org/#active)
[](https://cran.r-project.org/package=ubigeosperu)The goal of ubigeosperu is to have an easy way to get the peruvian ubigeos into R. The data has been collected from CONCYTEC's GitHub [repository](https://github.com/CONCYTEC/ubigeo-peru/blob/master/equivalencia-ubigeos-oti-concytec.csv).
## Installation
You can install the released version of ubigeosperu from [CRAN](https://CRAN.R-project.org) with:
``` r
## This will work when the package is published into CRAN
install.packages("ubigeosperu")
```And the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("calderonsamuel/ubigeosperu")
```
## ExampleThis is a basic example which shows you how to solve a common problem:
```{r library, message=FALSE}
library(ubigeosperu)
library(dplyr)
```ubigeosperu contains a single dataframe object containing the peruvian ubigeos codes.
```{r dim, message=FALSE}
dim(ubigeos)
```The ubigeos dataset is a tibble.
```{r tibble, message=FALSE}
ubigeos
```You can access the tidy version and pipe it!
```{r tidy, message=FALSE}
ubigeos_tidy %>%
filter(lugar == "CHORRILLOS", nivel == "Distrito")
```