Description Usage Arguments Value Author(s) See Also Examples
View source: R/get_saq_observations.R
Function to get saqgetr air quality observations.
1 2 3 4 5 6 7 8 9 |
site |
A vector of sites to import. Use get_saq_sites to find what sites are available. |
variable |
An optional variable vector. If not used, all variables will be returned. |
start |
Start date for returned observations. Can either be a date string in
|
end |
End date for returned observations. Can either be a date string in
|
valid_only |
Should only valid observations be kept? |
tz |
Time zone for the observations' dates. |
verbose |
Should the function give messages? |
Tibble.
Stuart K. Grange.
get_saq_sites
, saq_clean_observations
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # Load a site's data
data_hafodyrynys <- get_saq_observations(
site = "gb1038a",
start = 2018,
end = 2018
)
# Print tibble
print(data_hafodyrynys)
# Get multiple sites nox and ozone data for between a date range
data_many <- get_saq_observations(
site = c("gb1014a", "gb1044a", "gb1060a"),
variable = c("nox", "no2", "o3"),
start = 2018,
end = 2022,
verbose = TRUE
)
# Print tibble
print(data_many)
# Sites and site names
data_many %>%
dplyr::distinct(site)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.