Mapping Global China · Knowledge Graph · Handoff

A research knowledge graph behind the MGC maps

Every map point now links to the people, companies, agreements, claims and research papers behind it, and Ask MGC answers questions with cited sources. This page runs in the order of the walkthrough: how it fits together, the live demo, where it stands, and what each person picks up.

44,781entities (nodes)
118,205relationships (edges)
22,341cited claims
5,622source documents
8,441map points linked
$5.45LLM spend of $20 cap

01How the pieces fit

Three repositories, one direction of flow. The graph is built once and served; the website only reads it.

Builds the graph

research-kg

Pulls MFA press releases, research papers and the platform's own map datasets, extracts entities, relations and claims, and checks each claim against its source sentence.

Serves the graph

mgc-api

Adds /kg/* endpoints: resolve a map point, fetch an entity's relationships, claims and events, search, and Ask.

Shows the graph

mgc-frontend

The relationships sidebar on the maps, the network view, and the Ask MGC search box.

The join is deterministic: each map feature already carries its dataset row id (port:34, plant:<hash>, investment:<n>). A map_link table maps that id to its graph node, so no fuzzy name matching happens on click.

02Live demo

The real MGC website on port 3001, with the investment and energy maps loading from snapshots in this folder and the graph served from a local service on port 18010 that reads the database in this folder. To run it on your own laptop, follow Run the demo (about 10 minutes, from a clone of the frontend repo plus this folder).

Investment map: a country's network

Click Pakistan, then the hub icon at the top right. The sidebar shows who invests, which projects, the state visits and the impacts, each with its sources.

Open map

Energy map: one power plant

Click any plant point. The panel resolves that exact plant to its graph node and lists its operator, financiers and related projects.

Open map

Ask MGC: a question with cited answers

Try what is the research for gwadar port in pakistan. Answers lead with papers and cite the sentence each fact came from.

Open Ask MGC

Under the hood: the raw API response

The same data the sidebar renders, straight from the graph service.

View JSON

03Where it stands

Working today

  • DoneGraph built and healthy: 44,781 entities, 118,205 relationships, 22,341 cited claims.
  • DoneMap to graph linking for 8,441 map points, deterministic.
  • DoneRelationships sidebar wired on the investment and energy maps.
  • DoneAsk MGC search with cited answers and noise filtering.
  • DoneBoth pull requests are up to date with their base branches (frontend re-merged with staging today).
  • DoneCheap to keep current: already-read documents replay from cache at $0, so each run pays only for new documents.

Honest caveats

  • PausedDaily extraction last completed Sep 12. It ran on this laptop and stopped when the laptop restarted on Sep 15. A server setup (systemd timer for mgc-hub) is written so it can run without the laptop.
  • LocalThe graph is served locally today. The live site needs it loaded into the warehouse database and the endpoints deployed.
  • LocalAsk MGC and its noise filter exist in the local service only, not yet in mgc-api.
  • BlockedVercel preview builds on the PRs show "Deployment was blocked" until the author account joins the MGC Vercel team. Code is on GitHub; merging is not affected.
  • BlockedThe live mgc-api (api.mapglobalchina.com) answered every request with 403 Forbidden on Sep 28, including its health check, so the block is at the server (nginx), not the credentials. The demo maps run from cached snapshots meanwhile; the platform owner should check the server.
  • PartialGlobal China Stories blog ingest works; Research Briefs need a Directus API token.

04What's left, and who picks it up

TaskOwnerUnblocks
Load the graph into the kg schema of mgc_hub_db, and choose Option A (standalone text ids) or Option B (keyed to entity_registry)Schema, loader notes and the data dump are in the backend and database guideData / DB ownerReal data on the live site
Deploy the /kg endpoints (PR #43), then port /kg/ask and the noise filter from the local serviceAPI ownerLive sidebar and live Ask MGC
Wire each remaining map's click to the sidebar, and place Ask MGC in the navTwo copy-ready examples: the investment map (country) and the energy map (per point). See the frontend wiring guideMaps engineerGraph on every map
Install the daily extraction timer on the mgc-hub serverSteps in the server runbookServer ownerCollection without the laptop
Add surbhikapoor19 to the MGC Vercel teamVercel adminPR preview builds
Provide a Directus token for Research BriefsCMS ownerBriefs in the graph