Home

Awesome

geouy <img align="right" src="man/figures/geouy_logo_a.png" alt="logo" width="160"> <img align="right" src="man/figures/geouy_logo_b.png" alt="logo" width="160">

<!-- badges: start -->

CRAN/METACRAN Version CRAN/METACRAN Total downloads CRAN/METACRAN downloads per month Project Status: Active – The project has reached a stable, usable state and is being actively developed. R build status AppVeyor build status Codecov test coverage DOI

<!-- badges: end -->

geouy is an R package that allows users to easily access official spatial data sets of Uruguay. The package includes a wide range of geospatial datasets as simple features (sf), available at various geographic scales and for various years with harmonized attributes and projection (see detailed list below).

Installation

# From CRAN
  install.packages("geouy")
  library(geouy)
  
# Use the development version with latest features
  utils::remove.packages('geouy')
  devtools::install_github("RichDeto/geouy")
  library(geouy)

obs. If you use Linux, you need to install a couple dependencies before installing the libraries sf and geouy. More info here.

Basic Usage

load_geouy

The syntax of all geouy functions operate one the same logic so it becomes intuitive to download any data set using a single line of code. Like this:

secc <- load_geouy("Secciones")

Available datasets:

Administrative limits
LayerProductorSourceYearFormat
"Uruguay""INE"MIDES2011wfs
"Areas administrativas""SGM"SGM2011wfs
"Deptos""INE"IDE2011wfs
"Dptos""DINAMA""MVOTMA"2020wfs
"Limites departamentales""IGM""IGM"2011wfs
"Departamentos""IDE""MIDES"2011wfs
"Secciones""INE Censo"MIDES2011wfs
"Segmentos""INE Censo"MIDES2011wfs
"Zonas""INE Censo"MIDES2011wfs
"Secc MVD 2004""INE"MIDES2004wfs
"Segm MVD 2004""INE"MIDES2004wfs
"Segm URB INT 2004""INE"MIDES2004wfs
"Zonas MVD 2004""INE"MIDES2004wfs
"Zonas URB INT 2004""INE"MIDES2004wfs
"Localidades pg""INE Censo"MIDES2011wfs
"Localidades pt""INE Censo"MIDES2011wfs
"Centros poblados pg""SGM"SGM2011wfs
"Centros poblados pt""SGM"SGM2011wfs
"Municipios10""DINOT-IM-IC"MVOTMA2010zip
"Municipios15""DINOT-IM-IC"MVOTMA2015zip
"CCZ""INE"MIDES2011wfs
"Asentamientos irregulares""PMB"MIDES2014wfs
"Barrios""INE"MIDES2011wfs
"Balnearios""MTOP"MTOP2017wfs
"Secciones catastrales""DNC"MVOTMA2013zip
"Padrones rurales""DNC""MVOTMA"2014zip
"Padrones urbanos""DNC"MVOTMA2014zip
"Secciones policiales""MI"MVOTMA2017zip
Demography
LayerProductorSourceYearFormat
"LocHog11""INE"IDE2011zip
"LocPobHom11""INE"IDE2011zip
"LocPobMuj11""INE"IDE2011zip
"LocViv11""INE"IDE2011zip
Hidrology
LayerProductorSourceYearFormat
"Cuencas hidro N1""DINAGUA"MVOTMA2020zip
"Cuencas hidro N2""DINAGUA"MVOTMA2020zip
"Cuencas hidro N3""DINAGUA"MVOTMA2020zip
"Cuencas hidro N4""DINAGUA"MVOTMA2020zip
"Cuencas hidro N5""DINAGUA"MVOTMA2020zip
"Cursos de agua navegables y flotables""MTOP"MTOP2019wfs
"Lagunas publicas""MTOP"MTOP2019wfs
"Ambientes acuaticos""FREPLATA"MVOTMA2009zip
"Areas protegidas"DINAMA"MVOTMA2015zip
"Baniados""DINAMA"MVOTMANAzip
"Batimetria""DINAMA"MVOTMA2020zip
Ways
LayerProductorSourceYearFormat
"Rutas""IDE"MIDES2017wfs
"Calles""IDE - UTE - IM"MIDES2017wfs
"Peajes""MTOP"MTOP2019wfs
"Postes Kilometros""MTOP"MTOP2019wfs
Services
LayerProductorSourceYearFormat
"OTs""MIDES"MIDES2022zip
"Educación en Primera Infancia e Inicial""CEIP"MIDES2020zip
"Jardines de infantes""CEIP"MIDES2020zip
"Colegios privados N0a3""CEIP"MIDES2020zip
"Escuelas con N3""CEIP"MIDES2020zip
"Escuelas""CEIP"MIDES2020zip
"Educacion especial""CEIP"MIDES2020zip
"Educacion secundaria""CEIP"MIDES2020zip
"UTU""ANEP"MIDES2020zip
"Instituciones deportivas""IDE"MIDES2015wfs
"Playas""DINAMA¨MVOTMA2007zip
Orthophotos
LayerProductorSourceYearFormat
"Grilla ortofotos urbana""IDE"IDE2019wfs
"Grilla ortofotos nacional""IDE"IDE2019wfs
Land Cover
LayerProductorSourceYearFormat
"Cobertura suelo 2000""DINAGUA"MVOTMA2000zip
"Cobertura suelo 2008""DINAGUA"MVOTMA2008zip
"Cobertura suelo 2011""DINAGUA"MVOTMA2011zip
"Cobertura suelo 2015""DINAGUA"MVOTMA2015zip
"CONEAT""RENARE""RENARE"NAwfs

which_uy()

Add to an sf object its spatial coincidence with one or more administrative units in Uruguay, generating the corresponding variables.

where_uy()

You get an sf object of one or more administrative units in Uruguay, according to a query by code or name in the layer.

add_geom()

This function allows you to add a geom variable with a code variable of "zona", "barrio", "localidad", "segmentos", "secciones" or "departamentos".

geocode_ide_uy()

Allows geocoding directions using IDE_uy.

plot_geouy()

Plot a variable of your sf object with north and scale, set on a simple theme.

Other functions:

is.uy4326(): Test if an sf object match with Uruguay at crs = 4326. is.uy32721(): Test if an sf object match with Uruguay at crs = 32721. is.uy5381(): Test if an sf object match with Uruguay at crs = 5381. is.uy5382(): Test if an sf object match with Uruguay at crs = 5382.

Datasets

metadata

This dataset has the metadata of all vector geometries provided by geouy and detailed at the top

metadata_wms

This dataset has the metadata of all the raster services that will be provided by geouy, although the functions are still under development.

loc_agr_ine

This dataset allows you to aggregate Localidades INE by the aglomerations used by INE. An example of use can be:

loc <- which_uy(base, "Localidades pg") %>% 
    dplyr::left_join(loc_agr_ine, by = c("cod_Localidades pg" = "codloc"))

uy_deptos_grid and mvd_barrios_grid

Two datasets to use as geofacet grid dataset for departments of Uruguay and neighborhoods of Montevideo.

History

This package arises from the conjugation of own ideas with an eye on the region. It started as a part of the package where I work with @calcita at ech, and some geospatial service packages in the region mainly: geobr and chilemapas

This walk on the shoulders of giants, allows this package focused on this small country (my beautiful Uruguay), to have its own particularities although it tries to fit especially to geobr in its structure and with a view to complementing ech.

Community contributions es

This package intends to incorporate any function of general requirements that use the geographic data of Uruguay as a base. All contributions in this regard are welcome.

If you work with geographic data of Uruguay and want to add your function or data, we recommend that you read the following tips on how to collaborate:

To add your function:

- Fork of this repository
- Add your function as an `.R` file in the `R/` folder with the same name as the function
- Document it with `roxygen2` clarifying its functionality, parameters and an example of use. To see how it is documented to review another function in the same directory
- Remember at the end of the documentation you must add a # '@export
- Check that the types and values of your function parameters are fine (for example, you can look at `data-raw/metadata.R`
- Add the dependencies in the `DESCRIPTION` file 
- Check the package with devtools::check()
- If everything works fine, then make a pull request

To add geographic data to the load_geouy() function:

- Fork of this repository
- Identify the corresponding WFS service URL
- Add a record to the `metadata` file in the `data-raw/` directory, with the corresponding data.
- Also include this record in the corresponding table of the `README.md` file, with the corresponding format.
- If everything works fine, then make a pull request

<i class="fa fa-pencil" aria-hidden="true"></i> Citation

To cite geouy in publications, please use:

Detomasi, Richard (2021) "geouy: Geographic Information of Uruguay". R package version 0.2.5 URL: https://github.com/RichDeto/geouy.

A BibTeX entry for LaTeX users is:

@Misc{geouy,
  title = {geouy: Geographic Information of Uruguay},
  author = {Richard Detomasi},
  note = {R package version 0.2.5},
  year = {2021},
  url  = {https://github.com/RichDeto/geouy},
}