{"id":20675,"name":"saqgetr","description":"Import Air Quality Monitoring Data in a Fast and Easy Way.","url":"https://github.com/skgrange/saqgetr","last_synced_at":"2026-06-18T06:00:42.289Z","repository":{"id":56935320,"uuid":"174349996","full_name":"skgrange/saqgetr","owner":"skgrange","description":"Import Air Quality Monitoring Data in a Fast and Easy Way","archived":false,"fork":false,"pushed_at":"2024-09-12T12:45:46.000Z","size":98,"stargazers_count":11,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-06-08T01:03:44.174Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skgrange.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-07T13:34:24.000Z","updated_at":"2025-11-04T16:50:41.000Z","dependencies_parsed_at":"2024-11-06T00:32:17.607Z","dependency_job_id":"6a50be64-2e2e-4da4-a7ad-813cc82be8d2","html_url":"https://github.com/skgrange/saqgetr","commit_stats":{"total_commits":44,"total_committers":2,"mean_commits":22.0,"dds":0.06818181818181823,"last_synced_commit":"3ba1f16af4e869df3b5618b25a238db0d3b4ea23"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skgrange/saqgetr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skgrange%2Fsaqgetr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skgrange%2Fsaqgetr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skgrange%2Fsaqgetr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skgrange%2Fsaqgetr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skgrange","download_url":"https://codeload.github.com/skgrange/saqgetr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skgrange%2Fsaqgetr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34226629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"skgrange","name":"Stuart Grange","uuid":"8771129","kind":"user","description":"An environmental and data scientist with an air quality focus. Programmatic skills and atmospheric knowledge are used to answer tricky questions. ","email":"","website":"http://skgrange.github.io/","location":"Dübendorf, Switzerland","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/8771129?u=7eb49d6263395936a62865e574434136c6b89971\u0026v=4","repositories_count":30,"last_synced_at":"2024-06-11T15:38:24.771Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/skgrange","funding_links":[],"total_stars":135,"followers":74,"following":0,"created_at":"2022-11-13T10:33:15.949Z","updated_at":"2024-06-11T15:38:27.464Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skgrange","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skgrange/repositories"},"packages":[{"id":433246,"name":"saqgetr","ecosystem":"cran","description":"Import Air Quality Monitoring Data in a Fast and Easy Way","homepage":"https://github.com/skgrange/saqgetr","licenses":"GPL-3 | file LICENSE","normalized_licenses":["AML"],"repository_url":"https://github.com/skgrange/saqgetr","keywords_array":[],"namespace":null,"versions_count":5,"first_release_published_at":"2019-06-28T17:10:00.000Z","latest_release_published_at":"2021-01-12T00:00:00.000Z","latest_release_number":"0.2.21","last_synced_at":"2026-06-16T05:01:14.082Z","created_at":"2022-04-06T22:16:49.859Z","updated_at":"2026-06-16T05:01:14.082Z","registry_url":"https://cran.r-project.org/package=saqgetr","install_command":null,"documentation_url":"http://cran.r-project.org/web/packages/saqgetr/saqgetr.pdf","metadata":{},"repo_metadata":{"id":56935320,"uuid":"174349996","full_name":"skgrange/saqgetr","owner":"skgrange","description":"Import Air Quality Monitoring Data in a Fast and Easy Way","archived":false,"fork":false,"pushed_at":"2024-09-12T12:45:46.000Z","size":98,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T22:29:23.603Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skgrange.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-03-07T13:34:24.000Z","updated_at":"2024-09-12T12:45:50.000Z","dependencies_parsed_at":"2024-02-24T19:50:28.235Z","dependency_job_id":null,"html_url":"https://github.com/skgrange/saqgetr","commit_stats":{"total_commits":41,"total_committers":1,"mean_commits":41.0,"dds":0.0,"last_synced_commit":"79d2138ca2c96e9dd0c044a7ded01fc50b320993"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skgrange%2Fsaqgetr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skgrange%2Fsaqgetr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skgrange%2Fsaqgetr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skgrange%2Fsaqgetr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skgrange","download_url":"https://codeload.github.com/skgrange/saqgetr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222155692,"owners_count":16940391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"},"owner_record":{"login":"skgrange","name":"Stuart Grange","uuid":"8771129","kind":"user","description":"An environmental and data scientist with an air quality focus. Programmatic skills and atmospheric knowledge are used to answer tricky questions. ","email":"","website":"http://skgrange.github.io/","location":"Dübendorf, Switzerland","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/8771129?u=7eb49d6263395936a62865e574434136c6b89971\u0026v=4","repositories_count":30,"last_synced_at":"2024-06-11T15:38:24.771Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/skgrange","funding_links":[],"total_stars":135,"followers":74,"following":0,"created_at":"2022-11-13T10:33:15.949Z","updated_at":"2024-06-11T15:38:27.464Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skgrange","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skgrange/repositories"},"tags":[]},"repo_metadata_updated_at":"2024-10-30T02:58:42.100Z","dependent_packages_count":0,"downloads":233,"downloads_period":"last-month","dependent_repos_count":0,"rankings":{"downloads":43.207126948775056,"dependent_repos_count":35.45467469080226,"dependent_packages_count":29.796711368051938,"stargazers_count":17.864758565132917,"forks_count":17.76998531014548,"average":28.818651376581528},"purl":"pkg:cran/saqgetr","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/cran/saqgetr","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/cran/saqgetr","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/cran/saqgetr/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2024-10-29T21:00:27.425Z","issues_count":13,"pull_requests_count":0,"avg_time_to_close_issue":2007420.5,"avg_time_to_close_pull_request":null,"issues_closed_count":12,"pull_requests_closed_count":0,"pull_request_authors_count":0,"issue_authors_count":9,"avg_comments_per_issue":3.230769230769231,"avg_comments_per_pull_request":null,"merged_pull_requests_count":0,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":1,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":86667.0,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":1,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":1,"past_year_avg_comments_per_issue":3.0,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/skgrange%2Fsaqgetr/issues","maintainers":[{"login":"skgrange","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/skgrange"}],"active_maintainers":[]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/saqgetr/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/saqgetr/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/saqgetr/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/saqgetr/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/saqgetr/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/saqgetr/codemeta","maintainers":[{"uuid":"stuart.grange@york.ac.uk","login":null,"name":"Stuart K. Grange","email":"stuart.grange@york.ac.uk","url":null,"packages_count":1,"html_url":null,"role":null,"created_at":"2022-11-14T17:21:35.575Z","updated_at":"2022-11-14T17:21:35.575Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/maintainers/stuart.grange@york.ac.uk/packages"}],"registry":{"name":"cran.r-project.org","url":"https://cran.r-project.org","ecosystem":"cran","default":true,"packages_count":28762,"maintainers_count":15994,"namespaces_count":0,"keywords_count":8933,"github":"r-project-org","metadata":{"icon_url":"https://cran.r-project.org/CRANlogo.png","funded_packages_count":556},"icon_url":"https://cran.r-project.org/CRANlogo.png","created_at":"2022-04-06T16:32:25.637Z","updated_at":"2026-06-10T05:17:56.420Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages","maintainers_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/maintainers","namespaces_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/namespaces"}}],"commits":{"id":723340,"full_name":"skgrange/saqgetr","default_branch":"master","total_commits":44,"total_committers":2,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":22.0,"dds":0.06818181818181823,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-06-16T05:01:56.007Z","last_synced_commit":"3ba1f16af4e869df3b5618b25a238db0d3b4ea23","created_at":"2023-03-09T13:08:45.812Z","updated_at":"2026-06-16T05:01:40.600Z","committers":[{"name":"skgrange","email":"s.k.grange@gmail.com","login":"skgrange","count":41},{"name":"skgrange","email":"skgrange@gmail.com","login":null,"count":3}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/skgrange%2Fsaqgetr/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-06-18T00:00:09.052Z","repositories_count":6261974,"commits_count":876583186,"contributors_count":35061614,"owners_count":1167868,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"skgrange/saqgetr","html_url":"https://github.com/skgrange/saqgetr","last_synced_at":"2026-05-08T10:00:59.377Z","status":"error","issues_count":13,"pull_requests_count":0,"avg_time_to_close_issue":2007420.5,"avg_time_to_close_pull_request":null,"issues_closed_count":12,"pull_requests_closed_count":0,"pull_request_authors_count":0,"issue_authors_count":9,"avg_comments_per_issue":3.230769230769231,"avg_comments_per_pull_request":null,"merged_pull_requests_count":0,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":1,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":86667.0,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":1,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":1,"past_year_avg_comments_per_issue":3.0,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2023-05-09T10:36:44.160Z","updated_at":"2026-05-08T10:00:59.377Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/skgrange%2Fsaqgetr","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/skgrange%2Fsaqgetr/issues","issue_labels_count":{"question":1},"pull_request_labels_count":{},"issue_author_associations_count":{"NONE":12,"OWNER":1},"pull_request_author_associations_count":{},"issue_authors":{"SverreSolberg":3,"BlaiseKelly":3,"skgrange":1,"pamvgomes":1,"AdaCaoShiyu":1,"t0270293":1,"MohoWu":1,"FlorentinBulotAQ":1,"FinkLea":1},"pull_request_authors":{},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-06-14T00:00:24.059Z","repositories_count":14800372,"issues_count":33150415,"pull_requests_count":109388113,"authors_count":11305301,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[{"login":"skgrange","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/skgrange"}],"active_maintainers":[]},"events":{"total":{"WatchEvent":2},"last_year":{"WatchEvent":1}},"keywords":[],"dependencies":[{"ecosystem":"cran","filepath":"DESCRIPTION","sha":null,"kind":"manifest","created_at":"2022-08-21T06:50:47.462Z","updated_at":"2022-08-21T06:50:47.462Z","repository_link":"https://github.com/skgrange/saqgetr/blob/master/DESCRIPTION","dependencies":[{"id":2202662115,"package_name":"R","ecosystem":"cran","requirements":"\u003e= 3.2.0","direct":true,"kind":"depends","optional":false},{"id":2202662116,"package_name":"stringr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":2202662117,"package_name":"lubridate","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":2202662118,"package_name":"dplyr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":2202662119,"package_name":"purrr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":2202662120,"package_name":"readr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":2202662121,"package_name":"tidyr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":2202662122,"package_name":"magrittr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":2202662123,"package_name":"httr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":2202662124,"package_name":"openair","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false}]}],"score":8.633374945705647,"created_at":"2023-09-11T14:52:14.593Z","updated_at":"2026-06-18T06:00:42.296Z","avatar_url":"https://github.com/skgrange.png","language":"R","category":"Natural Resources","sub_category":"Air Quality","monthly_downloads":233,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# **saqgetr** \u003ca href='https://github.com/skgrange/saqgetr'\u003e\u003cimg src='man/figures/logo.png' align=\"right\" height=\"131.5\" /\u003e\u003c/a\u003e\n\n[![Lifecycle: retired](https://img.shields.io/badge/lifecycle-retired-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#retired)\n[![CRAN status](https://www.r-pkg.org/badges/version/saqgetr)](https://cran.r-project.org/package=sagetr)\n[![CRAN log](https://cranlogs.r-pkg.org/badges/last-week/saqgetr?color=brightgreen)](https://cran.r-project.org/package=saqgetr)\n\n**saqgetr** is an R package to import air quality monitoring data in a fast and easy way. Currently, only European data are available, but the package is generic and therefore data from other areas may be included in the future. For documentation on what data sources are accessible, please see [**saqgetr**'s technical note](https://drive.google.com/open?id=1IgDODHqBHewCTKLdAAxRyR7ml8ht6Ods).\n\n**saqgetr** has been made possible with the help of [Ricardo Energy \u0026 Environment](https://ee.ricardo.com). \n\n## Retirement note\n\n**saqgetr** will be retired in mid-2024. There are several reasons for the retirement, but the main points are that I no longer have the scope to ensure I catch all issues when they arise, the access to the remote servers used for **saqgetr** has become progressively more difficult due to my relocation and stricter security policies, and the near-real-time (E2a) data flow contains far more unreliable observations that in the past that are not being fixed or updated but the member states. Therefore, the database underlying **saqgetr** requires more maintenance than I can provide. The final update of observations was conducted on `2024-02-17`.\n\n## Installation\n\n**saqgetr** is available on CRAN and can be installed in the normal way:\n\n```\n# Install saqgetr package\ninstall.packages(\"saqgetr\")\n```\n\nIf desired, the development version can be installed with the help of [**devtools**](https://github.com/r-lib/devtools) or [**remotes**](https://github.com/r-lib/remotes) like this: \n```\n# Install development version of saqgetr\nremotes::install_github(\"skgrange/saqgetr\")\n```\n\n## Framework\n\n**saqgetr** acts as an interface to pre-prepared data files located on a web server. For each monitoring site serviced, there is a single file containing all observations for each year. There are a collection of metadata tables too which enable users to further understand the location and type of observations are available. The data files are compressed text files (`.csv.gz`) which allows for simple and fast importing and if other interfaces wish to be developed, this should be simple.\n\n## Usage\n\n### Sites\n\nTo import data with **saqgetr**, functions with the `get_saq_*` prefix are used. A monitoring site must be supplied to get observations. To find what sites are available use `get_saq_sites`: \n\n```\n# Load packages\nlibrary(dplyr)\nlibrary(saqgetr)\n\n# Import site information\ndata_sites \u003c- get_saq_sites()\n\n# Glimpse tibble\nglimpse(data_sites)\n\n#\u003e Observations: 9,016\n#\u003e Variables: 16\n#\u003e $ site              \u003cchr\u003e \"ad0942a\", \"ad0944a\", \"ad0945a\", \"al0201a\", \"a…\n#\u003e $ site_name         \u003cchr\u003e \"Fixa\", \"Fixa oz\", \"Estacional oz Envalira\", \"…\n#\u003e $ latitude          \u003cdbl\u003e 42.50969, 42.51694, 42.53488, 41.33027, 41.345…\n#\u003e $ longitude         \u003cdbl\u003e 1.539138, 1.565250, 1.716986, 19.821772, 19.85…\n#\u003e $ elevation         \u003cdbl\u003e 1080, 1637, 2515, 162, 207, 848, 25, 1, 13, 15…\n#\u003e $ country           \u003cchr\u003e \"andorra\", \"andorra\", \"andorra\", \"albania\", \"a…\n#\u003e $ country_iso_code  \u003cchr\u003e \"AD\", \"AD\", \"AD\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\"…\n#\u003e $ site_type         \u003cchr\u003e \"background\", \"background\", \"background\", NA, …\n#\u003e $ site_area         \u003cchr\u003e \"urban\", \"rural\", \"rural\", NA, NA, \"suburban\",…\n#\u003e $ date_start        \u003cdttm\u003e 2013-12-31 23:00:00, 2013-12-31 23:00:00, 201…\n#\u003e $ date_end          \u003cdttm\u003e 2019-04-27 14:00:00, 2019-04-27 14:00:00, 201…\n#\u003e $ network           \u003cchr\u003e \"NET-AD001A\", \"NET-AD001A\", \"NET-AD001A\", NA, …\n#\u003e $ eu_code           \u003cchr\u003e \"STA-AD0942A\", \"STA-AD0944A\", \"STA-AD0945A\", N…\n#\u003e $ eoi_code          \u003cchr\u003e \"AD0942A\", \"AD0944A\", \"AD0945A\", NA, NA, \"AL02…\n#\u003e $ observation_count \u003cdbl\u003e 309037, 45174, 18268, 168983, 140812, 247037, …\n#\u003e $ data_source       \u003cchr\u003e \"aqer:e1a; aqer:e2a\", \"aqer:e1a; aqer:e2a\", \"a…\n```\n\n### Observations\n\nSites are represented by a code which is prefixed with the country's ISO code, for example, a site in York, England, United Kingdom is identified as `gb0919a` (the ISO code for the United Kingdom is non-standard and GB is for Great Britain). To get observations this site, use `get_saq_observations`:\n\n```{r}\n# Get air quality monitoring data for a York site\ndata_york \u003c- get_saq_observations(site = \"gb0919a\", start = 2005)\n\n# Glimpse tibble\nglimpse(data_york)\n\n#\u003e Observations: 370,235\n#\u003e Variables: 10\n#\u003e $ date      \u003cdttm\u003e 2008-01-01, 2008-01-02, 2008-01-03, 2008-01-04, 2008-…\n#\u003e $ date_end  \u003cdttm\u003e NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…\n#\u003e $ site      \u003cchr\u003e \"gb0919a\", \"gb0919a\", \"gb0919a\", \"gb0919a\", \"gb0919a\",…\n#\u003e $ variable  \u003cchr\u003e \"pm10\", \"pm10\", \"pm10\", \"pm10\", \"pm10\", \"pm10\", \"pm10\"…\n#\u003e $ process   \u003cint\u003e 62392, 62392, 62392, 62392, 62392, 62392, 62392, 62392…\n#\u003e $ summary   \u003cint\u003e 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20…\n#\u003e $ validity  \u003cint\u003e 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, …\n#\u003e $ unit      \u003cchr\u003e \"µg/m3\", \"µg/m3\", \"µg/m3\", \"µg/m3\", \"µg/m3\", \"µg/m3\", …\n#\u003e $ value     \u003cdbl\u003e 21.625, 22.708, 24.667, 21.833, 24.000, 29.875, 16.833…\n```\n\n`get_saq_observations` takes a vector of sites to import many sites at once. Beware that if a user stacks the sites, a lot of data can be returned. For example, using the two sites below returns a tibble/data frame/table with over 10 million observations. \n```{r}\n# Get 10 million observations, verbose is used to give an indication on\n# what is occuring\ndata_large_ish \u003c- get_saq_observations(\n  site = c(\"gb0036r\", \"gb0682a\"), \n  start = 1960,\n  verbose = TRUE\n)\n\n# Glimpse tibble\nglimpse(data_large_ish)\n\n#\u003e Observations: 9,981,977\n#\u003e Variables: 9\n#\u003e $ date      \u003cdttm\u003e 1995-09-11, 1995-09-12, 1995-09-13, 1995-09-14, 1995-…\n#\u003e $ date_end  \u003cdttm\u003e NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…\n#\u003e $ site      \u003cchr\u003e \"gb0036r\", \"gb0036r\", \"gb0036r\", \"gb0036r\", \"gb0036r\",…\n#\u003e $ variable  \u003cchr\u003e \"so2\", \"so2\", \"so2\", \"so2\", \"so2\", \"so2\", \"so2\", \"so2\"…\n#\u003e $ process   \u003cint\u003e 57295, 57295, 57295, 57295, 57295, 57295, 57295, 57295…\n#\u003e $ summary   \u003cint\u003e 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20…\n#\u003e $ validity  \u003cint\u003e 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …\n#\u003e $ unit      \u003cchr\u003e \"µg/m3\", \"µg/m3\", \"µg/m3\", \"µg/m3\", \"µg/m3\", \"µg/m3\", …\n#\u003e $ value     \u003cdbl\u003e 0.983, 0.792, 1.362, 0.483, 14.633, 1.171, 0.821, 15.2…\n```\n\n#### Cleaning observations\n\nOnce a data are imported, valid data for a certain averaging period/summary can be isolated with `saq_clean_observations`. `saq_clean_observations` can also \"spread\" data where the variable/pollutants become columns: \n\n```{r}\n# Get only valid hourly data and reshape (spread)\ndata_york_spread \u003c- data_york %\u003e% \n  saq_clean_observations(summary = \"hour\", valid_only = TRUE, spread = TRUE)\n\n# Glimpse tibble\nglimpse(data_york_spread)\n```\n\n### Processes\n\nInformation on the specific time series/processes can also be retrieved. \n\n```{r}\n# Get processes\ndata_processes \u003c- get_saq_processes()\n\n# Glimpse tibble\nglimpse(data_processes)\n\n#\u003e Observations: 171,992\n#\u003e Variables: 15\n#\u003e $ process           \u003cint\u003e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,…\n#\u003e $ site              \u003cchr\u003e \"al0201a\", \"al0201a\", \"al0201a\", \"al0201a\", \"a…\n#\u003e $ variable          \u003cchr\u003e \"so2\", \"so2\", \"pm10\", \"pm10\", \"o3\", \"o3\", \"o3\"…\n#\u003e $ variable_long     \u003cchr\u003e \"Sulphur dioxide (air)\", \"Sulphur dioxide (air…\n#\u003e $ period            \u003cchr\u003e \"day\", \"hour\", \"day\", \"hour\", \"day\", \"dymax\", …\n#\u003e $ unit              \u003cchr\u003e \"ug.m-3\", \"ug.m-3\", \"ug.m-3\", \"ug.m-3\", \"ug.m-…\n#\u003e $ date_start        \u003cdttm\u003e NA, 2011-01-01 00:00:00, 2011-01-01 00:00:00,…\n#\u003e $ date_end          \u003cdttm\u003e NA, 2011-12-31 23:00:00, 2012-12-30 00:00:00,…\n#\u003e $ sample            \u003cchr\u003e NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…\n#\u003e $ sampling_point    \u003cchr\u003e NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…\n#\u003e $ sampling_process  \u003cchr\u003e NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…\n#\u003e $ observed_property \u003cint\u003e 1, 1, 5, 5, 7, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10…\n#\u003e $ group_code        \u003cint\u003e 100, 100, 100, 100, 100, 100, 100, 100, 100, 1…\n#\u003e $ data_source       \u003cchr\u003e \"airbase\", \"airbase\", \"airbase\", \"airbase\", \"a…\n#\u003e $ observation_count \u003cdbl\u003e 0, 6806, 729, 17336, 352, 352, 16413, 8358, 69…\n```\n\n### Other metadata\n\nOther helper tables are also available: \n\n```{r}\n# Get other helper tables\n# Summary integers\ndata_summary_integers \u003c- get_saq_summaries() %\u003e% \n  print(n = Inf)\n\n#\u003e # A tibble: 20 x 2\n#\u003e    averaging_period summary\n#\u003e    \u003cchr\u003e              \u003cint\u003e\n#\u003e  1 hour                   1\n#\u003e  2 day                   20\n#\u003e  3 week                  90\n#\u003e  4 var                   91\n#\u003e  5 month                 92\n#\u003e  6 fortnight             93\n#\u003e  7 3month                94\n#\u003e  8 2month                95\n#\u003e  9 2day                  96\n#\u003e 10 3day                  97\n#\u003e 11 2week                 98\n#\u003e 12 4week                 99\n#\u003e 13 3hour                100\n#\u003e 14 8hour                101\n#\u003e 15 hour8                101\n#\u003e 16 year                 102\n#\u003e 17 dymax                 21\n#\u003e 18 quarter              103\n#\u003e 19 other                 91\n#\u003e 20 n-hour               104\n\n# Validity integers\ndata_validity_integers \u003c- get_saq_validity() %\u003e% \n  print(n = Inf)\n  \n#\u003e # A tibble: 6 x 4\n#\u003e   validity valid description                                  notes        \n#\u003e      \u003cint\u003e \u003clgl\u003e \u003cchr\u003e                                        \u003cchr\u003e        \n#\u003e 1       NA FALSE data is considered to be invalid due to the… from aqer    \n#\u003e 2       -1 FALSE invalid due to other circumstances or data … from aqer    \n#\u003e 3        0 FALSE invalid                                      smonitor nom…\n#\u003e 4        1 TRUE  \u003cNA\u003e                                         from aqer    \n#\u003e 5        2 TRUE  valid but below detection limit measurement… from aqer    \n#\u003e 6        3 TRUE  valid but below detection limit and number … from aqer\n````\n\n### Simple annual and monthly means of observations\n\nSimple annual and monthly means of the daily and hourly processes have also been generated. These summaries are often useful for trend analysis or mapping. \n\n```{r}\n# Get annual means\ndata_annual \u003c- get_saq_simple_summaries(summary = \"annual_mean\")\n\n# Glimpse tibble\nglimpse(data_annual)\n\n#\u003e Observations: 655,362\n#\u003e Variables: 8\n#\u003e $ date           \u003cdttm\u003e 2013-01-01, 2014-01-01, 2015-01-01, 2016-01-01, …\n#\u003e $ date_end       \u003cdttm\u003e 2013-12-31 23:59:59, 2014-12-31 23:59:59, 2015-1…\n#\u003e $ site           \u003cchr\u003e \"ad0942a\", \"ad0942a\", \"ad0942a\", \"ad0942a\", \"ad09…\n#\u003e $ variable       \u003cchr\u003e \"co\", \"co\", \"co\", \"co\", \"co\", \"co\", \"co\", \"no\", \"…\n#\u003e $ summary_source \u003cint\u003e 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…\n#\u003e $ summary        \u003cint\u003e 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,…\n#\u003e $ count          \u003cdbl\u003e 1, 8438, 8385, 8171, 8441, 8217, 5990, 1, 8310, 8…\n#\u003e $ value          \u003cdbl\u003e 0.5000000, 0.3224579, 0.3582230, 0.3168768, 0.259…\n\n# What was York Fishergate's (hourly) PM10 concentraion in 2017? \ndata_annual %\u003e%\n  filter(site == \"gb0682a\",\n         lubridate::year(date) == 2017L,\n         variable == \"pm10\",\n         summary_source == 1L) %\u003e% \n  select(date,\n         site,\n         variable,\n         count,\n         value)\n         \n#\u003e # A tibble: 1 x 5\n#\u003e   date                site    variable count value\n#\u003e   \u003cdttm\u003e              \u003cchr\u003e   \u003cchr\u003e    \u003cdbl\u003e \u003cdbl\u003e\n#\u003e 1 2017-01-01 00:00:00 gb0682a pm10      8442  23.8\n```\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/20675","html_url":"https://ost.ecosyste.ms/projects/20675"}