sim: Query mortality data from SIM

View source: R/vital-statistics.R

simR Documentation

Query mortality data from SIM

Description

Provides a single interface to the mortality tables of the Mortality Information System (SIM). Available datasets are listed by 'datasus_catalogo("sim")'; current row, column, measure, period and filter choices can be inspected with 'datasus_opcoes("sim", ...)'.

Usage

sim(
  conjunto = "obitos",
  abrangencia = c("municipio", "uf"),
  uf = NULL,
  linha = NULL,
  coluna = NULL,
  conteudo = 1,
  periodo = "last",
  filtros = list()
)

Arguments

conjunto

SIM dataset: '"obitos"', '"mortalidade_infantil"', '"causas_evitaveis_0_4"' or '"causas_evitaveis_5_74"'.

abrangencia

Geographic form: '"municipio"' for municipality-level results or '"uf"' for region/state-level results.

uf

Optional state abbreviation, two-digit IBGE code or state name. With 'abrangencia = "municipio"', selects the state-specific municipal form. It must be 'NULL' with 'abrangencia = "uf"'.

linha

Row dimension. ‘NULL' selects the form’s first dimension.

coluna

Column dimension. 'NULL' selects '"Não ativa"'.

conteudo

Measure label, raw TABNET value or one-based index.

periodo

'"last"' for the latest available year, an exact period label or raw value, a four-digit year, or a vector of these values.

filtros

Named list of filters. Use [datasus_opcoes()] to inspect their names and accepted values.

Value

A data frame containing the TABNET result, with query provenance available through [datasus_proveniencia()].

Examples


old_options <- options(
  datasus.timeout = 5,
  datasus.download_timeout = 15,
  datasus.max_tries = 1
)
try({
datasus_catalogo("sim")
op <- datasus_opcoes(
  "sim", "obitos", abrangencia = "uf"
)
obitos <- sim(
  conjunto = "obitos",
  abrangencia = "uf",
  periodo = 2024,
  filtros = list(sexo = "Masculino")
)
})
options(old_options)


datasus documentation built on Oct. 7, 2026, 1:07 a.m.