From 6b768ec260fc65752c5396fbfe3a9b25e49ae2b1 Mon Sep 17 00:00:00 2001 From: RichardScottOZ <72196131+RichardScottOZ@users.noreply.github.com> Date: Sat, 9 Mar 2024 13:38:16 +1030 Subject: [PATCH] DOC: format conversion, driver and datatype examples for convert_to_raster notebook (#753) --- docs/examples/convert_to_raster.ipynb | 209 ++++++++++++++------------ 1 file changed, 110 insertions(+), 99 deletions(-) diff --git a/docs/examples/convert_to_raster.ipynb b/docs/examples/convert_to_raster.ipynb index 59f94363..b3c5aced 100644 --- a/docs/examples/convert_to_raster.ipynb +++ b/docs/examples/convert_to_raster.ipynb @@ -73,6 +73,7 @@ "}\n", "\n", "html[theme=dark],\n", + "body[data-theme=dark],\n", "body.vscode-dark {\n", " --xr-font-color0: rgba(255, 255, 255, 1);\n", " --xr-font-color2: rgba(255, 255, 255, 0.54);\n", @@ -302,6 +303,11 @@ " grid-column: 4;\n", "}\n", "\n", + ".xr-index-preview {\n", + " grid-column: 2 / 5;\n", + " color: var(--xr-font-color2);\n", + "}\n", + "\n", ".xr-var-name,\n", ".xr-var-dims,\n", ".xr-var-dtype,\n", @@ -323,14 +329,16 @@ "}\n", "\n", ".xr-var-attrs,\n", - ".xr-var-data {\n", + ".xr-var-data,\n", + ".xr-index-data {\n", " display: none;\n", " background-color: var(--xr-background-color) !important;\n", " padding-bottom: 5px !important;\n", "}\n", "\n", ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", - ".xr-var-data-in:checked ~ .xr-var-data {\n", + ".xr-var-data-in:checked ~ .xr-var-data,\n", + ".xr-index-data-in:checked ~ .xr-index-data {\n", " display: block;\n", "}\n", "\n", @@ -340,13 +348,16 @@ "\n", ".xr-var-name span,\n", ".xr-var-data,\n", + ".xr-index-name div,\n", + ".xr-index-data,\n", ".xr-attrs {\n", " padding-left: 25px !important;\n", "}\n", "\n", ".xr-attrs,\n", ".xr-var-attrs,\n", - ".xr-var-data {\n", + ".xr-var-data,\n", + ".xr-index-data {\n", " grid-column: 1 / -1;\n", "}\n", "\n", @@ -384,7 +395,8 @@ "}\n", "\n", ".xr-icon-database,\n", - ".xr-icon-file-text2 {\n", + ".xr-icon-file-text2,\n", + ".xr-no-icon {\n", " display: inline-block;\n", " vertical-align: middle;\n", " width: 1em;\n", @@ -394,110 +406,38 @@ " fill: currentColor;\n", "}\n", "
<xarray.Dataset>\n", - "Dimensions: (y: 10, x: 10, time: 2)\n", + "Dimensions: (time: 2, x: 10, y: 10)\n", "Coordinates:\n", - " * y (y) float64 8.085e+06 8.085e+06 ... 8.085e+06 8.085e+06\n", - " * x (x) float64 4.663e+05 4.663e+05 ... 4.663e+05 4.663e+05\n", " * time (time) object 2016-12-19 10:27:29.687763 2016-12-29 12:52:42...\n", - " spatial_ref int64 0\n", + " * x (x) float64 4.663e+05 4.663e+05 ... 4.663e+05 4.663e+05\n", + " * y (y) float64 8.085e+06 8.085e+06 ... 8.085e+06 8.085e+06\n", + " spatial_ref int32 0\n", "Data variables:\n", - " blue (time, y, x) float64 6.611 5.581 0.3996 ... 3.491 5.056 3.368\n", - " green (time, y, x) float64 7.921 66.15 30.1 ... 21.76 27.29 18.41\n", + " blue (time, y, x) float64 ...\n", + " green (time, y, x) float64 ...\n", "Attributes:\n", - " coordinates: spatial_ref
[200 values with dtype=float64]
[200 values with dtype=float64]
PandasIndex(CFTimeIndex([2016-12-19 10:27:29.687763, 2016-12-29 12:52:42.347451],\n", + " dtype='object',\n", + " length=2,\n", + " calendar='proleptic_gregorian',\n", + " freq=None))
PandasIndex(Float64Index([466267.5, 466270.5, 466273.5, 466276.5, 466279.5, 466282.5,\n", + " 466285.5, 466288.5, 466291.5, 466294.5],\n", + " dtype='float64', name='x'))
PandasIndex(Float64Index([8084698.5, 8084695.5, 8084692.5, 8084689.5, 8084686.5, 8084683.5,\n", + " 8084680.5, 8084677.5, 8084674.5, 8084671.5],\n", + " dtype='float64', name='y'))