Commit b539ccda authored by Turner, Sean's avatar Turner, Sean
Browse files

quarto example add

parent f0e76a99
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
---
title: "Untitled"
format: html
---

```{r setup}
#| echo: false
library(reticulate)
library(dplyr)
library(lubridate)
library(readr)
library(ggplot2)
use_condaenv("powersheds")
```

```{python}
import pandas as pd
import powersheds

df = pd.read_csv("examples/dev/inflow_release_ex1.csv")
inflow = df['inflow']
release = df['release']

storage, actual_release, spill = powersheds.simulate_cascade(inflow, release)

```

```{r}

tibble(
    storage = py$storage,
    release = py$actual_release,
    spill = py$spill
    ) |>
    bind_cols(read_csv("examples/dev/inflow_release_ex1.csv")) |>
    ggplot(aes(datetime, storage)) + geom_line()

```
 No newline at end of file