Geospatial Indexing with H3 & S2 — Two Apps + a New Component (streamlit-hexviz)

Hi community :waving_hand:

I’d like to share some work I’ve been doing around geospatial indexing — a technique that converts point coordinates into larger geometric shapes (like hexagons), effectively turning a two-dimensional spatial problem into a standard index lookup. This makes spatial queries dramatically faster and more scalable.

Two of the most prominent tools for this are:

  • H3 (by Uber) — hexagon-based indexing

  • S2 (by Google) — sphere-based cell indexing


App 1 — H3 Explorer :backhand_index_pointing_right: https://h3-example-app.streamlit.app/

My first experiment: an interactive app to visualize how H3 indexing works. You can explore how raw coordinates get mapped into hexagonal cells at different resolutions — a great way to build intuition for the concept.


App 2 — Hexviz Example App :backhand_index_pointing_right: https://app-hexviz-example-app.streamlit.app/

Built on top of my new component (see below), this app demonstrates converting latitude/longitude points into H3 hexagons and making routes and movement patterns visible on a map.


The Component — streamlit-hexviz

To make hexagon-based map visualization reusable, I packaged the core logic into a dedicated Streamlit component: streamlit-hexviz. It lets you turn lat/lon coordinates into H3 hexagons with minimal code.

:warning: Note: This is an early release — not all planned features are covered yet, but it’s functional and I’d love early feedback!


Happy to answer questions about geospatial indexing, H3, or the component itself. Feedback and ideas very welcome! :folded_hands: