Skip to content

Commit 4cccf88

Browse files
committed
download data file with pooch
1 parent 68a8dcf commit 4cccf88

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

docs/source/examples/QartodTestExample_Glider.ipynb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"import xarray as xr\n",
2424
"import numpy as np\n",
2525
"import pandas as pd\n",
26+
"import pooch\n",
2627
"from bokeh.plotting import output_notebook\n",
2728
"\n",
2829
"output_notebook()"
@@ -34,7 +35,7 @@
3435
"source": [
3536
"### Load the dataset\n",
3637
"\n",
37-
"Here we use a glider mission from the Baltic as a test dataset. This file is saved in the `example_data` directory\n",
38+
"Here we use a glider mission from the Baltic as a test dataset.\n",
3839
"\n",
3940
"https://observations.voiceoftheocean.org/SEA067/M37"
4041
]
@@ -45,7 +46,15 @@
4546
"metadata": {},
4647
"outputs": [],
4748
"source": [
48-
"ds = xr.open_dataset(\"example_data/nrt_SEA067_M37.nc\")"
49+
"url = f\"https://github.com/ioos/ioos_qc/releases/download\"\n",
50+
"version = \"2.1.0\"\n",
51+
"fname = \"nrt_SEA067_M37.nc\"\n",
52+
"\n",
53+
"download = pooch.retrieve(\n",
54+
" url=f\"{url}/{version}/{fname}\",\n",
55+
" known_hash=\"sha256:06e8a79cc17a2d55bb32dbfdc85f9922c1a1cc14726df004ae971125f91b27ac\",\n",
56+
")\n",
57+
"ds = xr.open_dataset(download)"
4958
]
5059
},
5160
{
Binary file not shown.

0 commit comments

Comments
 (0)