Description Usage Arguments Value Examples
View source: R/get_data_functions.R
Retrieves the number of the recorded vital events (all, births, marriages, and deaths) available at the ARPEN website https://transparencia.registrocivil.org.br/registros according to the arguments provided.
The functions work by navigating to the ARPEN website and filling the form in order to generate a scrapable webpage.
The functions take a pre-initialized webDriver from the RSelenium package (see example).
get_all_registries()
Retrieves the number off all registries.
get_births()
Retrieves the number of registered births.
get_marriages()
Retrieves the number of registered marriages.
get_deaths()
Retrieves the number of registered deaths.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | get_all_registries(
rd = NULL,
year = "2020",
month = "Todos",
state = "Todos",
wait = 10L
)
get_births(
rd = NULL,
year = "2020",
month = "Todos",
state = "Todos",
wait = 10L
)
get_marriages(
rd = NULL,
year = "2020",
month = "Todos",
state = "Todos",
wait = 10L
)
get_deaths(
rd = NULL,
year = "2020",
month = "Todos",
state = "Todos",
wait = 10L
)
|
rd |
An initialized RSelenium webdriver. |
year |
A numerical or character representing the year you want to retrieve the registries from. |
month |
A character representing the month name in Portuguese or "Todos" for retrieving data from all the months in the selected year. |
state |
A character representing the State name in Portuguese or "Todos" for retrieving data from all states. |
wait |
An integer representing how long to wait before starting the scraping operation after reaching the Brazilian Association of Civil Registries website. |
A data frame containing the requested data. If no data was found, an empty data frame is returned.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
rs <- RSelenium::rsDriver(browser = "firefox")
rd <- rs$client
get_all_registries(rd, "2018", "Janeiro", "Acre")
get_deaths(rd, "2020", "Maio", "Todos")
rd$quit()
rd$server$stop()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.