mirror of
https://github.com/GRIND-Lab-Core/night_owl_research_agent.git
synced 2026-11-05 00:17:32 +00:00
[PR #5] feat(data-download): add OSM/Census/ESRI handbooks + fix runnability bugs #6
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
GRIND-Lab-Core/night_owl_research_agent#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/GRIND-Lab-Core/night_owl_research_agent/pull/5
Author: @gladcolor
Created: 4/28/2026
Status: 🔄 Open
Base:
main← Head:fix/data-download-overpass-esri📝 Commits (1)
e71eb7afeat(data-download): add OSM Overpass + Census + ESRI handbooks; fix runnability bugs📊 Changes
1 file changed (+258 additions, -35 deletions)
View changed files
📝
skills/data-download/SKILL.md(+258 -35)📄 Description
Scope
This PR is intentionally narrow:
skills/data-download/SKILL.mdonly (1 file, +258/−35 vsmain).What's added
skills/data-download/SKILL.mdgains source-specific download handbooks for the most common geospatial data sources:admin_level. Includes a critical-rule callout for themap_to_areapattern.What's fixed
Runnability bugs that surfaced during end-to-end testing against live services:
requests.gettorequests.postwith a descriptiveUser-Agentheader. The defaultpython-requests/x.y.zUA is rejected by the public Overpass API with HTTP 406.area(osm_id)->.relsilently returns 0 elements: rawosm_idis not an area_id (for relations the area_id isosm_id + 3_600_000_000); the recommendedrelation({osm_id}); map_to_area->.searchArea;pattern is what produces results.relation(area.us)['admin_level'='4']returns ~75 elements (50 states + DC + territories + bordering CA/MX admin units sharing nodes inside the US area), not exactly 50.NameError. The previous code referencedwest_merc/south_merc/east_merc/north_mercinrasterio.transform.from_boundswithout ever computing them. Now usespyproj.Transformerto reproject the lon/lat bbox to EPSG:3857.gdf.unary_unionwithgdf.geometry.union_all()for Shapely 2.x / GeoPandas 1.x."Tokyo, Japan"(prefecture spans Ogasawara Islands ~1,000 km offshore → ~50,000 tiles at z=12) to"Shibuya, Tokyo, Japan"at z=14 (~9 tiles).User-Agentheader,raise_for_status(),.convert("RGB"), and anassert n_tiles < 500guard for courtesy and to prevent abuse of the public ArcGIS service.Verified end-to-end against live services
relation + map_to_area→ 7 hospitalsarea(osm_id)pattern → silently 0 elements (confirms the documented warning)cb_2021_06_county_500k.zip→ HTTP 404;cb_2021_us_county_500k.zip→ HTTP 200🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.