Title: | An R package to download São Paulo and Rio de Janeiro air pollution data |
---|---|
Description: | A package to download information from CETESB QUALAR <https://cetesb.sp.gov.br/ar/qualar/> and MonitorAr <http://jeap.rio.rj.gov.br/je-metinfosmac/institucional/index.html> systems. It contains function to download different parameters, a set of criteria pollutants and the most frequent meteorological parameters used in air quality data analysis and air quality model evaluation. |
Authors: | Mario Gavidia-Calderón [aut, cre]
|
Maintainer: | Mario Gavidia-Calderón <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.9.7 |
Built: | 2024-09-04 00:52:20 UTC |
Source: | https://github.com/ropensci/qualR |
List of CETESB QUALAR air quality stations (AQS) latitudes and longitudes.
Use this to check the AQS aqs_code
argument in CetesbRetrieveParam()
function. AQS names are without diacritics.
cetesb_aqs
cetesb_aqs
A data frame with 74 observations and 5 variables:
CETESB AQS name.
CETESB AQS code in QUALAR System.
CETESB AQS latitude.
CETESB AQS longitude.
CETESB AQS location.
cetesb_aqs
cetesb_aqs
List of CETESB QUALAR available parameters and units. Use this to check the
parameters
argument.
Parameter names are without diacritics.
cetesb_param
cetesb_param
A data frame with 20 observations and 3 variables:
CETESB QUALAR parameter abbreviation and name.
Parameter units.
Parameter CETESB QUALAR code.
cetesb_param
cetesb_param
This function download the main meteorological parameters for model evaluation from one air quality station (AQS) of CETESB AQS network. It will pad out the date with missing data with NA. This function requires to have an account in CETESB QUALAR.
cetesb_retrieve_met( username, password, aqs_code, start_date, end_date, verbose = TRUE, to_csv = FALSE, csv_path = "" )
cetesb_retrieve_met( username, password, aqs_code, start_date, end_date, verbose = TRUE, to_csv = FALSE, csv_path = "" )
username |
User name of CETESB QUALAR |
password |
User name's password of CETESB QUALAR |
aqs_code |
Code of AQS |
start_date |
Date to start downloading in dd/mm/yyyy |
end_date |
Date to end downloading in dd/mm/yyyy |
verbose |
Print query summary |
to_csv |
Creates a csv file. FALSE by default |
csv_path |
Path to save the csv file. |
data.frame with Temperature (C), Relative Humidity (%), Wind Speed (m/s) and Direction (degrees), and Pressure information.
## Not run: # Downloading meteorological data from Pinheiros AQS # from January first to 7th of 2020 my_user_name <- "John Doe" my_pass_word <- "drowssap" pin_code <- 99 # Check with cetesb_aqs start_date <- "01/01/2020" end_date <- "07/01/2020" pin_pol <- cetesb_retrieve_met(my_user_name, my_pass_word, pin_code, start_date, end_date) ## End(Not run)
## Not run: # Downloading meteorological data from Pinheiros AQS # from January first to 7th of 2020 my_user_name <- "John Doe" my_pass_word <- "drowssap" pin_code <- 99 # Check with cetesb_aqs start_date <- "01/01/2020" end_date <- "07/01/2020" pin_pol <- cetesb_retrieve_met(my_user_name, my_pass_word, pin_code, start_date, end_date) ## End(Not run)
This function download the main meteorological parameters for model evaluation, together with criteria pollutants for one air quality station (AQS). It will pad out the date with missing data with NA. This function required to have an account in CETESB QUALAR.
cetesb_retrieve_met_pol( username, password, aqs_code, start_date, end_date, verbose = TRUE, to_csv = FALSE, csv_path = "" )
cetesb_retrieve_met_pol( username, password, aqs_code, start_date, end_date, verbose = TRUE, to_csv = FALSE, csv_path = "" )
username |
User name of CETESB QUALAR |
password |
User name's password of CETESB QUALAR |
aqs_code |
Code of AQS |
start_date |
Date to start downloading in dd/mm/yyyy |
end_date |
Date to end downloading in dd/mm/yyyy |
verbose |
Print query summary |
to_csv |
Creates a csv file. FALSE by default |
csv_path |
Path to save the csv file. |
data.frame with Temperature (C), Relative Humidity (%), Wind Speed (m/s) and Direction (degrees), Pressure information (hPa), O3, NO, NO2, NOx, PM2.5, PM10 and CO information.
## Not run: # Downloading main meteorological parameters and criteria pollutants # from Pinheiros AQS from January first to 7th of 2020 my_user_name <- "John Doe" my_pass_word <- "drowssap" pin_code <- 99 # Check with cetesb_aqs start_date <- "01/01/2020" end_date <- "07/01/2020" pin_all <- cetesb_retrieve_met_pol(my_user_name, my_pass_word, pin_code, start_date, end_date) ## End(Not run)
## Not run: # Downloading main meteorological parameters and criteria pollutants # from Pinheiros AQS from January first to 7th of 2020 my_user_name <- "John Doe" my_pass_word <- "drowssap" pin_code <- 99 # Check with cetesb_aqs start_date <- "01/01/2020" end_date <- "07/01/2020" pin_all <- cetesb_retrieve_met_pol(my_user_name, my_pass_word, pin_code, start_date, end_date) ## End(Not run)
This function downloads the parameters in a vector. These parameters can be both pollutants or meteorological observations for one air quality station (AQS). It will pad out the date with missing data with NA. This function requires to have an account in CETESB QUALAR.
cetesb_retrieve_param( username, password, parameters, aqs_code, start_date, end_date, verbose = TRUE, to_csv = FALSE, csv_path = "" )
cetesb_retrieve_param( username, password, parameters, aqs_code, start_date, end_date, verbose = TRUE, to_csv = FALSE, csv_path = "" )
username |
User name of CETESB QUALAR |
password |
User name's password of CETESB QUALAR |
parameters |
a character vector with the parameters abbreviations to download |
aqs_code |
Code of AQS |
start_date |
Date to start downloading in dd/mm/yyyy |
end_date |
Date to end downloading in dd/mm/yyyy |
verbose |
Print query summary |
to_csv |
Creates a csv file. FALSE by default |
csv_path |
Path to save the csv file |
data.frame with parameters described in params
vector
## Not run: # Download ozone, nitrogen dioxide, and wind speed # from Pinheiros AQS, from January first to 7th of 2020 my_user_name <- "John Doe" my_pass_word <- "drowssap" pin_code <- 99 # Check with cetesb_aqs start_date <- "01/01/2020" end_date <- "07/01/2020" params <- c("o3","NOX", "VV") pin_param <- cetesb_retrieve_param(my_user_name, my_pass_word, params, pin_code, start_date, end_date) ## End(Not run)
## Not run: # Download ozone, nitrogen dioxide, and wind speed # from Pinheiros AQS, from January first to 7th of 2020 my_user_name <- "John Doe" my_pass_word <- "drowssap" pin_code <- 99 # Check with cetesb_aqs start_date <- "01/01/2020" end_date <- "07/01/2020" params <- c("o3","NOX", "VV") pin_param <- cetesb_retrieve_param(my_user_name, my_pass_word, params, pin_code, start_date, end_date) ## End(Not run)
This function download the criteria pollutants from one air quality station (AQS) of CETESB AQS network. It will pad out the date with missing data with NA. This function required to have an account in CETESB QUALAR.
cetesb_retrieve_pol( username, password, aqs_code, start_date, end_date, verbose = TRUE, to_csv = FALSE, csv_path = "" )
cetesb_retrieve_pol( username, password, aqs_code, start_date, end_date, verbose = TRUE, to_csv = FALSE, csv_path = "" )
username |
User name of CETESB QUALAR |
password |
User name's password of CETESB QUALAR |
aqs_code |
Code of AQS |
start_date |
Date to start downloading in dd/mm/yyyy |
end_date |
Date to end downloading in dd/mm/yyyy |
verbose |
Print query summary |
to_csv |
Creates a csv file. FALSE by default |
csv_path |
Path to save the csv file |
data.frame with O3, NO, NO2, PM2.5, PM10 and CO information. Units are ug/m3 except for CO which is in ppm, and NOx which is in ppb.
## Not run: # Downloading criteria pollutants from Pinheiros AQS # from January first to 7th of 2020 my_user_name <- "John Doe" my_pass_word <- "drowssap" pin_code <- 99 # Check with cetesb_aqs start_date <- "01/01/2020" end_date <- "07/01/2020" pin_pol <- cetesb_retrieve_pol(my_user_name, my_pass_word, pin_code, start_date, end_date) ## End(Not run)
## Not run: # Downloading criteria pollutants from Pinheiros AQS # from January first to 7th of 2020 my_user_name <- "John Doe" my_pass_word <- "drowssap" pin_code <- 99 # Check with cetesb_aqs start_date <- "01/01/2020" end_date <- "07/01/2020" pin_pol <- cetesb_retrieve_pol(my_user_name, my_pass_word, pin_code, start_date, end_date) ## End(Not run)
List of Monitor Ar Rio air quality stations (AQS) with their codes and locations. Use this to check the parameters argument in MonitorArRetrieveParam() function.
monitor_ar_aqs
monitor_ar_aqs
A data frame with 8 observation and 6 variables:
MonitorAr Program AQS name.
MonitorAr Program AQS abbreviation.
MonitorAr Program AQS longitude.
MonitorAr Program AQS latitude.
MonitorAr Program AQS longitude in SIRGAS 2000 (EPSG:31983).
MonitorAr Program AQS latitude in SIRGAS 2000 (EPSG:31983).
monitor_ar_aqs
monitor_ar_aqs
List of Monitor Ar Rio available parameters. Use this to check the parameters argument in MonitorArRetrieveParam() function. Parameter names are without diacritics.
monitor_ar_param
monitor_ar_param
A data frame with 18 observations and 3 variables:
MonitorAr parameter abbreviation or code.
MonitorAr parameter name
Parameter units.
monitor_ar_param
monitor_ar_param
This function download the main meteorological parameters from one air quality station (AQS) of Monitor Ar network. It will pad out the date with missing data with NA.
monitor_ar_retrieve_met( start_date, end_date, aqs_code, verbose = TRUE, to_local = TRUE, to_csv = FALSE, csv_path = "" )
monitor_ar_retrieve_met( start_date, end_date, aqs_code, verbose = TRUE, to_local = TRUE, to_csv = FALSE, csv_path = "" )
start_date |
Date to start downloading in dd/mm/yyyy. |
end_date |
Date to end downloading in dd/mm/yyyy. |
aqs_code |
Code of AQS. See |
verbose |
Print query summary. |
to_local |
Date information in local time. TRUE by default. |
to_csv |
Create a csv file. FALSE by default. |
csv_path |
Path to save the csv file. |
data.frame with Temperature (c), Relative Humidity (%), Wind speed (m/s) and direction (degrees) and Pressure information.
## Not run: # Downloading meteorological data from CENTRO AQS # from January first to 7th of 2020 start_date <- "01/01/2020" end_date <- "07/01/2020" ca_met <- monitor_ar_retrieve_met(start_date, end_date, "CA") ## End(Not run)
## Not run: # Downloading meteorological data from CENTRO AQS # from January first to 7th of 2020 start_date <- "01/01/2020" end_date <- "07/01/2020" ca_met <- monitor_ar_retrieve_met(start_date, end_date, "CA") ## End(Not run)
This function download the main meteorological parameters for model evaluation, together with criteria pollutants for in air quality station (AQS) of Monitor Ar program. It will pad out the date with missing data with NA
monitor_ar_retrieve_met_pol( start_date, end_date, aqs_code, verbose = TRUE, to_local = TRUE, to_csv = FALSE, csv_path = "" )
monitor_ar_retrieve_met_pol( start_date, end_date, aqs_code, verbose = TRUE, to_local = TRUE, to_csv = FALSE, csv_path = "" )
start_date |
Date to start downloading dd/mm/yyyy |
end_date |
Date to end downloading dd/mm/yyyy |
aqs_code |
Code of AQS |
verbose |
Print query summary |
to_local |
Date information in local time. TRUE by default. |
to_csv |
Creates a csv file. FALSE by default. |
csv_path |
Path to save the csv file. |
data.frame with Temperature (C), Relative Humidity (%), Wind Speed (m/s) and Direction (degrees), Pressure information (hPa), O3, NO, NO2, NOx, PM2.5, PM10 and CO information.
## Not run: # Downloading main meteorological parameters and criteria pollutant # from CENTRO AQS from January first to 7th of 2020 start_date <- "01/01/2020" end_date <- "07/01/2020" ca_all <- monitor_ar_retrieve_met_pol(start_date, end_date, "CA") ## End(Not run)
## Not run: # Downloading main meteorological parameters and criteria pollutant # from CENTRO AQS from January first to 7th of 2020 start_date <- "01/01/2020" end_date <- "07/01/2020" ca_all <- monitor_ar_retrieve_met_pol(start_date, end_date, "CA") ## End(Not run)
This function download air quality and meteorology measurements from MonitorAr-Rio program from Rio de Janeiro city.
monitor_ar_retrieve_param( start_date, end_date, aqs_code, parameters, to_local = TRUE, verbose = TRUE, to_csv = FALSE, csv_path = "" )
monitor_ar_retrieve_param( start_date, end_date, aqs_code, parameters, to_local = TRUE, verbose = TRUE, to_csv = FALSE, csv_path = "" )
start_date |
Date to start downloading in dd/mm/yyyy |
end_date |
Date to end downloading in dd/mm/yyyy |
aqs_code |
AQS code |
parameters |
Parameters to download. It can be a vector with many parameters. |
to_local |
Date information in local time. TRUE by default. |
verbose |
Print query summary. |
to_csv |
Creates a csv file. FALSE by default |
csv_path |
Path to save the csv file. |
data.frame with the selected parameter information
## Not run: # Downloading Ozone information from Centro AQS # from February of 2019 date_start <- "01/02/2019" date_end <- "01/03/2019" aqs_code <- "CA" param <- "O3" ca_o3 <- monitor_ar_retrieve_param(date_start, date_end, aqs_code, param) ## End(Not run)
## Not run: # Downloading Ozone information from Centro AQS # from February of 2019 date_start <- "01/02/2019" date_end <- "01/03/2019" aqs_code <- "CA" param <- "O3" ca_o3 <- monitor_ar_retrieve_param(date_start, date_end, aqs_code, param) ## End(Not run)
This function download the criteria pollutants from one air quality station (AQS) of Monitor Ar Program. It will pad out the date with missing data with NA.
monitor_ar_retrieve_pol( start_date, end_date, aqs_code, verbose = TRUE, to_local = TRUE, to_csv = FALSE, csv_path = "" )
monitor_ar_retrieve_pol( start_date, end_date, aqs_code, verbose = TRUE, to_local = TRUE, to_csv = FALSE, csv_path = "" )
start_date |
Date to start downloading in dd/mm/yyyy. |
end_date |
Date to end downloading in dd/mm/yyyy. |
aqs_code |
Code of AQS. |
verbose |
Print query summary. |
to_local |
Date information in local time. TRUE by default. |
to_csv |
Creates a csv file. FALSE by default. |
csv_path |
Path to save the csv file. |
data.frame with O3, NO, NO2, NOx, PM2.5, PM10 and CO information.
## Not run: # Downloading criteria pollutants from CENTRO AQS # from January first to 7th of 2020 start_date <- "01/01/2020" end_date <- "07/01/2020" ca_pol <- monitor_ar_retrieve_pol(start_date, end_date, "CA") ## End(Not run)
## Not run: # Downloading criteria pollutants from CENTRO AQS # from January first to 7th of 2020 start_date <- "01/01/2020" end_date <- "07/01/2020" ca_pol <- monitor_ar_retrieve_pol(start_date, end_date, "CA") ## End(Not run)
A package to download information from CETESB QUALAR https://cetesb.sp.gov.br/ar/qualar/ and MonitorAr http://jeap.rio.rj.gov.br/je-metinfosmac/institucional/index.html systems. It contains function to download different parameters, a set of criteria pollutants and the most frequent meteorological parameters used in air quality data analysis and air quality model evaluation.
Mario Gavidia-Calderon and Daniel Schuch and Maria de Fatima Andrade
Useful links:
Development repository: https://github.com/ropensci/qualR
Report bugs: https://github.com/ropensci/qualR/issues
qualR site: https://docs.ropensci.org/qualR/