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

Use Collection object implementation from NCAR/xcollection in intake-esm #382

Closed
andersy005 opened this issue Oct 15, 2021 · 0 comments · Fixed by #405
Closed

Use Collection object implementation from NCAR/xcollection in intake-esm #382

andersy005 opened this issue Oct 15, 2021 · 0 comments · Fixed by #405
Labels
enhancement Issues that are found to be a reasonable candidate feature additions

Comments

@andersy005
Copy link
Member

A few weeks ago, we experimented with Collection, which provides a high-level mapping of name/key to Xarray.Datasets. The xcollection.Collection class is a dict-like class. It subclasses collections.abc.MutableMapping and provides additional functionality like

  • .map(): applies a function to each dataset in the collection.
  • .choose(): returns a collection with datasets containing all or any of the specified data variables.

Seems it would be convenient/neat to use this Collection in the .to_dataset_dict() method i.e. return a Collection object instead of a regular dictionary of datasets. Usage of this object is likely going to be experimental until https://github.com/TomNicholas/datatree is stable and ready for public usage.

@andersy005 andersy005 added the enhancement Issues that are found to be a reasonable candidate feature additions label Oct 15, 2021
@andersy005 andersy005 added this to Xdev Oct 22, 2021
@andersy005 andersy005 changed the title Move Collection object implementation from NCAR/xcollection to intake-esm Use Collection object implementation from NCAR/xcollection in intake-esm Nov 24, 2021
@andersy005 andersy005 moved this to ▶ In Progress in Xdev Nov 24, 2021
Repository owner moved this from ▶ In Progress to ✅ Done in Xdev Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues that are found to be a reasonable candidate feature additions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant