Validator App Tutorial

Hannah Sherrod, Win Cowger


Document Overview

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.

Background: Rules

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 |'

Running the App

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().


How to structure your data

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.

Sharing Data

Once the app is loaded, upload your data by selecting the ‘Upload Data’ icon. Your local folder will display where you can select from your CSV or XLSX files along with a corresponding zip file. The validator app accepts data formats of CSV, XLSX, and zip files. After selecting the files, a screen will appear with the option to share your uploaded data.

If this is an update to a previous submission, select that icon and upload the previous certificate from your local device. If this is a new submission, then follow the rest of the prompt on the screen.