docs: add visualization preview at top of RasterFlow model notebooks#160
docs: add visualization preview at top of RasterFlow model notebooks#160pdarringer wants to merge 5 commits into
Conversation
…ooks Adds a "Preview: model inputs and outputs" markdown cell to each of the RasterFlow ML model notebooks (FTW, SAM3, Tile2Net, ChesapeakeRSC, CHM). The cell is inserted after the model description and before the AOI selection section, so readers get an immediate, interactive sense of what the model does and how well it performs before touching code. Each cell embeds a pre-built cloud.wherobots.com/map iframe with the input imagery, raster model outputs, and (where applicable) vector geometries and PMTiles, plus a fullscreen-fallback link. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Found 5 changed notebooks. Review the changes at https://app.gitnotebooks.com/wherobots/wherobots-examples/pull/160 |
JupyterLab and VS Code strip raw <iframe> tags from rendered markdown cells, so the embedded preview never showed up for users opening these notebooks. Collapse the preview block to a single "View the interactive map" link pointing at viz.wherobots.com, with a per-AOI title query param so the destination map has a meaningful title.
Ran `jupyter nbconvert --clear-output --inplace` on the 5 RasterFlow notebooks. No code-cell outputs were present, but nbconvert re-serialized the new preview markdown cell from a single source string into the canonical array-of-lines representation, matching the rest of the repo.
There was a problem hiding this comment.
Pull request overview
This PR improves the RasterFlow example notebooks by adding an early “Preview: model inputs and outputs” markdown section so readers can open a preconfigured viz.wherobots.com map to inspect the notebook’s example AOI inputs/outputs before running any code.
Changes:
- Added a standardized “Preview: model inputs and outputs” markdown cell near the top of each RasterFlow model notebook.
- Included a short layer list plus a deep link to
viz.wherobots.comthat loads the relevant imagery/model outputs/vectors/PMTiles for the example AOI.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
Analyzing_Data/RasterFlow_CHM.ipynb |
Adds preview cell + viz link for CHM example (needs wording adjustment re: vectors). |
Analyzing_Data/RasterFlow_Chesapeake.ipynb |
Adds preview cell + viz link for ChesapeakeRSC example layers. |
Analyzing_Data/RasterFlow_FTW.ipynb |
Adds preview cell + viz link covering planting/harvest mosaics + outputs. |
Analyzing_Data/RasterFlow_SAM3.ipynb |
Adds preview cell + viz link (needs wording/AOI consistency fixes). |
Analyzing_Data/RasterFlow_Tile2Net.ipynb |
Adds preview cell + viz link for Tile2Net inputs/outputs + vectors/PMTiles. |
Comments suppressed due to low confidence (1)
Analyzing_Data/RasterFlow_SAM3.ipynb:51
- The preview map link points to Marion County, OR (see URL title/lat-lng), but the AOI section immediately below still uses College Park, MD (wkls.us.md.collegepark). To avoid confusing readers, please make the preview link and the notebook’s actual example AOI consistent (either update the link or update the AOI/code).
"- *SAM3 PM Tiles*: same geometries delivered as PMTiles for fast rendering at scale\n",
"\n",
"View the interactive map [here](https://viz.wherobots.com/?z=9.61&lat=44.98530&lng=-122.47688&l0.id=3930c361-98e6-4b7a-a534-ef69709881a7&l0.src=s3%3A%2F%2Fwherobots-examples%2Frasterflow%2Fmosaics%2Fmarion_county_optimized.zarr&l0.name=SAM3+input+mosaic&l0.clim=35.23256150636151%2C187.34808753310205&l0.mode=rgb&l0.rgb=red%2Cgreen%2Cblue%2Cband&l0.ndvi=nir%2Cred%2Cband&l0.var=variables&l1.id=8888ae61-90a6-4e8c-b8f3-7bd51c1510e8&l1.src=s3%3A%2F%2Fwherobots-examples%2Frasterflow%2Fmodel-outputs%2Fmarion_county_sam3%2F&l1.name=SAM3+vector+geometries&l1.type=geoparquet&l1.fill=%233b82f6&l1.line=%232563eb&l1.lw=2&l1.cc=%233b82f6&l1.cr=5&l2.id=2882e773-6c93-4d67-8c2d-d0c75e807501&l2.src=s3%3A%2F%2Fwherobots-examples%2Frasterflow%2Fmodel-outputs%2Fmarion_county_sam3.pmtiles&l2.name=SAM3+PM+Tiles&l2.type=pmtiles&l2.fill=%23ef4444&l2.line=%23dc2626&l2.lw=2&l2.cc=%23ef4444&l2.cr=5&title=SAM3+Marion+County+OR)."
]
},
{
"cell_type": "markdown",
"id": "aoi-description",
"metadata": {},
"source": [
"## Selecting an Area of Interest (AOI)\n",
"\n",
"To start, we will choose an Area of Interest (AOI) for our analysis where 30cm resolution NAIP data is available: College Park, Maryland.\n",
"\n",
"The National Agriculture Imagery Program (NAIP) provides aerial imagery for the United States, capturing high-resolution images during the agricultural growing seasons. To try other AOIs, be sure to choose a region where 30cm resolution imagery is available. See [this map](https://esri.maps.arcgis.com/apps/mapviewer/index.html?webmap=6cc0dcb225de4cb8aaa23c6a9cb59db8) for more details."
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Reviewed by Salty Hambot 🤖🧂
One copy-paste boilerplate slip in the SAM3 notebook — it references a 'raster model output' that doesn't exist for this geometry-only model. The other four notebooks look clean.
1 finding(s) posted.
💬 To request a re-review, comment @salty-hambot review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Summary
Adds a "Preview: model inputs and outputs" markdown cell to the top of each RasterFlow ML model notebook (after the model description, before AOI selection) so readers can preview the inputs and outputs interactively before running any code.
Each cell contains a short description, a bulleted list of layers in the map, and a link to a pre-built
viz.wherobots.comURL that opens the AOI with all layers loaded.We use a plain link rather than an embedded
<iframe>because JupyterLab and VS Code strip raw HTML iframes from rendered markdown cells.Files changed
Analyzing_Data/RasterFlow_CHM.ipynb— Nashua NH: input mosaic + model output rasterAnalyzing_Data/RasterFlow_Chesapeake.ipynb— Montgomery County MD: mosaic + raster + vectors + PMTilesAnalyzing_Data/RasterFlow_FTW.ipynb— Haskell County KS: planting + harvest mosaics + raster + vectors + PMTilesAnalyzing_Data/RasterFlow_SAM3.ipynb— Marion County OR: mosaic + vectors + PMTiles (geometry inference model, no raster)Analyzing_Data/RasterFlow_Tile2Net.ipynb— College Park MD: mosaic + raster + vectors + PMTilesTest plan