Git Product home page Git Product logo

roblbaker / dpchecker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nationalparkservice/dpchecker

0.0 0.0 0.0 5.01 MB

DPCchecker (Data Package Congruence checker) is a package with a series of functions for NPS data package authors and reviewers to check for internal consistency among data/meta data and with the data package standards

Home Page: https://roblbaker.github.io/DPchecker/

License: Other

R 100.00%
data-packages eml-metadata r

dpchecker's Introduction

Lifecycle: experimental CodeFactor

DPchecker

v0.3.3

DPchecker (Data Package checker) is a package with a series of functions for NPS data package authors and reviewers to check for internal consistency among data/meta data and with the data package standards.

Currently, only EML metadata and .csv data files are supported. It is recommended that you store all data files and the single metadata file (filename must end in "metadata.xml") in the same directory.

Each function runs an single check and imports data or metadata as necessary. If you prefer to run all checks at once, you can use run_congruence_checks().

Installation

You can install the development version of DPchecker from GitHub with:

# install.packages("devtools")
devtools::install_github("nationalparkservice/DPchecker")

Examples:

Run all checks at once:

library(DPchecker)

# Get the directory where example data is stored (alternately, replace this with the path to your data folder)

dir <- DPchecker_example("BICY_veg")  # Use this to test things out with the included example data
# dir <- "C:/Users/yourusername/Documents/my_data_package"  # The path to your data package should look something like this

# Run all checks and summarize results

run_congruence_checks(dir)

# Alternately, if your data package is stored in the root of your R project folder, you don't need to pass any arguments
run_congruence_checks()

Verify that file names and column names in the metadata match the data:

library(DPchecker)

dir <- DPchecker_example("BICY_veg")  # Use this to test things out with the included example data
# dir <- "C:/Users/yourusername/Documents/my_data_package"  # The path to your data package should look something like this

test_file_name_match(dir)
test_fields_match(dir)

dpchecker's People

Contributors

roblbaker avatar wright13 avatar

dpchecker's Issues

Fix 10 Maintainability issues in R\tabular_data_congruence.R

Basically, codefactor thinks all sapply() calls should be re-written as vapply(). I'm inclined to think it doesn't really matter much, but if anyone wants to go chase that codefactor A rating, this these are the things that need to be refactored.
ย 
CodeFactor found multiple issues:

Function "sapply" is undesirable. As an alternative, use vapply() with an appropriate FUN.VALUE= argument to obtain type-stable simplification.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.