Skip to contents

Searches for a municipality by name or cadastral code in the Cadastre of Navarre ATOM index.

Usage

catrnav_atom_search_munic(
  munic,
  cache = deprecated(),
  update_cache = FALSE,
  cache_dir = NULL,
  verbose = FALSE
)

Arguments

munic

A single municipality name, partial name or cadastral code. Accepts a character string or numeric code. Use catrnav_atom_search_munic() to search for available municipalities.

cache

[Deprecated] This argument is no longer supported because results are always cached.

update_cache

Logical. Whether to refresh the cached file. Defaults to FALSE.

cache_dir

Path to a cache directory. If NULL, uses the configured cache or a directory inside base::tempdir(). See catrnav_set_cache_dir().

verbose

Logical. Whether to display informational messages.

Value

A tibble with the municipality name and cadastral code. Returns NULL if no match is found or the data cannot be retrieved.

Examples

catrnav_atom_search_munic("Pamplona")
#> # A tibble: 1 × 2
#>   munic                catrcode
#>   <chr>                <chr>   
#> 1 201 Pamplona / Iruña 201     

# Search using a numeric cadastral code.
catrnav_atom_search_munic(201)
#> # A tibble: 1 × 2
#>   munic                catrcode
#>   <chr>                <chr>   
#> 1 201 Pamplona / Iruña 201