Custom index tutorial
This PR would add a notebook demonstrating how to build a custom index to the tutorial. It is loosely based on the how to create a custom index page (which was very helpful in writing this) but is aimed to be a bit more explanatory. it has the following structure:
- a bit of background and introduce the motivation for using custom indexes
- build a custom index for a simplified case of a 1d dataset where we'd like an index to handle a coordinate transform Steps to build index:
- build skeleton index with just
from_variables() - add
create_variables(),sel()and transform - add
equals(),join()andreindex_like()to support alignment
If folks think this would be a worthwhile addition to the tutorial, I'd love to keep working on this and to incorporate any feedback and suggestions
Check out this pull request onΒ ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
π PR Preview 131d71506670ac25b1db5916b209052d0f13c614 has been successfully built and deployed to https://xarray-contrib-xarray-tutorial-preview-pr-295.surge.sh
π Build time: 0.013s
π€ By surge-preview
If folks think this would be a worthwhile addition to the tutorial, I'd love to keep working on this and to incorporate any feedback and suggestions
Absolutely this would be a great addition @e-marshall!
Just noting that a lot of development on Xarray indexing has happened over the last year in particular this new webpage of examples is coming together https://github.com/xarray-contrib/xarray-indexes !
Eventually we should review content to make sure not too much is duplicated across Xarray docs, Xarray tutorial, and external resources like the one above, but that they also link to eachother.
I think that one should be merged in with some kind of gallery that should also include the ecosystem book in this repo. I created a new one so we could iterate quickly
