View source: R/esp-get-comarca.R
| esp_get_comarca | R Documentation |
Returns Comarcas of Spain. Comarcas are traditional informal territorial division, comprising several municipalities sharing geographical, economic or cultural traits, typically with not well defined limits.
esp_get_comarca(
region = NULL,
comarca = NULL,
moveCAN = TRUE,
type = c("INE", "IGN", "AGR", "LIV"),
epsg = 4258,
update_cache = FALSE,
cache_dir = NULL,
verbose = FALSE
)
region |
character string. A vector of names and/or codes for provinces
or |
comarca |
character string. A name or |
moveCAN |
A logical |
type |
character string. One of |
epsg |
character string or number. Projection of the map: 4-digit EPSG code. One of:
|
update_cache |
logical. Should the cached file be refreshed? Default
is |
cache_dir |
character string. A path to a cache directory. See
Caching strategies section in |
verbose |
logical. If |
When using region you can use and mix names and NUTS codes
(levels 1, 2 or 3), ISO codes (corresponding to level 2 or 3) or
"cpro" (see esp_codelist).
When calling a higher level (Province, Autonomous Community or NUTS1), all the comarcas of that level will be added.
A sf object.
'Comarcas' (English equivalent: district, county, area or zone) does not always have a formal legal status. They correspond mainly to natural areas (valleys, river basins, etc.) or even to historical regions or ancient kingdoms.
In the case of Spain, comarcas only have an administrative character legally recognized in Catalonia, the Basque Country, Navarra (named merindades instead), in the region of El Bierzo (Castilla y Leon) and Aragon. Galicia, the Principality of Asturias, and Andalusia have functional comarcas.
esp_get_comarca() can retrieve several types of comarcas, each one
provided under different classification criteria.
"INE": Comarcas as defined by the National Statistics Institute (INE).
"IGN": Official comarcas, only available on some Autonomous Communities,
provided by the National Geographic Institute.
"AGR": Agrarian comarcas defined by the Ministry of Agriculture,
Fisheries and Food (MAPA).
"LIV": Livestock comarcas defined by the Ministry of Agriculture,
Fisheries and Food (MAPA).
Please check the download and usage provisions on gisco_attributions().
The use of the information contained on the INE website may be carried out by users or re-use agents, at their own risk, and they will be the sole liable parties in the case of having to answer to third parties due to damages arising from such use.
INE: PC_Axis files, IGN, Ministry of Agriculture, Fisheries and Food (MAPA).
Other datasets representing political borders:
esp_get_capimun(),
esp_get_ccaa(),
esp_get_ccaa_siane(),
esp_get_countries_siane(),
esp_get_gridmap,
esp_get_munic(),
esp_get_munic_siane(),
esp_get_nuts(),
esp_get_prov(),
esp_get_prov_siane(),
esp_get_simpl,
esp_get_spain(),
esp_get_spain_siane(),
esp_siane_bulk_download()
comarcas <- esp_get_comarca(moveCAN = FALSE)
library(ggplot2)
ggplot(comarcas) +
geom_sf()
# IGN provides recognized comarcas
rec <- esp_get_comarca(type = "IGN")
ggplot(rec) +
geom_sf(aes(fill = t_comarca))
# Legal Comarcas of Catalunya
comarcas_cat <- esp_get_comarca("Catalunya", type = "IGN")
ggplot(comarcas_cat) +
geom_sf(aes(fill = ine.prov.name)) +
labs(fill = "Province")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.