Description Usage Arguments Details Value Note See Also Examples
Uses approximate string matching to infer the entity names in
x and returns their official designation and geographical
coordinates.
1 2 3 | provinciator(x, division = "provincia", scope = bias())
provinciate(.data, .var, ...)
|
x |
A character vector. |
division |
The type of territorial division in |
scope |
A list with class bias used to favor the string matching
process of |
.data |
A data frame. |
.var |
A variable from |
... |
Other arguments passed to |
Geographical coordinates for "provincia" and "ccaa"
refer to the capital of the chosen division type.
If scope is used, follow this example as a guide:
scope = bias("provincia", c(1, 20, 48:49), 4)
Basque provinces (1, 20 & 48) plus Zamora (49) will be prioritized when
matching names in x and Almería (4) won't be used at all.
For provinciator, a tibble (i.e. tbl_df) with
the INE's
official division names in x plus their geographical coordinates.
For provinciate, an object of the same class as .data with the
results attached as new columns.
By default, tibbles print no more than 3 decimals. Use
options(pillar.sigfig = n) to change this number.
Use atlas to learn about the town names used by
provinciator.
1 2 3 4 5 6 7 8 9 | x. <- c("Almería", "Teruel", "Lérida")
provinciator(x.)
library(tidyverse)
edcn_towns <- edcn %>%
provinciate(town_of_birth, "municipio") %>%
select(town_of_birth, last_col(2:0), everything())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.