RWDataPlyr v0.6.2

0

Monthly downloads

0th

Percentile

Read and Manipulate Data from 'RiverWare'

A tool to read and manipulate data generated from 'RiverWare'(TM) <http://www.riverware.org/> simulations. 'RiverWare' and 'RiverSMART' generate data in "rdf", "csv", and "nc" format. This package provides an interface to read, aggregate, and summarize data from one or more simulations in a 'dplyr' pipeline.

Readme

RWDataPlyr

Release (v0.6.1) Development
Travis-CI Build Status Travis-CI Build Status
AppVeyor Build Status AppVeyor Build Status
codecov codecov

Overview

RWDataPlyr is a tool to read and manipulate data generated from RiverWareTM simulations in rdf, csv, and nc formats and work with those data in a dplyr pipeline. It provides functions to gather, aggregate, and summarize data from multiple RiverWare simulations, i.e., scenarios.

Installation

RWDataPlyr can be installed from GitHub, and we suggest building the vignette.

```{r, eval=FALSE}

install.packages("devtools")

devtools::install_github('BoulderCodeHub/RWDataPlyr', build_vignettes = TRUE)


## Usage

RWDataPlyr provides at least three workflows for reading and using RiverWare data:

1. Reading and manipulating a single scenario
    * Fast
    * Best for inspecting a single slot
    * If comparing scenarios, must manually repeat for each scenario
    * Relies on `read_rdf()` and `read_rw_csv()`
2. Summarizing multiple slots of data from a single scenario
    * Repeatable; allows user to process many slots at once
    * Best for producing "polished" analyses of a single scenario
    * Relies on `rdf_aggregate()` and user specified `rwd_agg` object
3. Aggregating and summarizing many scenarios
    * Repeatable; allows user to process many slots for many scenarios at once
    * Repeats summary of a single scenario on multiple scenarios and combines results together
    * Relies on `rw_scen_aggregate()` and user specified `rwd_agg` object

Check out the workflow vignette for more details:

```{r, eval = FALSE}
vignette("rwdataplyr-workflow", package = "RWDataPlyr")

Log

  • 2018-06-07: version 0.6.1 available
  • 2018-04-10: version 0.6.0 available
  • 2017-05-26: version 0.5.0 available
  • 2016-11-01: version 0.4.1.1 available. The package is now actually called RWDataPlyr.
  • 2016-10-20: version 0.4.1 available
  • Previous versions were originally available as the RWDataPlot package
    • 2016-07-13: version 0.4 available
    • 2016-03-22: version 0.3 available
    • 2015-07-01: version 0.2 available
    • 2014-09-16: working to create an R Package from existing code.

Disclaimer

This software is in the public domain because it contains materials that originally came from the U.S. Bureau of Reclamation, an agency of the United States Department of Interior.

Although this code has been used by Reclamation, no warranty, expressed or implied, is made by Reclamation or the U.S. Government as to the accuracy and functioning of the program and related program material nor shall the fact of distribution constitute any such warranty, and no responsibility is assumed by Reclamation in connection therewith.

This software is provided "AS IS."

Functions in RWDataPlyr

Name Description
getTraceMin Get the annual minimum for each trace
getDataForAllScens Get and aggregate data from an rdf file(s)
rbind.rwd_agg Combine RiverWare data aggregators
keyRdf Example rdf file with monthly data.
ym_get_wateryear Get the water year from a year-month (yearmon) value
rdf_to_rwtbl Convert an rdf to a tibble
rdf_slot_names Returns all slots contained in an rdf file.
sysRdf Example rdf file with annual data.
read_rwd_agg Read in a rwd_agg file
rw_scen_gen_names Create a vector of scenarios from different dimensions
createSlotAggList Creates a list for use by getDataForAllScens.
getTraceAvg Get the average annual value for each trace
getArrayPctl Get values at the input exceedance levels for the entire array by date
getTraceSum Get the annual sum for each trace
getTraceMax Get the annual maximum for each trace
is_rdf Test if the object is an rdf
rwtbl_slot_names List the slot names in a tbl_df
is_rwd_agg Test if the object is a rwd_agg
rwtbl_var_to_slot Map a variable name to the RiverWare slot name
is_slot_agg_list Test if the object is a slot_agg_list
rwslot_annual_sum Simple aggregation functions for monthly matrix data
read.rdf Read an rdf file into R.
read_rw_csv Read RiverWare/RiverSMART produced csv files
rwtbl_get_scen_folder Map a scenario name to the original scenario folder
rdfSlotToXTS Get one slot out of an rdf list and put it in an XTS object
rdf_aggregate Aggregate RiverWare output for one or more scenarios
rwd_agg Class to specify how to aggregate RiverWare data
rwd_agg_template Create a rwd_agg template
scen_data Example aggregated scenario data
slot_agg_list A class to control how RiverWare data are aggregated
rdf_get_slot Get a slot out of an rdf object
RWDataPlyr-package RWDataPlyr: Read and Manipulate Data from 'RiverWare'
as_rwd_agg Coerce lists, matrices, and data.frames to RiverWare data aggregators
getArrayThresholdExceedance Get values at the input exceedance levels for the entire array by date
getTraceMonthVal Get values that meet a month requirement
rdf_get_timespan Returns the simulation timespan from an rdf
No Results!

Vignettes of RWDataPlyr

Name
RiverWareFlowChart.png
dir_structure.png
rwdataplyr-workflow.Rmd
No Results!

Last month downloads

Details

URL https://github.com/BoulderCodeHub/RWDataPlyr
BugReports https://github.com/BoulderCodeHub/RWDataPlyr/issues
License CC0
Copyright This software is in the public domain because it contains materials that originally came from the U.S. Bureau of Reclamation, an agency of the U.S. Department of Interior.
LazyData true
VignetteBuilder knitr
RoxygenNote 6.0.1
LinkingTo Rcpp
NeedsCompilation yes
Packaged 2018-08-15 15:17:20 UTC; RAButler
Repository CRAN
Date/Publication 2018-08-16 11:40:10 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/RWDataPlyr)](http://www.rdocumentation.org/packages/RWDataPlyr)