Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for new container images #290

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 28 additions & 12 deletions datasets/3dep/3dep-seamless-example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand All @@ -73,7 +73,7 @@
" 84.00166666666]]}"
]
},
"execution_count": 6,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -95,7 +95,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand All @@ -112,7 +112,7 @@
"buffer = 0.1\n",
"bbox = [longitude - buffer, latitude - buffer, longitude + buffer, latitude + buffer]\n",
"search = catalog.search(collections=\"3dep-seamless\", bbox=bbox)\n",
"items = list(search.get_items())\n",
"items = list(search.item_collection())\n",
"print(f\"{len(items)} items found\")"
]
},
Expand All @@ -128,7 +128,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -146,11 +146,14 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"import stackstac\n",
"import warnings\n",
"\n",
"warnings.filterwarnings(\"ignore\", message=\"The argument\")\n",
"\n",
"low_res_data = stackstac.stack(items_low_res, bounds=bbox).squeeze().compute()\n",
"high_res_data = stackstac.stack(items_high_res, bounds=bbox).squeeze().compute()"
Expand All @@ -164,10 +167,10 @@
{
"data": {
"text/html": [
"<img src=\"https://ai4edatasetspublicassets.blob.core.windows.net/assets/notebook-output/datasets-3dep-3dep-seamless-example.ipynb/14.png\"/>"
"<img src=\"https://ai4edatasetspublicassets.blob.core.windows.net/assets/notebook-output/.-datasets-3dep-3dep-seamless-example.ipynb/14.png\"/>"
],
"text/plain": [
"<Figure size 1728x864 with 2 Axes>"
"<Figure size 2400x1200 with 2 Axes>"
]
},
"metadata": {},
Expand All @@ -177,8 +180,6 @@
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"plt.style.use(\"seaborn-talk\")\n",
"\n",
"fig, axes = plt.subplots(ncols=2, figsize=(24, 12), sharex=True, sharey=True)\n",
"low_res_data.plot.imshow(ax=axes[0], add_colorbar=False)\n",
"high_res_data.plot.imshow(ax=axes[1], add_colorbar=False)\n",
Expand Down Expand Up @@ -207,11 +208,26 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.10"
"version": "3.11.8"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"state": {
"550e9c6c01c647a9afe71d92d7471681": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"821e2fa4ecba410ab745f3f401f362c4": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "VBoxModel",
"state": {
"layout": "IPY_MODEL_550e9c6c01c647a9afe71d92d7471681"
}
}
},
"version_major": 2,
"version_minor": 0
}
Expand Down
Loading
Loading