View source: R/download_senamhi_pol.R
download_senamhi_pol | R Documentation |
This function download many pollutant from pol_codes vector from the air quality stations described in aqs_codes vector. It will return a complete dataset, this means that missing pollutant data from missing hour is pad out with NA.
download_senamhi_pol(
aqs_codes,
pol_codes,
start_date,
end_date,
to_df = FALSE,
to_csv = FALSE,
csv_path = "",
verbose = TRUE
)
aqs_codes |
A vector with station codes. See senamhi_aqs(). |
pol_codes |
A vector with pollutants codes. See senamhi_params(). |
start_date |
Date to start downloading in dd/mm/yyyy. |
end_date |
Date to end downloading in dd/mm/yyyy. |
to_df |
Returns a data.frame. FALSE by default. |
to_csv |
Export data to csv file. FALSE by default. |
csv_path |
Location to export csv. |
verbose |
Print query summary. TRUE by default. |
list where each element is an air quality station data
## Not run:
# Download PM10 and PM2.5 from Campo de Marte and San Borja station
# from 01/02/2022 to 02/02/2022
aqs_codes <- c(112194, 112193)
pol_codes <- c("N_PM10", "N_PM25")
start_date <- "01/02/2022"
end_date <- "02/02/2022"
pm_data <- download_senamhi_data(aqs_code, pol_codes, start_date, end_date)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.