Get new births data from SINASC
get_sinasc.RdRetrieves new births data from PCDaS API.
Usage
get_sinasc(
  agg,
  agg_time = "year",
  ano,
  pcdas_token = NULL,
  sexo = NULL,
  more_filters = NULL,
  fetch_size = 65000
)Arguments
- agg
- character. Spatial aggregation level. - uf_resfor UF of residence.- uf_ocorfor UF of occurrence.- regsaude_resfor regiao de saude of residence.- regsaude_ocorfor regiao de saude of occurence.- regsaude_449_resfor regiao de saude (449 units) of residence.- regsaude_449_ocorfor regiao de saude (449 units) of occurence.- mun_resfor municipality of residence.- mun_ocorfor municipality of ocurrence.
- agg_time
- character. Time aggregation level. - yearfor yearly data.- monthfor monthly data.- weekfor weekly data. Defaults to- year.
- ano
- numeric. Year of birth 
- pcdas_token
- character. PCDaS API token. If not provided, the function will look for it on renvirom. 
- sexo
- character. Sex of the new birth - Masculinofor males,- Femininofor females and- Ignoradofor unknown.
- more_filters
- character. Additional filters can be added by using this parameter, with a SQL query. 
- fetch_size
- character. Pagination size for API call. 
Details
This function uses raw data from the Sistema de Informações de Nascidos Vivos (SINASC) available at the PCDaS API. A documentation about this data can be found at https://pcdas.icict.fiocruz.br/conjunto-de-dados/sistema-de-informacao-sobre-nascidos-vivos/.
Examples
# Some examples
get_sinasc(agg = "mun_res", ano = 2010)
#> Error in get_pcdas_token_renviron(): PCDaS token API not provided and not found on renviron. Please provide PCDaS API token.
get_sinasc(agg = "uf_ocor", ano = 2010)
#> Error in get_pcdas_token_renviron(): PCDaS token API not provided and not found on renviron. Please provide PCDaS API token.