Skip to content

Commit 2bf63e5

Browse files
author
Nathaniel Henry
committed
Switch the home-search tutorial to place_blocks now that the endpoint is fixed.
1 parent 409037f commit 2bf63e5

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

.claude/CLAUDE.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ OIDC trusted publishing) is the eventual target. Public repo:
4444
`_blocks_gdf` drops them (`geometry.notna()`) so plotting and spatial joins work. The
4545
block join renames the key to `geoid` before merging (the R SDK had a bug here; do
4646
not regress).
47-
- **`place_blocks()` (`/v1/places/{geoid}/blocks`) is BROKEN server-side:** it times
48-
out (15s Lambda) for every real place. Tutorials use `blocks_query(center, radius_m)`
49-
instead. Leave the wrapper, but do not build examples on it until the API is fixed.
47+
- **`place_blocks()` works since 2026-07-22** (server-side query fix in wtm.api). The
48+
home-search tutorial now uses it for whole-city pulls; `blocks_query` remains the
49+
tool for a radius or polygon. A rarely-queried big place can take a few seconds on
50+
the first call while the database cache warms; it is not broken again.
5051

5152
## Local live doc build (this EFS host)
5253

docs/tutorials/home_search.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ stops.plot(ax = ax, color = "#f36e21", marker = "^")
6363

6464
## Find the blocks that qualify
6565

66-
Pull the per-block walk times for the blocks around the city centre. The result is a
67-
GeoDataFrame with one row per (block, category); the boundaries come from `pygris`,
68-
downloaded once.
66+
Somerville is a census place, so one call by place GEOID pulls the per-block walk
67+
times for every block in the city. The result is a GeoDataFrame with one row per
68+
(block, category); the boundaries come from `pygris`, downloaded once. To search an
69+
arbitrary area instead, use `blocks_query` with a centre and radius or a polygon.
6970

7071
```{code-cell} python
71-
blocks = close.blocks_query(center = {"lon": city["lon"], "lat": city["lat"]},
72-
radius_m = 3000, mode = "walk",
72+
blocks = close.place_blocks(city["geoid"], mode = "walk",
7373
type = [grocery, restaurant, transit])
7474
```
7575

0 commit comments

Comments
 (0)