Git Product home page Git Product logo

flowregime's People

Contributors

mkoohafkan avatar

Watchers

 avatar  avatar  avatar  avatar

flowregime's Issues

fix time_to_recede

In function time_to_recede (line 121 of flowregime.R) should be

low = min(l) + high - 1

Minor: Update the help files for RVA and build_RVA_categories

The help files of these functions are a bit confusing. In particular the help file of the RVA() function. In the details, this function refers to a boundaries argument, which is not an argument in the RVA function, but is in the build_RVA_categories() function. In the help file of the build_RVA_categories() function, this argument is only briefly explained in the arguments. In addition, for the rvacat argument, the help file refers to RVA_categories() as a function, which is not a function in the package. I have assumed this refers to the build_RVA_categories() function.

I am happy to adjust and put in a pull request

number_of_reversals gets stuck with lots of no flow data

I am suggesting a rewrite of the "while" loop in number_of_reversals to deal with flows with large numbers of 0's (ephemeral streams). I can put in a pull request
Here is the bit of code:

identify periods of no change and group with preceding behavior

zidx = NA
while(length(zidx) > 0){
zidx = which(dpd == 0)
dpd[zidx] = dpd[zidx - 1]
}

zeros

zeros <- which(dpd == 0)

values

value <- which(dpd !=0)

get rid of zeros temporarily

dpd1 <- dpd[value]

calculate reversals

result <- rollapply(dpd1, 2, function(x) x[2] != x[1], align = "right",
fill = "FALSE")

merge results with no change periods

revflow <- dpd
revflow[value] <- result
revflow[zeros] <- FALSE

EFC function categories

The code of the function suggests it uses build_EFC_thresholds(), but this function does not take “thresholds” as an argument, so it seems coding on this function is incomplete.

This means that currently the threshold for high flow and low flow is hard coded (Q75, Q25 and Q10 for high flow, low flow and extreme low flow respectively).

Something for the to-do list. I assume this should mimic the build_RVA_categories function

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.