Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Dec 29, 2024
1 parent ddef520 commit 66472e0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ project:
- "*.qmd"
- "*.ipynb"
- "!drafts/"
resources: static
execute:
freeze: auto

website:
repo-url: https://github.com/boettiger-lab/nasa-topst-env-justice
repo-actions: [edit, issue]
page-navigation: true
resources: static
navbar:
background: black
search: true
Expand Down
32 changes: 21 additions & 11 deletions tutorials/python/1-intro-python.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -763,21 +763,31 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 16,
"id": "0e84fb3a-fe46-4f2b-b016-be3e94852072",
"metadata": {},
"outputs": [
{
"ename": "FileNotFoundError",
"evalue": "[Errno 2] No such file or directory: '../../static/ndvi-redlines.html'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[15], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# use an iframe so the map can display on webpages\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mIPython\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdisplay\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m IFrame\n\u001b[0;32m----> 3\u001b[0m \u001b[43mm\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mto_html\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m../../static/ndvi-redlines.html\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43moverwrite\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m 4\u001b[0m IFrame(src\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mhttps://boettiger-lab.github.io/nasa-topst-env-justice/ndvi-redlines.html\u001b[39m\u001b[38;5;124m'\u001b[39m, width\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m700\u001b[39m, height\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m400\u001b[39m)\n",
"File \u001b[0;32m/opt/conda/lib/python3.12/site-packages/leafmap/maplibregl.py:1457\u001b[0m, in \u001b[0;36mMap.to_html\u001b[0;34m(self, output, title, width, height, replace_key, remove_port, preview, overwrite, **kwargs)\u001b[0m\n\u001b[1;32m 1454\u001b[0m num \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mlen\u001b[39m(glob\u001b[38;5;241m.\u001b[39mglob(output\u001b[38;5;241m.\u001b[39mreplace(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m.html\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m*.html\u001b[39m\u001b[38;5;124m\"\u001b[39m)))\n\u001b[1;32m 1455\u001b[0m output \u001b[38;5;241m=\u001b[39m output\u001b[38;5;241m.\u001b[39mreplace(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m.html\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m_\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mnum\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m.html\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m-> 1457\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43moutput\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mw\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mas\u001b[39;00m f:\n\u001b[1;32m 1458\u001b[0m f\u001b[38;5;241m.\u001b[39mwrite(html)\n\u001b[1;32m 1459\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m preview:\n",
"\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '../../static/ndvi-redlines.html'"
]
"data": {
"text/html": [
"\n",
" <iframe\n",
" width=\"700\"\n",
" height=\"400\"\n",
" src=\"https://boettiger-lab.github.io/nasa-topst-env-justice/ndvi-redlines.html\"\n",
" frameborder=\"0\"\n",
" allowfullscreen\n",
" \n",
" ></iframe>\n",
" "
],
"text/plain": [
"<IPython.lib.display.IFrame at 0x7c6ad9e16db0>"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
Expand Down

0 comments on commit 66472e0

Please sign in to comment.