Title: | IPEA Common Functions |
---|---|
Description: | The most used functions on IPEA (Instituto de Pesquisa Economica Aplicada). Most of functions deal with brazilian names. It can guess the women single's name, extract prepositions or extract the first name. |
Authors: | Gustavo Coelho [aut, cre], Lucas Mation [aut], Daniel Lima [ctb], Igor Noberto [ctb], João Victor Machado [ctb] |
Maintainer: | Gustavo Coelho <[email protected]> |
License: | GPL-3 |
Version: | 0.0.5 |
Built: | 2024-11-12 05:11:21 UTC |
Source: | https://github.com/ipea/utilsipea |
abrevia_nome_meio
return names .
abrevia_nome_meio(base, ..., suffixo = "_abrev")
abrevia_nome_meio(base, ..., suffixo = "_abrev")
base |
A data table, data frame or character vector. |
... |
columns for apply the function |
suffixo |
A character indicating the final part of the new columns' names |
the base parameter with a new column.
base <- data.frame(nome = c("Carlos Pereira Neves", "Pedro Aparecido Anjos")) base <- remove_preposicao_nomes(base, "nome")
base <- data.frame(nome = c("Carlos Pereira Neves", "Pedro Aparecido Anjos")) base <- remove_preposicao_nomes(base, "nome")
extrai_NomeProprio
Parse Brazilian names and returns given names, surnames and gender
extrai_NomeProprio(x, surname = FALSE, gender = FALSE, stringdist = TRUE, spaces = TRUE)
extrai_NomeProprio(x, surname = FALSE, gender = FALSE, stringdist = TRUE, spaces = TRUE)
x |
List, character or factor with names to be parsed. |
surname |
If TRUE, the list of surnames is returned. |
gender |
If TRUE, the list of gender based on the names is returned. |
stringdist |
if TRUE, make a prediction based on the string distance of Jaro-Winkler between the source data and the input. |
spaces |
if TRUE, returns the names without spaces. If FALSE, it compress all the blank spaces. |
Returns a data.table
Some addresses from Brazil
geocod_base
geocod_base
A data frame with 5 rows and 12 variables:
state of Brazil
Address returned from GALILEO
Zip code
Prompted Address
City names
ident_erros_munic_galileo
Returns a new column called munmatch with true or false. This column identify where GALILEO failedident_erros_munic_galileo
Returns a new column called munmatch with true or false. This column identify where GALILEO failed
ident_erros_munic_galileo(base, mun, match, uf)
ident_erros_munic_galileo(base, mun, match, uf)
base |
Data frame, data set with return from GALILEO |
mun |
character, the name of the municipio. |
match |
character, the colum MatchAdress from GALILEO. |
uf |
character, the name of the state. |
Returns a new column called munmatch with true or false.
nome_de_solteira
Return women single's name using the husband last name.
nome_de_solteira(nome_casada, nome_conjuge)
nome_de_solteira(nome_casada, nome_conjuge)
nome_casada |
Character, married woman's name |
nome_conjuge |
character, husband's name. |
Returns a list of possible names
nome_de_solteira(nome_casada = "Maria Conceicao da Costa", nome_conjuge = "Mario Silva da Costa")
nome_de_solteira(nome_casada = "Maria Conceicao da Costa", nome_conjuge = "Mario Silva da Costa")
remove_preposicao_nomes
return names without de, da e dos.
remove_preposicao_nomes(base, ..., suffixo = "_semD")
remove_preposicao_nomes(base, ..., suffixo = "_semD")
base |
A data table, data frame or character vector. |
... |
columns for apply the function |
suffixo |
Suffix name for the new column. |
the base parameter with a new column.
base <- data.frame(nome = c("João das Neves", "Pedro dos Anjos", "Maria das Gracas")) base <- remove_preposicao_nomes(base, "nome")
base <- data.frame(nome = c("João das Neves", "Pedro dos Anjos", "Maria das Gracas")) base <- remove_preposicao_nomes(base, "nome")