Scale data in Comparer
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start by locating the Python definitions of Comparer and ComparerCollection and inspect how primary variables, auxiliary data, units, and comparisons are represented. Review linked pull request #528 before making changes, and check whether Timeseries is included in the intended scope. Done means scale(factor=None, *, offset=None, new_unit=None) follows the stated unit and collection constraints.
Written by the indexing model from the issue text.
Description
I propose a new method scale() in Comparer and ComparerCollection that should scale all primary variables (not aux data) by a factor and set a new unit. The use case is e.g. that want to show all my plots, tables etc with "cm" unit instead of "meter" but all the data files are in meter so it is a bit cumbersome to change the units before the comparison (it would require me to load all the data in the dfsu).
- The ComparerCollection should only allow scale if unit is the same across all contained comparers.
- Signature should be
scale(factor=None, *, offset=None, new_unit=None) - The
new_unitargument should be required if factor is not None and old unit is not undefined. - Optionally, we could allow the same functionality on Timeseries (for completeness)
- Dominant language
- Python
- Stars
- 56
- Forks
- 9
- Avg merge
- 57m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DHI/modelskill
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
DHI/modelskill#628 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
DHI/modelskill#706 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
DHI/modelskill#700 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
DHI/modelskill#697 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
DHI/modelskill#689 · 1 comment ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100