Skip to content

docs: add visualization preview at top of RasterFlow model notebooks#160

Open
pdarringer wants to merge 5 commits into
mainfrom
phil-notebooks-add-viz
Open

docs: add visualization preview at top of RasterFlow model notebooks#160
pdarringer wants to merge 5 commits into
mainfrom
phil-notebooks-add-viz

Conversation

@pdarringer
Copy link
Copy Markdown
Contributor

@pdarringer pdarringer commented May 7, 2026

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.com URL 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 raster
  • Analyzing_Data/RasterFlow_Chesapeake.ipynb — Montgomery County MD: mosaic + raster + vectors + PMTiles
  • Analyzing_Data/RasterFlow_FTW.ipynb — Haskell County KS: planting + harvest mosaics + raster + vectors + PMTiles
  • Analyzing_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 + PMTiles

Test plan

  • Open each notebook in JupyterLab / VS Code and confirm the Preview cell renders cleanly
  • Click the link in each notebook and verify the map loads with all layers visible

…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>
@gitnotebooks
Copy link
Copy Markdown

gitnotebooks Bot commented May 7, 2026

Found 5 changed notebooks. Review the changes at https://app.gitnotebooks.com/wherobots/wherobots-examples/pull/160

@notion-workspace
Copy link
Copy Markdown

@notion-workspace
Copy link
Copy Markdown

Updated sample notebooks

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.
@pdarringer pdarringer changed the title docs: embed input/output map preview at top of RasterFlow model notebooks docs: add visualization preview at top of RasterFlow model notebooks May 19, 2026
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.
@pdarringer pdarringer requested a review from Copilot May 19, 2026 20:12
@pdarringer pdarringer marked this pull request as ready for review May 19, 2026 20:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.com that 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.

Comment thread Analyzing_Data/RasterFlow_CHM.ipynb Outdated
Comment thread Analyzing_Data/RasterFlow_SAM3.ipynb Outdated
Copy link
Copy Markdown

@salty-hambot salty-hambot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread Analyzing_Data/RasterFlow_SAM3.ipynb
pdarringer and others added 2 commits May 19, 2026 13:17
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>
@pdarringer pdarringer assigned kadolor and rbavery and unassigned kadolor and rbavery May 19, 2026
@pdarringer pdarringer requested review from kadolor and rbavery May 19, 2026 20:19
Copy link
Copy Markdown
Member

@rbavery rbavery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants