Giter VIP home page Giter VIP logo

npsdataverse's Introduction

NPSdataverse

NPSdataverse loads a suite of R packages for creating, manipulating, and accessing data packages including interacting with DataStore. This is an early version of the NPSdataverse. Please request enhancements and bug fixes through [Issues](https://github.com/nationalparkservice/NPSdataverse/issues).

Installation

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

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

NPSdataverse will install the following R packages:

Package Location
QCkit https://nationalparkservice.github.io/QCkit/
EMLassemblyline (EAL) https://ediorg.github.io/EMLassemblyline/
EML https://www.cran-e.com/package/EML
EMLeditor https://nationalparkservice.github.io/EMLeditor/
DPchecker https://nationalparkservice.github.io/DPchecker/
NPSutils https://nationalparkservice.github.io/NPSutils/

(R packages in bold are developed by NPS)

Trouble shooting installation

Each package within the NPSdataverse has a number of dependencies, most of which are hosted on CRAN. During the initial install of NPSdataverse, you may be prompted to install or update these dependencies. The initial installation can take some time and require multiple iterative package updates/installs. Depending on how they were initially installed, some dependent packages may fail update or to install. In this case you can try running

.libPaths()

to find where your packages are located on your local machine. Navigate to that location and delete the offending package. Then try to re-install.

Updating NPSdataverse packages

Many of the NPSdataverse packages are in a phase of rapid development. When you load the NPSdataverse (using library(NPSdataverse)), if you are online, NPSdataverse will check for new versions of the packages stored on GitHub (all the packages except r/EML). NPSdataverse will tell you if all your packages are up to date. Conversely if any of the NPSdataverse packages need to be updated, NPSdataverse will indicate which packages need updating and how to perform the updates. If you do not get any notices about whether your packages are up to date or not, then the NPSdataverse package itself needs to be updated. See Installation for instructions on how to update the NPSdataverse package.

Creating data packages

If you are you are creating a data package and need to generate EML metadata make sure all of your .csv data files are in a single folder.

After loading NPSdataverse, from within Rstudio select the “File” menu. Select “New File” from the drop down menu and choose “R Markdown”. In the dialog box that pops up, select “From Template” and then click on the template labelled “Editable_EML_Creation_Workflow” and click “OK”.

This will open a new file on that you can edit to generate EML metadata for your data package. See the web pages associated with EMLeditor for additional information, instructions, and examples.

npsdataverse's People

Contributors

roblbaker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

npsdataverse's Issues

Add infographic

Add an infographic to the readme and index files that shows the structure of NPSdataverse, the constituent package names, and what their utility is.

Sarah comments

We should break this stuff out into individual issues eventually...

  • May want to link to NPSdataverse package collection from each individual package's readme
  • If we want fxn names to conform to tidyverse style guide (snake_case), better to do it now than later.
  • We should (maybe?) come up with a convention for organizing functions in the R folder.
    • I'm kind of leaning towards one function per file for small-ish packages because it's easier to see what functions are present. Unexported fxns could all go into a utils.R file.
    • For larger packages, maybe plan out what categories of functions will be in the package (e.g. validation, read/write, metadata creation, etc) and break files up that way. Downside of this is that there will inevitably be functions that don't fall neatly into one category, and those become hard to find. Documentation helps though.
  • Unit tests are a good idea
  • We should try out pkgdown! https://pkgdown.r-lib.org/index.html
  • Should NPSdataverse_attach() silently return to_load?

Allow off-line functionality

Right now, if you want to load the NPSdataverse, it automatically does several calls to the GitHub API. If you are offline, the package will not load.

It would be nice if these API calls could be skipped when a user is off line.

NPSdataverse quickly reaches GitHub API rate limit

The NPSdataverse hits the GitHub API a lot - especially when initially installing or updating the NPSdataverse. There has got to be some way to reduce the number of times that it hits the API. For instance, can we eliminate all API hits on installation and only do API calls when the package is loaded?

Installing for the first time requires lots of updates

The first time you install NPSdataverse there at LOTS of packages that need to be updated and the iterative updating process can be tedious, time consuming, and confusing. Is there a way to reduce the packages that need to be updated. For instance, add minimum package version requirements to imports?

NPSdataverse should also tell users when packages are up to date

Currently, NPSdataverse only tells users if packages are out of date.

The output from an older version of NPSdataverse that does not check packages for updates and the output when all packages are up to date is therefore identical, which can be confusing for users and hard for support to trouble shoot.

Add a feature where NPSdataverse alerts users that all packages are up to date (if they are) AND alerts users if packages need to be updated (if they do). That way, if a user sees NO information about package updates it is clear that they need to update NPSdataverse itself.

Does not advise of package updates

when attaching NPSdataverse, the fucntion should check for any available updates to any constituent packages across github and CRAN. However, at the moment it will tell users that all packages are up to date, even if it is loading an older version of them (from github).

This needs fixed!

NPSdataverse should point to a specific release of EMLassemblyline

Currently, NPSdataverse points to the development version of EMLassemblyline on github. This means that if any changes are made to EAL, it could break NPSdataverse. Instead it would be better to point to the most up to date version/release of EAL. Then if changes are made to EAL we will have time to account for them in NPSdataverse instead of having it all come crashing down.

check for unique title

Add a check that does an API call to DataStore to check whether the title is unique or not. Fails if it is not unique; passes if it is unique. Should there be similarity warnings?

Happy New Year, here is a bug

Describe the bug
After updating QCkit and trying to load NPSdataverse, I get an error that the previous version of QCkit can't be unloaded because it's imported by DPchecker.
This is probably at least in part the fault of my last pull request - happy to help troubleshoot if it's not an obvious fix.

To Reproduce
Steps to reproduce the behavior:
Loaded NPSdataverse and received a message that QCkit (v0.1.1) is out of date.
Unloaded NPSdataverse and installed QCkit v0.1.3 from github.
Re-loaded NPSdataverse.

Screenshots
image

Cannot open 'https://api.github.com/repos/nationalparkservice/NPSdataverse/tarball/HEAD'

[Running R version 4.2.0; devtools version 2.4.5, Rtools version 2.4.0]

This is my first attempt in loading NPSdataverse...

devtools::install_github("nationalparkservice/NPSdataverse")
Downloading GitHub repo nationalparkservice/NPSdataverse@HEAD

Error in utils::download.file(url, path, method = method, quiet = quiet, :
cannot open URL 'https://api.github.com/repos/nationalparkservice/NPSdataverse/tarball/HEAD'

I am able to manually open the URL and download the tarball (nationalparkservice-NPSdataverse-07be839.tar.gz)

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.