---
title: RAQSAPI - A Brief introduction into RAQSAPI functions
author: Clinton Mccrowey physical scientist - US EPA
output:
  rmarkdown::html_vignette: default
vignette: >
  %\VignetteIndexEntry{RAQSAPI - A Brief introduction into RAQSAPI functions}
  %\VignetteEncoding{UTF-8}
  %\VignetteDepends{knitr}
  %\VignetteDepends{rmarkdown}
  %\VignetteEngine{knitr::rmarkdown}
---


| <span style="color:blue"> Information: AQS Data Mart API restricts the \
maximum amount of monitoring data to one full year of data per API \
call.</span> |
| -- |

RAQSAPI functions are named according to the service and filter variables that
are available by the Data Mart
API.^[See (https://aqs.epa.gov/aqsweb/documents/data_api.html) for the full 
details of the Data Mart API]

## 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**:

 - **\_by_site**
 - **\_by_county**
 - **\_by_state**
 - **\_by\_\<latitude/longitude bounding box\>** (_by_box)
 - **\_by\_\<monitoring agency\>** (_by_MA)
 - **\_by\_\<Primary Quality Assurance Organization\>** (_by_pqao)
 - **\_by\_\<core based statistical area (as defined by the** \
       **US census Bureau)\>** (_by_cbsa).

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


**These fourteen services are**:

 - **Monitors** (aqs_monitors_by_*) 
 - **Sample Data** (aqs_sampledata_by_*)
 - **Daily Summary Data** (aqs_dailysummary_by_*) 
 - **Annual Summary Data** (aqs_annualsummary_by_*)
 - **Quarterly Summary Data** (aqs_quarterlysummary_by_*)
 - **Quality Assurance - Blanks Data** (aqs_qa_blanks_by_*) 
 - **Quality Assurance - Collocated Assessments**
    (aqs_qa_collocated_assessments_by_*)
 - **Quality Assurance - Flow Rate Verifications**
    (aqs_qa_flowrateverification_by_*)
 - **Quality Assurance - Flow Rate Audits** (aqs_qa_flowrateaudit_by_*)
 - **Quality Assurance - One Point Quality Control Raw Data**
    (aqs_qa_one_point_qc_by_*)
 - **Quality Assurance - PEP Audits** (aqs_qa_pep_audit_by_*)
 - **Transaction Sample - AQS Submission data in transaction Format (RD)**
     (aqs_transactionsample_by_*)
 - **Quality Assurance - Annual Performance Evaluations** \
     (aqs_qa_annualperformanceeval_by_*)
 - **Quality Assurance - Annual Performance Evaluations in the AQS** \
     **Submission transaction format (RD)**
     (aqs_qa_annualperformanceevaltransaction_by_*)
     
| <span style="color:blue"> 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.</span> |
| -- |

Aggregate functions are named AQS_API\<service\>\_\<aggregation\>() where
\<service\> is one of the 13 services listed above and \<aggregation\> is
either "\_by\_site", "\_by\_county", "\_by\_state", "\_by\_box", "\_by\_cbsa",
"\_by\_ma", or "\_by\_pqao".

### See the RAQSAPI vignette for more details
(RAQSAPI must be installed and built with BUILD_MANUAL = TRUE enabled)
```R
  RShowDoc(what="RAQSAPIvignette", type="html", package="RAQSAPI")
```
