An open API service indexing awesome lists of open source software.

https://github.com/calderonsamuel/ubigeosperu


https://github.com/calderonsamuel/ubigeosperu

geocoding peru peruvian peruvian-cities r

Last synced: 2 months ago
JSON representation

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

[![Project Status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![CRAN status](https://www.r-pkg.org/badges/version/ubigeosperu)](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")
```
## Example

This 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")
```