getGADM: Get Geographic Adminitrative Unit

getGADMR Documentation

Get Geographic Adminitrative Unit

Description

This function can retrieve Geographic Administrative Data Maps (GADM).

Usage

getGADM(unit.nm = NULL, 
    level = 2, country = "COL", 
    ext = "json", path = tempdir())

Arguments

unit.nm

character or NULL. Name of Geographic Administrative Data Map (e.g., municipality), or the name of such an unit plus its corresponding higher-level unit (e.g., department/state). If NULL then a list of administrative subdivisions is printed.

level

numeric. A number between zero and two, indicating any of the levels of administrative subdivisions (0=country, 1=first administrative subdivision, and 2=second administrative subdivision).

country

character. ISO code specifying a country. Default 'COL'.

ext

character. File extension of the retrieved data file. Default 'json'.

path

character. Path name indicating where the unit will be stored. Default stores the data in a temporary directory.

Value

SpatialPolygonsDataFrame or character vector of GADM units..

Author(s)

Wilson Lara Henao <wilarhen@gmail.com> [aut, cre] (<https://orcid.org/0000-0003-3527-1380>), Victor Gutierrez-Velez [aut] (<https://orcid.org/0000-0003-1338-2020>), Ivan Gonzalez [ctb] (<https://orcid.org/0000-0002-0313-398X>), Maria C. Londono [ctb] (<https://orcid.org/0000-0002-2317-5503>)

References

https://gadm.org/

Examples

## Printing municipalities of Colombia:

     
         muni <- getGADM(NA)
         head(muni)
     


ecochange documentation built on June 22, 2024, 10:53 a.m.