| microdados_arquivos | R Documentation |
Builds the official DATASUS transfer paths and optionally checks whether each file currently exists. SIM and SINASC files are annual; SIH files are monthly.
microdados_arquivos(
sistema,
tipo = NULL,
ano,
mes = NULL,
uf = NULL,
preliminares = TRUE,
verificar = TRUE,
timeout = 120
)
sistema |
System: '"sim"', '"sinasc"' or '"sih"'. |
tipo |
File type returned by [microdados_catalogo()]. 'NULL' selects the default type for the system. |
ano |
One or more four-digit years. |
mes |
One or more months from 1 to 12. Required for SIH. |
uf |
One or more state abbreviations, two-digit IBGE codes or state names. Required for UF-scoped types. |
preliminares |
Whether preliminary directories may be considered. |
verificar |
Whether to verify file existence on the DATASUS server. |
timeout |
Network timeout in seconds for file discovery. |
A data frame containing official file names, URLs and existence checks. Provenance records the selection and consultation time.
old_options <- options(
datasus.timeout = 5,
datasus.download_timeout = 15,
datasus.max_tries = 1
)
try({
microdados_arquivos("sim", ano = 2023, uf = "RR")
microdados_arquivos("sih", ano = 2024, mes = 1, uf = "AC")
})
options(old_options)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.