| catr_ovc_get_cod_munic | R Documentation |
Implementation of the OVCCallejero service ConsultaMunicipioCodigos.
Return the names and codes of a municipality. Returns both the codes as per the Cadastre and as per the INE (National Statistics Institute).
catr_ovc_get_cod_munic(cpro, cmun = NULL, cmun_ine = NULL, verbose = FALSE)
cpro |
The code of a province, as provided by
|
cmun |
Code of a municipality, as recorded on the Spanish Cadastre. |
cmun_ine |
Code of a municipality, as recorded on National Statistics Institute. See INE: List of municipalities |
verbose |
Logical, displays information. Useful for debugging,
default is |
Parameter cpro is mandatory. Either cmun or cmun_ine should be
provided.
On a successful query, the function returns a tibble
with one row including the following columns:
munic: Name of the municipality as per the Cadastre.
catr_to: Cadastral territorial office code.
catr_munic: Municipality code as recorded on the Cadastre.
catrcode: Full Cadastral code for the municipality.
cpro: Province code as per the INE.
catr_munic: Municipality code as per the INE.
catrcode: Full INE code for the municipality.
Rest of fields: Check the API Docs.
A tibble. See Details
mapSpain::esp_get_munic() to get shapes of municipalities,
including the INE code.
OVCCoordenadas API:
catr_ovc_get_cod_provinces()
Other search:
catr_atom_search_munic(),
catr_get_code_from_coords(),
catr_ovc_get_cod_provinces()
# Get municipality by cadastal code
ab <- catr_ovc_get_cod_munic(2, 900)
ab
# Same query using the INE code
ab2 <- catr_ovc_get_cod_munic(2, cmun_ine = 3)
ab2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.