pgx
PGX — Lightweight Postgres for AI agents. Written in Rust. Thousands of isolated databases in one runtime. 🐘
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证正在加载完整 README。 以下为已保存的摘录。
Goal: a world map showing which state or armed group controls each area.
Current stage: base map lab – a web app to compare rendering libraries and base datasets before
building the control layer. See docs/basemap-options.md for the comparison.
The URL hash stores library, base map, overlays and view, so a configuration can be shared as a link.查看完整 README ↗Goal: a world map showing which state or armed group controls each area.
Current stage: base map lab – a web app to compare rendering libraries and base datasets before building the control layer. See docs/basemap-options.md for the comparison.
npm install
npm run dev # http://localhost:5173
npm run build # static site in dist/
The URL hash stores library, base map, overlays and view, so a configuration can be shared as a link.
Google Analytics (GA4) is included only in production builds. The measurement ID is set in .env.production (VITE_GA_MEASUREMENT_ID); remove or change it there, or override it for one build with VITE_GA_MEASUREMENT_ID= npm run build. Besides page views it sends select_library and select_basemap events.
src/adapters/)Datasets are defined once in src/catalog.js; each adapter translates them to its library.
public/data/*.geojson are slimmed Natural Earth layers (public domain), regenerated with npm run data.
Third-party tile services have their own terms; see attribution in the map and notes in the docs.
The control layer marks, for each place, the group or institution that holds the monopoly of violence (or close to it) most of the time.
exclusive, dominant, contested, unclear), a confidence
(high, medium, low), the basis (specific report, area report, default state presence, inference),
other armed actors present, sources, and the date it describes.Data lives in data/drc/; scripts in scripts/drc/ (Python 3, pip install shapely rasterio numpy).
| Step | Script | Output |
|---|---|---|
| Download raw data (gitignored) | scripts/drc/fetch_raw.sh | data/drc/raw/ |
| Settlements ≥ 1000 people, cities ≥ 100k split by health area | scripts/drc/build_locations.py | data/drc/locations.csv |
| Swarm work units (one per territory/ville, large cities split) | scripts/drc/make_units.py | data/drc/units/*.json |
| Agent assessments | agent swarm (see scripts/drc/agent_prompt.md) | data/drc/assessments/*.json |
| Build SQLite DB | scripts/drc/build_db.py | data/drc/defacto.sqlite |
| Map overlay + click details | scripts/drc/export_geojson.py | public/data/drc-control.geojson, public/data/drc-details/ |
Sources: GRID3 COD settlement extents v4, settlement names v9 and population v4.4 (100 m), OCHA COD-AB admin boundaries, GeoNames for well-known town names. Settlement population is the sum of 100 m population cells falling in each GRID3 settlement extent.
First run (as of 2026-10-01): 177 units, one research agent each plus a reviewer for the conflict provinces
(Nord-/Sud-Kivu, Ituri, Tanganyika, Maï-Ndombe, Kwango, Kwilu, Haut-Uele). Most rural assessments rest on
default state presence or territory-level reports, so confidence is mostly low/medium outside the east;
agent-added entities are flagged needs_review.
Database tables (scripts/drc/schema.sql): entity (controllers, with parent_id for sub-forces and a colour),
admin_unit, location, control_assessment (controller, sovereign = top-level parent, status, confidence,
date, evidence), assessment_presence (other actors present), source, assessment_source, run;
view v_current_control gives the latest assessment per location.
Clicking a point on the map (any library) opens a panel with everything recorded for that place: location data
(admin units, health zone/area, population, GRID3 extent, other names), every assessment (controller, sovereign,
status, confidence, basis, since, other actors, zone, evidence, sources, unit summary) and the entities involved.
The panel loads the territory's file from public/data/drc-details/<adm2 pcode>.json (plus index.json for
entities and admin names) on demand.