Skip to contents

Automatically detects the table type and applies the appropriate processing pipeline: standardises column names, converts types, validates IBGE codes, and adds metadata attributes.

Usage

process_vigiar(dados, tabela = NULL, ...)

Arguments

dados

A data frame returned by vigiar_baixar().

tabela

Table name (auto-detected if dados has the attribute).

...

Additional arguments passed to specific processors.

Value

A vigiar_tbl with standardised columns and metadata.

Examples

bruto <- data.frame(muni = 330455L, UF = "RJ", ano = 2022L, Media_pm25 = 12.3)
process_vigiar(bruto, tabela = "df_anual")
#> # VIGIAR tibble: df_anual  |  1 linhas x 4 colunas
#> # Processado em: 2026-10-10 15:44:31
#> 
#> # A tibble: 1 × 4
#>   cod_municipio sigla_uf   ano pm25_media_anual
#>           <int> <chr>    <int>            <dbl>
#> 1        330455 RJ        2022             12.3