Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SkillTable is a collection of SkillArrays #309

Merged
merged 19 commits into from
Dec 11, 2023

Conversation

jsmariegaard
Copy link
Member

@jsmariegaard jsmariegaard commented Dec 6, 2023

Each column of the SkillTable (formerly known as AggregatedSkill) is a SkillArray representing a single metric. Only SkillArray has a plotter.

s = cc.skill()
s.rmse.plot.bar()

Or shorter:

s = cc.skill("kge").plot.bar()

Soon the underlying datastructure will be a Dataset and a DataArray.

@@ -299,8 +313,18 @@ def __repr__(self):
def _repr_html_(self):
return self.df._repr_html_()

def __getitem__(self, x):
return self.df[x]
def __getitem__(self, x) -> SkillArray | SkillFrame:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsmariegaard jsmariegaard changed the title SkillArray is a collection of SkillFrames SkillTable is a collection of SkillArrays Dec 8, 2023
@jsmariegaard jsmariegaard changed the title SkillTable is a collection of SkillArrays SkillSet is a collection of SkillArrays Dec 9, 2023
@jsmariegaard jsmariegaard changed the title SkillSet is a collection of SkillArrays SkillTable is a collection of SkillArrays Dec 11, 2023
@jsmariegaard jsmariegaard marked this pull request as ready for review December 11, 2023 11:01
@jsmariegaard
Copy link
Member Author

This is first step in improving SkillTable. Replacing the data container to xr.Dataset is pushed to a subsequent PR (to minimize merge conflicts).

@jsmariegaard jsmariegaard merged commit 9579b46 into main Dec 11, 2023
10 checks passed
@jsmariegaard jsmariegaard deleted the skillarray-in-skilldataset branch December 11, 2023 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants