diff --git a/intermediate/datastructures-intermediate.ipynb b/intermediate/datastructures-intermediate.ipynb index bf58ee3b..1431b531 100644 --- a/intermediate/datastructures-intermediate.ipynb +++ b/intermediate/datastructures-intermediate.ipynb @@ -115,7 +115,7 @@ "metadata": {}, "outputs": [], "source": [ - "# pull out \"air\" dataarray with dictionary syntax\n", + "# pull out \"air\" DataArray with dict-like syntax\n", "ds[\"air\"]" ] }, @@ -123,7 +123,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "You can save some typing by using the \"attribute\" or \"dot\" notation. This won't\n", + "You can save some typing by using the \"dict-like\" or \"attribute-like\" syntax. This won't\n", "work for variable names that clash with a built-in method name (like `mean` for\n", "example).\n" ] @@ -134,7 +134,7 @@ "metadata": {}, "outputs": [], "source": [ - "# pull out dataarray using dot notation\n", + "# pull out DataArray using attribute-like syntax notation\n", "ds.air" ] }, @@ -341,20 +341,6 @@ "" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Exercise\n", - "\n", - "In this exercise the air dataset has been deconstructed into a dictionary of NumPy arrays. Please\n", - "\n", - "- Build a Dataset from scratch from this dictionary of NumPy arrays.\n", - "\n", - "\n", - "Hint: You will want to start by building DataArrays, then combining them into a Dataset.\n" - ] - }, { "cell_type": "code", "execution_count": null, @@ -372,10 +358,42 @@ " }\n", "\n", "\n", - "data = air_as_dictionary()\n", + "data = air_as_dictionary()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exercise" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "::::{admonition} Exercise\n", + ":class: tip\n", + "\n", + "In this exercise the air dataset has been deconstructed into a dictionary of NumPy arrays. Please\n", + "\n", + "- Build a Dataset from scratch from this dictionary of NumPy arrays.\n", + "\n", + ":::{admonition} Hint\n", + ":class: dropdown\n", + "\n", + "Hint: You will want to start by building DataArrays. You can start with something like `xr.DataArray(data=data['air-temp']...`\n", "\n", + ":::\n", "\n", - "# Your code here" + ":::{admonition} Solution\n", + ":class: dropdown\n", + "\n", + "```python\n", + "xr.DataArray(data=data['air-temp'], coords={'time':data['time'], 'lat':data['lat'], 'lon':data['lon']}).to_dataset(name='air_temp')\n", + "```\n", + ":::\n", + "::::" ] }, { @@ -596,7 +614,7 @@ "\n", "Dataset of non-alignable data.\n", "\n", - "For this exercise we will be using the `\"precipitation\"` example data. This data has two parts observed rainfall (`observed`), and predicted rainfall, on a different lat-lon grid. The next cell calls a function that will give you two different Datasets. Try to combine them using the tools we've discussed thus far and observe what goes wrong.\n" + "For this exercise we will be using the `\"precipitation\"` example data. This data has two groups, observed precipitation (`observed`), and model precipitation, on a different lat-lon grid. The next cell calls a function that will give you two different Datasets. Try to combine them using the tools we've discussed thus far and observe what goes wrong.\n" ] }, { @@ -610,43 +628,12 @@ "observed = xr.Dataset(tree[\"reanalysis\"])" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "markdown", "metadata": {}, "source": [ "For more see the [user guide](https://docs.xarray.dev/en/stable/plotting.html), the [gallery](https://docs.xarray.dev/en/stable/examples/visualization_gallery.html), and [the tutorial material](https://tutorial.xarray.dev/fundamentals/04.0_plotting.html)." ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/workshops/scipy2026/index.ipynb b/workshops/scipy2026/index.ipynb index 9ad3538c..ffc5b08f 100644 --- a/workshops/scipy2026/index.ipynb +++ b/workshops/scipy2026/index.ipynb @@ -9,8 +9,6 @@ "\n", "## Welcome to the Xarray SciPy 2026 Tutorial! \n", "\n", - "> 🚧👷‍♀️🏗️ This page is under construction. Please check back later.\n", - "\n", "\n", "\n", "**Everything is an Xarray Dataset**\n",