Skip to content

Commit fbb3d19

Browse files
chekosclaude
andcommitted
fix(docs): Address PR review feedback
- Add missing print() in migration-flows.md (no output was rendered) - Revert get_estimates/get_flows exec blocks in spatial.md to static output - Fix Washington state population value in spatial.md (7614893 -> 7705281) - Remove unused income API call in margins-of-error.md - Add cache_table=True to ZCTA query in geography.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 223d88d commit fbb3d19

4 files changed

Lines changed: 23 additions & 13 deletions

File tree

docs/guides/geography.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ optionally which county) you want tracts for.
126126
print(f"{len(metros)} metro/micro areas")
127127

128128
# All ZCTAs nationwide
129-
zctas = get_acs("zcta", variables="B01003_001", year=2022)
129+
zctas = get_acs("zcta", variables="B01003_001", year=2022, cache_table=True)
130130
print(f"{len(zctas)} ZCTAs")
131131
```
132132

docs/guides/margins-of-error.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,6 @@ significance(
118118
```python exec="on" source="tabbed-left" session="moe"
119119
from pypums import significance
120120

121-
income = get_acs(
122-
"place",
123-
variables="B19013_001",
124-
state="CA",
125-
year=2022,
126-
output="wide",
127-
)
128-
129121
# Suppose:
130122
# City A: estimate = $85,000, MOE = $4,000
131123
# City B: estimate = $78,000, MOE = $5,000

docs/guides/migration-flows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ ca_flows = get_flows(
6464
year=2019,
6565
)
6666

67-
ca_flows.head()
67+
print(ca_flows.head())
6868
```
6969

7070
In tidy output (the default), the DataFrame has `variable`, `estimate`, and `moe`

docs/guides/spatial.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ shapefiles are cached locally so subsequent calls are fast.
6161

6262
=== "get_estimates()"
6363

64-
```python exec="on" source="tabbed-left" session="spatial"
64+
```python
6565
import pypums
6666

6767
gdf = pypums.get_estimates(
@@ -73,9 +73,18 @@ shapefiles are cached locally so subsequent calls are fast.
7373
print(gdf.head())
7474
```
7575

76+
```
77+
GEONAME POP_2023 ... geometry
78+
0 Alabama 5074296 ... POLYGON ((...))
79+
1 Alaska 733583 ... MULTIPOLYGON ((...))
80+
2 Arizona 7359197 ... POLYGON ((...))
81+
3 Arkansas 3045637 ... POLYGON ((...))
82+
4 California 39029342 ... MULTIPOLYGON ((...))
83+
```
84+
7685
=== "get_flows()"
7786

78-
```python exec="on" source="tabbed-left" session="spatial"
87+
```python
7988
import pypums
8089

8190
gdf = pypums.get_flows(
@@ -87,6 +96,15 @@ shapefiles are cached locally so subsequent calls are fast.
8796
print(gdf.head())
8897
```
8998

99+
```
100+
GEOID NAME ... geometry
101+
0 36001 Albany County ... POLYGON ((...))
102+
1 36003 Allegany County ... POLYGON ((...))
103+
2 36005 Bronx County ... POLYGON ((...))
104+
3 36007 Broome County ... POLYGON ((...))
105+
4 36009 Cattaraugus County ... POLYGON ((...))
106+
```
107+
90108
!!! example "Interactive preview — 2020 Census population by state"
91109

92110
Every `geometry=True` call returns a GeoDataFrame you can map directly.
@@ -156,7 +174,7 @@ shapefiles are cached locally so subsequent calls are fast.
156174
{"id": 49, "value": 3271616, "name": "Utah"},
157175
{"id": 50, "value": 643077, "name": "Vermont"},
158176
{"id": 51, "value": 8631393, "name": "Virginia"},
159-
{"id": 53, "value": 7614893, "name": "Washington"},
177+
{"id": 53, "value": 7705281, "name": "Washington"},
160178
{"id": 54, "value": 1793716, "name": "West Virginia"},
161179
{"id": 55, "value": 5893718, "name": "Wisconsin"},
162180
{"id": 56, "value": 576851, "name": "Wyoming"}

0 commit comments

Comments
 (0)