For developers

Cookbook

Task-oriented recipes for consuming Warconomy's dataset: join observations to sources, filter to live values, diff two versions, validate against the schema, pin a version, and build a citation. Each recipe is copy-paste against static files — no runtime API, no SDK. Partial coverage, not real-time.

static reference · data June 5, 2026

Each recipe solves one task against the static exports: join observations to sources, filter to live (citable) values, diff two versions, validate against the JSON Schema, pin a frozen version, verify integrity with checksums, and build a citation. Copy, adapt, and run — there is no API to call and nothing to install.

  • 7 copy-paste recipes.
  • Live-only filtering keeps sample rows out of citations.
  • Start here: /developers/quickstart · all surfaces: /contract.

Join observations to their sources

You have observations and want the citation for each.

const data = await (await fetch("https://warconomy.com/datasets/conflict-economic-impact/data.json")).json();
const byId = Object.fromEntries(data.sources.map((s) => [s.id, s]));
const rows = data.observations.map((o) => ({
  value: o.value, unit: o.unit, asOf: o.asOf,
  source: byId[o.sourceId]?.publisher, url: byId[o.sourceId]?.url,
}));

Filter to citable live values

You must not cite the labeled sample rows.

const live = data.observations.filter((o) => o.dataMode === "live");
// sample rows are illustrative — exclude them from any cited figure

Diff two versions

You want to know what changed between releases.

// value-level diff for a materialized version (when both are frozen)
const diff = await (await fetch("https://warconomy.com/datasets/conflict-economic-impact/versions/1.63.0/diff.json")).json();
// field additions per version: https://warconomy.com/developers/changelog/data.json

Validate against the schema

You want to fail fast on shape drift.

const schema = await (await fetch("https://warconomy.com/datasets/conflict-economic-impact/schema.json")).json();
// validate `data` against `schema` with any JSON Schema validator
// per-surface schemas: https://warconomy.com/datasets/conflict-economic-impact/schema-report

Pin a version for reproducibility

You need byte-stable inputs.

const reg = await (await fetch("https://warconomy.com/datasets/conflict-economic-impact/versions/data.json")).json();
const pinned = reg.versions[0].version; // newest; or choose a specific one
const frozen = await (await fetch(`https://warconomy.com/datasets/conflict-economic-impact/versions/${pinned}/data.json`)).json();

Verify integrity

You want to detect drift in a download.

const sums = await (await fetch("https://warconomy.com/datasets/conflict-economic-impact/checksums.json")).json();
const entry = sums.checksums.find((e) => e.path.endsWith("/data.json"));
// compare entry.fingerprint / entry.bytes against your copy

Build a citation

You want a ready-made citation for a figure.

const cites = await (await fetch("https://warconomy.com/citations/data.json")).json();
// each entry links the figure to its source with an as-of and review date

More

Quickstart: /developers/quickstart · guide: /developers · types: type examples · validation: /developers/validation.

Related Warconomy pages