Skip to content

Commit 3922dc9

Browse files
dcherianandersy005scottyhqpre-commit-ci[bot]
authored
xarray-tutorial improvements (#591)
* Begin tutorial blog post * Update * more udpates * resize images * first pass * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * FInalize * title --------- Co-authored-by: Anderson Banihirwe <[email protected]> Co-authored-by: Scott Henderson <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent eae218d commit 3922dc9

File tree

3 files changed

+82
-0
lines changed

3 files changed

+82
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
yarn.lock
2+
package-lock.json
3+
public/
4+
15
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
26

37
# dependencies
475 KB
Loading

src/posts/xarray-tutorial/index.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: 'The revamped Xarray tutorial'
3+
date: '2024-05-31'
4+
authors:
5+
- name: Deepak Cherian
6+
github: dcherian
7+
- name: Scott Henderson
8+
github: scottyhq
9+
- name: Jessica Scheick
10+
github: JessicaS11
11+
- name: Emma Marshall
12+
github: e-marshall
13+
- name: Tom Nicholas
14+
github: TomNicholas
15+
- name: Anderson Banihirwe
16+
github: andersy005
17+
- name: Negin Sobhani
18+
github: negin513
19+
- name: Don Setiawan
20+
github: lsetiawan
21+
22+
summary: 'The Xarray tutorial has received a major upgrade!'
23+
---
24+
25+
## TL;DR
26+
27+
Over the past several years, we have worked to significantly revamp the [Xarray tutorial](https://tutorial.xarray.org). The tutorial material is geared towards both new and seasoned practitioners. Consider using it for your own lecture or workshop! Or sign up for the upcoming [SciPy 2024 Workshop](https://cfp.scipy.org/2024/talk/HHVZ9T/) that we'll be running.
28+
29+
## Approach
30+
31+
The [Xarray Tutorial](https://tutorial.xarray.dev) website hosts a curated selection of Jupyter Notebooks that illustrate concepts, common usage patterns, and long-form examples of using Xarray for data analytics.
32+
33+
We reworked existing material to bite-sized chunks that can be remixed as needed. Rather than organizing material by specific workshops at a top-level, we now organize by topic and then build a learning path for each event. This way future learners can benefit from a guided tour through the material. For example see the [Fundamental](https://tutorial.xarray.dev/overview/fundamental-path/README.html) and [Intermediate](https://tutorial.xarray.dev/overview/intermediate-path/README.html) learning paths that were presented at SciPy 2022 and SciPy 2023 respectively.
34+
35+
We believe this method of organizing material also lends it self to easy reuse for other tutorial/workshop activities that may not want to work through material in the manner the canonical ordering does. Our hope is that this material will serve as a great starting point for anyone anywhere looking to deliver a Xarray tutorial.
36+
37+
## Redesigned with Jupyter Book
38+
39+
We chose to use [Jupyter Book](https://jupyterbook.org/en/stable/intro.html) as a the tool to render a static HTML version of the tutorial website. We think this has worked well, because it allows you to keep small Jupyter Notebooks in a repository while guaranteeing that code in those notebooks can be executed without errors. It also provides nice linking capabilities directly to the Xarray API documentation. Finally, Jupyter Book simply produces a nice-looking, navigable, and searchable website of all the material. See the before/after image:
40+
41+
<img
42+
src='/posts/tutorial/tutorial-before-after.png'
43+
alt='Tutorial outline before/after'
44+
width='60%'
45+
/>
46+
47+
We've been particularly happy with the [`jupyterlab-myst` extension](https://github.com/executablebooks/jupyterlab-myst), which extends the basic Markdown rendering with in JupyterLab and ensures Notebooks rendered as a static webpage look identical to an executable notebook in the JupyterLab interface.
48+
49+
Finally, we think the Xarray Tutorial is a great way to engage new contributors to Open Source Software development. Every Jupyter Book webpage has a GitHub icon dropdown in the upper right hand corner with a 'Open Issue' and 'Suggest Edit' button. This really simplifies the process of community development and we love that during workshops people totally new to the library have made improvements to the content as we run through it. The repository now has over 30 contributors!
50+
51+
## New and improved material
52+
53+
In addition to redesigning the layout, we've improved existing material and added a lot of new material focused on intermediate and advanced concepts:
54+
55+
1. Revamped fundamentals to include material on [indexing](https://tutorial.xarray.dev/fundamentals/02.1_indexing_Basic.html), as well as [alignment & broadcasting](https://tutorial.xarray.dev/fundamentals/02.3_aligning_data_objects.html).
56+
1. All New Intermediate level material:
57+
58+
- extending Xarray through [accessors](https://tutorial.xarray.dev/advanced/accessors/01_accessor_examples.html);
59+
- a thorough [treatment](https://tutorial.xarray.dev/advanced/apply_ufunc/apply_ufunc.html) of `apply_ufunc` starting from basics;
60+
- a conceptual introduction to Xarray's [Computational Patterns](https://tutorial.xarray.dev/intermediate/01-high-level-computation-patterns.html) including `rolling`, `coarsen` and `GroupBy`; and
61+
- [Advanced, Vectorized, and Boolean indexing](https://tutorial.xarray.dev/intermediate/indexing/indexing.html).
62+
63+
## Try it out
64+
65+
The Xarray Tutorial is designed for interactivity, with coding exercises and configuration of one-click free hosted computing environments. At past SciPy workshops we've successfully used [MyBinder.org](https://tutorial.xarray.dev/overview/get-started.html) and [GitHub Codespaces](https://tutorial.xarray.dev/workshops/scipy2023/README.html#github-codespaces) to ensure 100+ attendees can run code examples in JupyterLab.
66+
67+
## Come contribute
68+
69+
While a major improvement, this material is clearly a work in progress and could use help from you!
70+
[Contributions](https://tutorial.xarray.dev/CONTRIBUTING.html) are very welcome and could range from fixing typos, to improving the presentation, and even contributing all new material. We are especially interested in expanding the current use-case content to include more examples with datasets from a broad range of scientific domains. Check out [open issues](https://github.com/xarray-contrib/xarray-tutorial/issues) on the repository for ways to contribute!
71+
We can also substantially improve the way this tutorial material is linked to in the main Xarray documentation ([Github issue](https://github.com/pydata/xarray/issues/8008)).
72+
73+
Come help out!
74+
75+
## Acknowledgments
76+
77+
This work was partially supported by NASA's Open Source Tools, Frameworks, and Libraries (OSTFL)
78+
grant 80NSSC22K0345 "Enhancing analysis of NASA data with the open-source Python Xarray Library".

0 commit comments

Comments
 (0)