H3 Data Retrieval Service
Using an AI agent?
Copy this file and pass it to your AI agent to partition, index and query your data. Or paste this prompt to get a canvas:
Make sure the Fused CLI is installed. Read https://docs.fused.io/skills/H3.md and https://github.com/fusedio/skills. Then create a Workbench canvas named NYC311_H3 that partitions NYC 311 requests for 2024-07-04 into H3 on fd://, indexes them and maps requests per res-9 hex. Push it and give me its URL.
Have a large dataset? Get any area or time window of it back within seconds. Index it once, with partitioning as an optional first step, then query it from Python or over HTTP. New to H3? Start with Working with H3.
Workflow
| Step | What it does | Reference |
|---|---|---|
| Partition (optional) | Writes your rows as H3 Parquet files. Skip it if your Parquet files already have an H3 cell column. Takes a source, such as a UDF that returns your rows. | fused.h3.partition() |
| Index | Records which cells, partition values and times each file covers | fused.h3.index() |
| Query in Python | Reads back only the rows you ask for, by area, point, cell, time window or partition value | fused.h3.query() |
| Query over HTTP | The same query as an endpoint that returns Parquet, for any language or web page | GET /h3/query |
Examples
| Page | What it shows |
|---|---|
| End-to-end example | NYC 311 partitioned, indexed and queried, with the code and output of each step |
| Large dataset examples | 39.6 million NYC 311 requests, 1.12 billion AIS positions and 367.8 million LiDAR points, queried live |
Reference
GET /h3/query: the query endpoint, every parameter- H3 API: interactive API documentation
fused.h3: the Python API- End-to-end example
- Large dataset examples