MyNixOS website logo
Description

Download Air Quality and Meteorological Information of Chile.

Download air quality and meteorological information of Chile from the National Air Quality System (S.I.N.C.A.)<https://sinca.mma.gob.cl/> dependent on the Ministry of the Environment and the Meteorological Directorate of Chile (D.M.C.)<https://www.meteochile.gob.cl/> dependent on the Directorate General of Civil Aeronautics.

AtmChile

AtmChile is an R package designed to download and compile information on air quality and meteorological parameters in Chile. It sources data from:

  • SINCA: National Air Quality System (Ministry of the Environment).
  • DMC: Meteorological Directorate of Chile (Directorate General of Civil Aeronautics).

Project developed by: Department of Chemistry, Faculty of Sciences of the University of Chile. Funding: FONDECYT Project 1200674.

Installation

You can install the stable version from CRAN:

install.packages("AtmChile")

Or the development version from GitHub:

# install.packages("devtools")
devtools::install_github("franciscoxaxo/AtmChile")

Usage

Load the library:

library(AtmChile)

1. ChileAirQuality

Retrieves air quality data from the National Air Quality System (SINCA).

Available Parameters:

ParameterDescriptionUnits
PM10Particulate matter less than 10 micronsug/m3N
PM25Particulate matter less than 2.5 micronsug/m3N
SO2Sulfur dioxideug/m3N
NOXNitrogen oxidesppb
NONitrogen monoxideppb
NO2Nitrogen dioxideppb
O3Tropospheric ozoneppb
COCarbon monoxideppb
tempTemperature°C
wsWind speedm/s
wdWind direction°
HRRelative humidity%

How to find station codes: To view the full table of available monitoring stations and their codes (e.g., "SA" for Parque O'Higgins), run the function without arguments:

# View available stations
stations <- ChileAirQuality()
print(stations)

Arguments:

  • Comunas: Vector containing names or codes of the monitoring stations (e.g., "Cerrillos", "SA"). Use "all" for all stations.
  • Parametros: Vector containing the names of air quality parameters. Use "all" for all parameters.
  • fechadeInicio: Start date (format "dd/mm/yyyy").
  • fechadeTermino: End date (format "dd/mm/yyyy").
  • Curar: Logical (TRUE/FALSE). Activates data curation for particulate matter, NOx, RH, and wind direction. Default: TRUE.
  • Site: Logical. If TRUE, allows searching by station code instead of name in Comunas. Default: FALSE.
  • st: Logical. If TRUE, includes validation reports from SINCA ("NV": Not Validated, "PV": Pre-Validated, "V": Validated). Default: FALSE.

Examples:

# Example 1: Basic request by name
data_names <- ChileAirQuality(
  Comunas = "Cerrillos",
  Parametros = c("PM10", "PM25"),
  fechadeInicio = "01/01/2020",
  fechadeTermino = "01/01/2021"
)

# Example 2: Request by Station Code (Site = TRUE) without curation
data_codes <- ChileAirQuality(
  Comunas = c("SA", "CE"),
  Parametros = c("NO2", "O3"),
  fechadeInicio = "01/01/2020",
  fechadeTermino = "01/01/2021",
  Curar = FALSE,
  Site = TRUE
)

# Example 3: Download everything (All stations, all parameters)
data_all <- ChileAirQuality(
  Comunas = "all",
  Parametros = "all",
  fechadeInicio = "01/01/2020",
  fechadeTermino = "01/01/2021"
)

2. ChileClimateData

Retrieves climate data from the Meteorological Directorate of Chile (DMC).

Available Parameters:

  • Temperatura (Temperature)
  • PuntoRocio (Dew point)
  • Humedad (Humidity)
  • Viento (Wind)
  • PresionQFF (Pressure at sea level)
  • PresionQFE (Pressure at station level)

How to find station codes: To see the table with the available weather stations:

# View available climate stations
climate_stations <- ChileClimateData()
print(climate_stations)

Arguments:

  • Estaciones: Vector containing codes of the monitoring stations (e.g., "180005").
  • Parametros: Vector containing the names of climate parameters.
  • inicio: Text string containing the start year (e.g., "2020").
  • fin: Text string containing the end year (e.g., "2021").
  • Region: Logical. If TRUE, allows entering the administrative region code (e.g., "XV", "RM") in Estaciones instead of the station code.

Examples:

# Example 1: Request by specific station codes
climate_data <- ChileClimateData(
  Estaciones = c("180005", "200006"),
  Parametros = c("Temperatura", "Humedad", "Viento"),
  inicio = "2020",
  fin = "2021"
)

# Example 2: Request by Administrative Region
region_data <- ChileClimateData(
  Estaciones = "II",
  Parametros = "Temperatura",
  inicio = "2020",
  fin = "2021",
  Region = TRUE
)

3. ChileAirQualityApp

A Shiny dashboard that provides a graphical interface for the package. It allows users to download data, perform analysis, visualize trends, and calculate descriptive statistics without writing code.

# Launch the local app
ChileAirQualityApp()

This dashboard is also hosted online at: ChileAirQualityApp on ShinyApps.io.

Metadata

Version

1.2.0

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows