How owid/owid-grapher works
OWID Grapher is a data-visualization and publishing monorepo: teams manage data and chart configurations, render interactive charts and related content, then publish site pages and embeddable outputs. The graph emphasizes the documented admin-to-database-to-Grapher workflow and the Baker static-site path, while preserving Explorer, bespoke visualizations, search, and dynamic delivery as separate capabilities. Most links are supported by the README or SOURCE INDEX; unsampled implementation details are not treated as verified call paths.
Main entry points: site Site pages · adminSiteClient Grapher Admin · db.ts MySQL data store · explorerHandlers.ts Explorer handlers
Components 21
Authoring and Admin
- Grapher Admin
adminSiteClient - Admin server
adminSiteServer - Gdocs content
db/model/Gdoc
Data and Models
- MySQL data store
db/db.ts - Variable model
db/model/Variable.ts
Visualization
- Grapher library
packages/@ourworldindata/grapher/src/chart/ChartManager.ts - Explorer UI
- Demography model
bespoke/projects/demography/src/core/model/model.ts - Projection scenarios
bespoke/projects/demography/src/core/model/scenarios.ts
Rendering and Publishing
- Site pages
site - Static site baker
baker/SiteBaker.tsx - Dynamic handlers
functions/_common/reusableHandlers.ts - Grapher renderer
functions/_common/grapherRenderer.ts - Explorer handlers
functions/_common/explorerHandlers.ts - Data downloads
functions/_common/downloadFunctions.ts
Platform Services
- Search API
functions/api/search/searchApi.ts - Search result assembly
functions/_common/search/constructSearchResultJson.ts - Client settings
settings/clientSettings.mts - Server settings
settings/serverSettings.ts
Other components
- OWID authors
- Site readers
Connections 19
- OWID authors → Grapher Admin: configure charts
README.md - Grapher Admin → Admin server: manage data
- Admin server → MySQL data store: manage database
README.md - MySQL data store → Variable model: stores variables
- MySQL data store → Grapher library: supplies chart data
README.md - Grapher Admin → Explorer UI: configure explorers
README.md - OWID authors → Gdocs content: author content
README.md - Gdocs content → Static site baker: provides authored content
README.md - Grapher library → Site pages: renders charts
README.md - Explorer UI → Site pages: renders interfaces
README.md - Demography model → Projection scenarios: uses scenarios
bespoke/projects/demography/src/core/model/scenarios.ts - Static site baker → Site pages: builds static site
README.md - Site readers → Site pages: view pages
README.md - Site readers → Dynamic handlers: request dynamic output
- Dynamic handlers → Grapher renderer: renders charts
functions/_common/reusableHandlers.ts - Explorer handlers → Grapher renderer: renders PNG
functions/_common/explorerHandlers.ts - Explorer handlers → Data downloads: assembles downloads
functions/_common/explorerHandlers.ts - Search API → Search result assembly: assembles results
- Server settings → Client settings: imports settings
settings/serverSettings.ts