HydroR - Add "deriveDataSeries" function
- Dominant language
- C#
- Stars
- 76
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
jirikadlec2[CodePlex]
When using HydroR it is currently difficult to create a new data series (based on an existing series) and save it to the database. One use case is forecasting: The forecast applies to an existing site and variable, but the value type and method are different.
Also the ValueCount is different from any existing dataSeries in the DB. In order to reduce the number of code that must be written I propose adding a new method quotDeriveDataSeriesquot with following input parameters:
connectionString (the database connection)
originalSeriesID (the ID of the original series)
times (a vector of new observation dates/times)
dataValues (a vector of new data values)
output: the derived series with the time/value arrays read from the times and dataValues vectors (both vectors must be same length). The derived series has the same site, source and quality control level as the original series but it can have a different number
of data values. The method is set to quotDerived using HydroRquot. The variable$ValueType is changed to quotDerived Valuequot. After running deriveDataSeries, user can do some modification to its other attributes (if required) and then run saveDataSeries
to save it to the DB.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the HydroR implementations of saveDataSeries and the data-series model, then inspect how an existing series is loaded from the database. Confirm the requested handling of times and dataValues, copied attributes, and derived value metadata. Done means a derived series can be modified and passed to saveDataSeries, with matching vector lengths enforced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100