This document outlines a workflow to utilize the validator app from the Microplastics Data Portal. After reading this document, users will have a better understanding of the processes involved in creating this app and how to use it. The purpose of this tool is to not only validate data, but to share data as well, promoting open-source resources. For more documentation about the One4All R package, please see the One4All Package Tutorial.
This section discusses how the app validates and shares data. First and foremost, there is an existing set of rules created in Excel that is applied to the validator app prior to user usage. These rules allow the app to validate the user’s data once they’ve uploaded it to the app. The rules sheet consists of six columns, including name, description, dataset, valid example, severity, and the rule itself (see below for more details). Download the sample rules under the ’_Help’ tab in the validator app to view the rules.
Name: The name of the row.
'(ex. Amount)'
Description: A description of the rule itself and
its requirements.
'(ex. If there are two or more identical particles (in every aspect), upload it once and indicate the number of identical particles here as a whole number)'
Dataset: Labeled ‘particles’, ‘methodology’, or
‘samples’. '(ex. partices)'
Valid_example: A valid example of the rule.
'(ex. 2)'
Severity: The severity of the rule, labeled either a
‘warning’ or an ‘error’. Warnings will still allow the data to be
shared, whereas an error will need to be fixed.
'(ex. warning)'
Rule: The rule that validates the data (written in r
code). '(ex. Amount >= 2 | is.na(Amount))'
To access the validator app, go to our GitHub and link it directly to your own device in R. After setting up the github to your device, go to the validator folder, select the global.R, ui.R, or server.R, and run the app.
If using the R package, read in the library and run the following
command, run_app()
.
Download the valid example data under the '_Help'
tab
within the app. To properly structure your data, keep the columns but
replace the data with your own. It is important that the columns remain
the same because each column corresponds to a rule from the rules
sheet.
Although it is necessary for all of the columns to be present, the validator app encompasses a wide variety of data, so it is not a requirement for every column to have data. The columns that don’t pertain to your dataset can be left blank.
If you simply want to validate your data, select cancel on the
'Would you like to share your uploaded data'
screen. Your
data will display among three boxes- methodology, samples, and
particles. Each of these tables will separate the columns from your data
into successes, warnings, and errors.
To view the details, click on a table which will then display two
boxes, 'Issues Raised'
and 'Issues Selected'
.
The 'Issues Raised'
box will highlight the warnings and
errors in yellow or red, respectively. Click on an
'Issues Raised'
column and the entries that are invalid
will appear to the right in the 'Issues Selected'
box. To
view all statuses, including successes, switch the tool toggle labeled
'Errors only?'
off.