Skip to content

feat: Add an example for Geohash Layer - #1242

Merged
kylebarron merged 3 commits into
developmentseed:mainfrom
aryanxk02:geo
Sep 17, 2026
Merged

kylebarron merged 3 commits into
developmentseed:mainfrom
aryanxk02:geo

Conversation

@aryanxk02

Copy link
Copy Markdown
Contributor

This PR adds an example demonstrating the Geohash Layer. Reference: #1232

@kylebarron kylebarron changed the title Add an example for Geohash Layer feat: Add an example for Geohash Layer Aug 7, 2026
@ds-release-bot ds-release-bot Bot added the feat label Aug 7, 2026
{
"cells": [
{
"cell_type": "markdown",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Similar to other examples like https://github.com/developmentseed/lonboard/blob/main/examples/data-filter-extension.ipynb, could you create the example notebook with juv, so that dependencies are automatically managed with uv?

Assuming you have uv installed already, you can use something like uvx juv init [name] to create the notebook, uvx juv add [name] [dependency] to add dependencies, and uvx juv run [name] to run the notebook.

Then you can copy in the markdown instructional cell:

Image

@@ -0,0 +1,289 @@
{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

CI is failing on some formatting and linting on this notebook

Comment thread examples/geohash-layer.ipynb Outdated
"# /// script\n",
"# requires-python = \">=3.12\"\n",
"# dependencies = [\n",
"# \"geohash2\",\n",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment on lines +189 to +192
"requests_df[\"geohash\"] = [\n",
" geohash2.encode(latitude, longitude, precision=6)\n",
" for latitude, longitude in zip(requests_df[\"latitude\"], requests_df[\"longitude\"], strict=True)\n",
"]\n",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It would be nice if the geohash library provided a vectorized API, so that we could nudge people towards a faster approach. But this is fine.

@kylebarron kylebarron left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall looking good, thank you

@aryanxk02

Copy link
Copy Markdown
Contributor Author

Overall looking good, thank you

Thank you for the review. Let me know if any changes are needed.

@kylebarron
kylebarron merged commit 25cca11 into developmentseed:main Sep 17, 2026
5 checks passed
@kylebarron

Copy link
Copy Markdown
Member

Thanks

kylebarron added a commit that referenced this pull request Sep 30, 2026
> [!NOTE]
> This PR was written by Claude (Claude Code), not by @kylebarron.

Fixes the failing `Python test` workflow on `main`.

The `normalize-notebook-kernelspec` pre-commit hook added in #1254
requires every notebook's kernelspec to be exactly `{"display_name":
"Python 3 (ipykernel)", "language": "python", "name": "python3"}`.
`examples/geohash-layer.ipynb` (added in #1242) has `"display_name":
"Python 3"`, so the hook rewrites it and fails the `tests (3.11)` job,
which is the job that runs pre-commit.

#1254's PR CI passed because its base branch was older than #1242, so
the geohash notebook wasn't there to check. The two changes only met
after both merged.

This PR is the output of running the hook itself: a one-line change to
`display_name`. It's the only notebook in the repo that didn't already
match.

`uv run pre-commit run --all-files` passes locally with this change.

The earlier failure on the #1292 push was a separate, transient network
error (`uv sync` couldn't download the `pyogrio` wheel from PyPI) and
needs no change.

🤖 Written by [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants