Skip to content

Commit

Permalink
name change
Browse files Browse the repository at this point in the history
  • Loading branch information
swd-turner committed Mar 12, 2021
1 parent ad697d6 commit 002d3f0
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Package: rulecurve
Title: Infer Reservoir Operations From Data.
Package: starfit
Title: Storage Target and Release Function Inference Tool
Version: 0.0.0.9000
Authors@R:
person(given = "Sean",
family = "Turner",
role = c("aut", "cre"),
email = "sean.turner@pnnl.gov",
comment = c(ORCID = "0000-0003-4400-9800"))
Description: A tool for inferring reservoir storage targets and release rules.
Description: A tool for inferring reservoir storage targets and release functions.
License: BSD 2-Clause
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.0
RoxygenNote: 7.1.1
Suggests:
testthat
Imports:
Expand Down
2 changes: 1 addition & 1 deletion DISCLAIMER
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rulecurve
starfit

Copyright (c) 2021, Battelle Memorial Institute

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rulecurve
starfit

Copyright (c) 2021, Battelle Memorial Institute

Expand Down
14 changes: 7 additions & 7 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ knitr::opts_chunk$set(
)
```

# rulecurve <img src='man/figures/logo.png' align="right" height="101.5" />
# starfit <img src='man/figures/logo.png' align="right" height="101.5" />

<!-- badges: start -->
[![Travis build status](https://travis-ci.com/IMMM-SFA/rulecurve.svg?branch=master)](https://travis-ci.com/IMMM-SFA/rulecurve)
<!-- badges: end -->

`rulecurve` is a package that is designed to work with reservoir time series data in [USRDATS]() to infer operating storage targets and release functions.
`starfit` is a package that is designed to work with reservoir time series data in [USRDATS]() to infer operating storage targets and release functions.

## Installation

Install `rulecurve` using `devtools`:

``` r
devtools::install_github("IMMM-SFA/rulecurve")
devtools::install_github("IMMM-SFA/starfit")
```

#### Example - fit storage targets for Garrison Dam, North Dakota.
Expand All @@ -50,11 +50,11 @@ Here we can see that the `fit_targets()` function has generated a list object wi


```{r}
fitted_targets[["flood target parameters"]] %>%
convert_parameters_to_storage_targets("flood") -> flood_targets
fitted_targets[["NSR upper bound"]] %>%
convert_parameters_to_targets("flood") -> flood_targets
fitted_targets[["conservation target parameters"]] %>%
convert_parameters_to_storage_targets("conservation") -> conservation_targets
fitted_targets[["NSR lower bound"]] %>%
convert_parameters_to_targets("conservation") -> conservation_targets
```


Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# rulecurve <img src='man/figures/logo.png' align="right" height="101.5" />
# starfit <img src='man/figures/logo.png' align="right" height="101.5" />

<!-- badges: start -->

[![Travis build
status](https://travis-ci.com/IMMM-SFA/rulecurve.svg?branch=master)](https://travis-ci.com/IMMM-SFA/rulecurve)
<!-- badges: end -->

`rulecurve` is a package that is designed to work with reservoir time
`starfit` is a package that is designed to work with reservoir time
series data in [USRDATS]() to infer operating storage targets and
release functions.

Expand All @@ -18,7 +18,7 @@ release functions.
Install `rulecurve` using `devtools`:

``` r
devtools::install_github("IMMM-SFA/rulecurve")
devtools::install_github("IMMM-SFA/starfit")
```

#### Example - fit storage targets for Garrison Dam, North Dakota.
Expand All @@ -35,13 +35,13 @@ fit_targets(your_path_to_USRDATS, dam_id = 753) -> fitted_targets
# take a look at the output:
str(fitted_targets)
#> List of 4
#> $ id : num 753
#> $ weekly storage : tibble [1,306 × 3] (S3: tbl_df/tbl/data.frame)
#> $ id : num 753
#> $ weekly storage : tibble [1,306 × 3] (S3: tbl_df/tbl/data.frame)
#> ..$ year : num [1:1306] 1995 1995 1995 1995 1995 ...
#> ..$ epiweek: num [1:1306] 1 2 3 4 5 6 7 8 9 10 ...
#> ..$ s_pct : num [1:1306] 74.1 73.3 72.9 72.5 72 ...
#> $ flood target parameters : num [1:5] 84.23 -3.83 -9.18 94.31 77.23
#> $ conservation target parameters: num [1:5] 45.55 -2.8 -2.11 49.81 42.41
#> $ NSR upper bound: num [1:5] 84.23 -3.83 -9.18 Inf 77.23
#> $ NSR lower bound: num [1:5] 45.55 -2.8 -2.11 Inf 42.41
```

Here we can see that the `fit_targets()` function has generated a list
Expand All @@ -52,11 +52,11 @@ parameters for (3) and (4) can be converted to storage targets using
`convert_parameters_to_storage_targets()`.

``` r
fitted_targets[["flood target parameters"]] %>%
convert_parameters_to_storage_targets("flood") -> flood_targets
fitted_targets[["NSR upper bound"]] %>%
convert_parameters_to_targets("flood") -> flood_targets

fitted_targets[["conservation target parameters"]] %>%
convert_parameters_to_storage_targets("conservation") -> conservation_targets
fitted_targets[["NSR lower bound"]] %>%
convert_parameters_to_targets("conservation") -> conservation_targets
```

Then we can combine these targets with the weekly storage data to view
Expand Down
Binary file modified man/figures/README-unnamed-chunk-5-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.

0 comments on commit 002d3f0

Please sign in to comment.