RAQSAPI - A Brief introduction into RAQSAPI functions

Clinton Mccrowey physical scientist - US EPA

Information: AQS Data Mart API restricts the
maximum amount of monitoring data to one full year of data per API
call.

RAQSAPI functions are named according to the service and filter variables that are available by the Data Mart API.1

Data Mart aggregate functions

These functions retrieve aggregated data from the Data Mart API and are grouped by how each function aggregates the data. There are 7 different families of related aggregate functions in which the AQS Data Mart API groups data.

These seven families are:

  1. _by_site
  2. _by_county
  3. _by_state
  4. _by_<latitude/longitude bounding box> (_by_box)
  5. _by_<monitoring agency> (_by_MA)
  6. _by_<Primary Quality Assurance Organization> (_by_pqao)
  7. _by_<core based statistical area> (_by_cbsa).

Within these families of aggregated data functions there are functions that call on the 11 different aggregate services that the Data Mart API provides. Note that not all aggregations are available for each service.

These eleven services are:

  1. Monitors (monitors_by_)
  2. Sample Data (sampledata_by_)
  3. Daily Summary Data (dailydata_by_)
  4. Annual Summary Data (annualdata_by_)
  5. Quality Assurance - Blanks Data (qa_blanks_by_)
  6. Quality Assurance - Collocated Assessments (qa_collocated_assessments_by_)
  7. Quality Assurance - Flow Rate verifications (qa_flowrateverification_by_)
  8. Quality Assurance - Flow Rate Audits (aqs_qa_flowrateaudit_by_)
  9. Quality Assurance - One Point Quality Control Raw Data (qa_one_point_qc_by_)
  10. Quality Assurance - PEP Audits (qa_pep_audit_by_)
  11. Transaction Sample - AQS Submission data in transaction Format (RD) (aqs_transactionsample_by_)
Information: AQS Data Mart API restricts the
maximum amount of monitoring data to one full year of data per
API call. These functions are able to return multiple years of data by
making repeated calls to the API. Each call to the Data Mart API will take
time to complete. The more years of data being requested the longer RAQSAPI
will take to return the results.

Aggregate functions are named AQS_API<service>_<aggregation>() where <service> is one of the 11 services listed above and <aggregation> is either "_by_site“,”_by_county“,”_by_state“,”_by_box“,”_by_cbsa".

See the RAQSAPI vignette for more details

(RAQSAPI must be installed first)

RShowDoc(what=“RAQSAPIvignette”, type=“html”, package=“RAQSAPI”)


  1. See (https://aqs.epa.gov/aqsweb/documents/data_api.html) for the full details of the Data Mart API↩︎