process_sim: Prepare SIM mortality microdata

View source: R/process_sim.R

process_simR Documentation

Prepare SIM mortality microdata

Description

Recodes supported SIM mortality fields into descriptive values and normalizes escaped Unicode text. Codes without a documented conversion are retained.

Usage

process_sim(data, municipality_data = TRUE)

Arguments

data

A data frame returned by fetch_datasus() for a SIM mortality system, or another data frame with a compatible layout.

municipality_data

Logical scalar. If TRUE, add municipality names and available territorial attributes for supported municipality-code columns.

Details

Columns not explicitly recoded are retained, but Unicode normalization is applied to every column and consequently the returned tibble contains character columns.

Value

A tibble with character columns. Supported codes are replaced with descriptions, and municipality fields are added when requested and available.

References

Saldanha, R. F. (2026). SIM – Sistema de Informação sobre Mortalidade.

See Also

fetch_datasus()

Examples

process_sim(sim_do_sample)


microdatasus documentation built on July 29, 2026, 5:08 p.m.