pre_checks | R Documentation |
This function will execute a basic completeness review for Oregon DEQ's continuous data submission template xlsx file v2.03. The function checks for missing data, missing values in required columns, invalid domain values, and flags potential errors. If a check result is TRUE, it means the check failed and something is missing or there is an invalid value.
pre_checks(
template_list = NULL,
org = NULL,
projects = NULL,
mloc = NULL,
deployment = NULL,
results = NULL,
prepost = NULL,
audits = NULL
)
template_list |
A continuous data list object with each list holding
a different worksheet from the xlsx data template. Use |
org |
data frame holding Organization Details. Default is NULL. |
projects |
data frame with Projects. Default is NULL. |
mloc |
data frame holding Monitoring_Locations. Default is NULL. |
deployment |
data frame holding Deployment. Default is NULL. |
results |
data frame holding Results. Default is NULL. |
prepost |
data frame holding PrePost. Default is NULL. |
audits |
Dataframe of audits. Default is NULL. |
Complete list of checks:
Organizational Details worksheet checks:
Missing Organization Name
Missing Address
Missing Phone Number
Missing Email
Missing response to Type(s) of Data Submitted
Missing response to Prior DEQ Data Submission
Project worksheet checks:
Project worksheet is empty
Missing value in column Project.IDs
Missing value in column Project.Name
Missing value in column Project.Description
Missing value in column Approved.QAPP.Indicator
Value in column QAPP.Approval.Agency.Name is NA but value in column Approved.QAPP.Indicator = 'Yes'
Monitoring Locations worksheet checks:
Monitoring Locations worksheet is empty
Monitoring Location ID in results and not in Monitoring_Locations
Value in column Monitoring.Location.ID has been entered more than once.
Value in column Monitoring.Location.ID is > 22 characters
Value in column in Monitoring.Location.ID has an invalid character: ‘ ~ ! @ # $ % ^ & * ( ) [ { ] } \ | ; ’ " < > / ? [space].
Missing value in column Monitoring.Location.Name
Invalid value in column Monitoring.Location.Type
Missing value in column Latitude
Missing value in column Longitude
Invalid value in column Horizontal.Datum
Invalid value in column Coordinate.Collection.Method
Invalid value in column Tribal.Land
Invalid value in column County.Name
Invalid value in column State.Code
Invalid value in column HUC.8.Code
Value in column Latitude is outside of Oregon
Value in column Longitude is outside of Oregon
Value in column Source.Map.Scale is NA but column Coordinate.Collection.Method ='Interpolation-Map'
Value in column County.Name is NA but value in column State.Code = 'OR', 'WA', 'ID', 'CA', or 'NV'
Missing value in column Alternate.Context.1 because column Alternate.ID.1 has information
Missing value in column Alternate.Context.2 because column Alternate.ID.2 has information
Missing value in column Reachcode
Missing value in column Measure
Missing value in column LLID
Missing value in column River.Mile
Deployment worksheet checks:
Deployment worksheet is empty
Deployments '[Monitoring.Location.ID - Equipment.ID - Characteristic.Name]' in Results and not in Deployment.
Deployments '[Monitoring.Location.ID - Equipment.ID - Characteristic.Name]' not in Results.
There is more than one row of the same deployment '[Monitoring.Location.ID - Equipment.ID - Characteristic.Name]'. Make them unique or expand deployment start and end dates.
There are results from a deployment '[Monitoring.Location.ID - Equipment.ID - Characteristic.Name]' sampled outside of the deployment period.
Missing value in column Equipment.ID
Invalid value in column Characteristic.Name
Missing value in column Deployment.Start.Date
Missing value in column Deployment.End.Date
Missing value in column Sample.Depth
Invalid value in column Sample.Depth.Unit
Invalid value in column Sample.Media
Invalid value in column Sample.Sub.Media
Results worksheet checks:
Results worksheet is empty
Monitoring Location ID in Monitoring_Locations and not in Results
Missing value in column Activity.Start.Date
Missing value in column Activity.Start.Time
Invalid value in column Activity.Start.End.Time.Zone
Missing value in column Equipment.ID
Invalid value in column Characteristic.Name
Missing value in column Result.Value
Invalid value in column Result.Unit
Invalid value in column Result.Status.ID
PrePost worksheet checks:
PrePost worksheet is empty
Missing PrePost Results for '[Equipment.ID - Characteristic.Name]' that are in Results worksheet.
Invalid value in column Characteristic.Name
Missing value in column Equipment.Result.Value
Invalid value in column Equipment.Result.Unit
Missing value in column Reference.Result.Value
Invalid value in column Reference.Result.Unit
Missing value in column Reference.ID
Audit Data worksheet checks:
Audit Data worksheet is empty
Audits missing for some deployments '[Monitoring.Location.ID - Equipment.ID - Characteristic.Name]'.
Missing value in column Project.ID
Missing value in column Activity.Start.Date
Missing value in column Activity.Start.Time
Missing value in column Activity.End.Date
Missing value in column Activity.End.Time
Invalid value in column Activity.Start.End.Time.Zone
Invalid value in column Activity.Type
Missing value in column Activity.ID
Missing value in column Equipment.ID
Invalid value in column Sample.Collection.Method
Invalid value in column Characteristic.Name
Missing value in column Result.Value
Invalid value in column Result.Unit
Invalid value in column Result.Analytical.Method.ID
Invalid value in column Result.Analytical.Method.Context
Invalid value in column Result.Value.Type
Invalid value in column Result.Status.ID
Invalid value in column Result.Measure.Qualifier
data frame of the check and check result.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.