Skip to contents

Comprehensive diagnostic of a VIGIAR PM2.5 temporal series. Checks temporal coverage, spatial coverage, PM2.5 values, IBGE codes, duplicates, series breaks, and outliers. Returns a structured diagnostic object with severity levels.

Usage

vigiar_diagnosticar_serie(
  dados,
  col_muni = NULL,
  col_ano = "ano",
  col_mes = "mes",
  col_pm25 = NULL,
  uf = "RJ",
  escopo = c("rj", "uf", "nacional")
)

Arguments

dados

A data frame or tibble with PM2.5 data. Required columns: municipality code, year, PM2.5 value. Optional: month, health region, latitude, longitude.

col_muni

Name of municipality code column (auto-detected).

col_ano

Name of year column (default "ano").

col_mes

Name of month column (default "mes").

col_pm25

Name of PM2.5 column (auto-detected).

uf

Expected UF (default "RJ"). Use NULL for any.

escopo

Scope for spatial checks: "rj", "uf", or "nacional".

Value

A vigiar_diagnostic object.

Examples

diag <- vigiar_diagnosticar_serie(pm25_rj_sample)
summary(diag)
#> Diagnostico VIGIAR: df_anual
#> Severidade: problema
#> Resultados: ok=0 aviso=0 problema=4 critico=0