@varve/agency-sdks
Core Concepts

Graph Metadata

How graph-friendly metadata helpers represent datasets, dimensions, members, periods, and observations.

Many official statistics APIs expose data in shapes that are awkward for search, natural-language query systems, lineage graphs, and reproducible citation flows.

Several Varve agency SDKs include graph metadata helpers that convert provider-specific structures into predictable nodes and relationships.

Common pattern

The exact shape depends on the provider, but helpers usually normalize one of these models:

  • dataset, dimension, member
  • indicator, country, period
  • series, period, observation
  • table, filter, observation

For example, World Bank indicator data maps naturally to indicator -> country -> period:

const graph = await client.getIndicatorGraphMetadata('SP.POP.TOTL', ['USA', 'CAN'], {
  date: '2020:2024',
});
 
graph.indicator;
graph.countries;
graph.periods;
graph.observations;

Eurostat datasets map more like StatCan cubes:

const graph = await client.getDatasetGraphMetadata('demo_gind', {
  strategy: 'filtered',
  filters: {
    freq: 'A',
    indic_de: 'JAN',
    geo: ['DE', 'FR'],
    time: ['2022', '2023'],
  },
});
 
graph.dataset;
graph.dimensions;
graph.members;

Why helpers are bounded

Official statistical datasets can be large. A full metadata expansion may include millions or billions of possible observations.

Graph helpers prefer bounded strategies:

  • latest available period
  • caller-provided filters
  • explicit sample strategies
  • opt-in full expansion with guards

This makes metadata discovery useful in production systems without accidentally pulling an entire statistical universe.

Use cases

Use graph metadata when you need to:

  • build a searchable catalogue of official data
  • link observations back to official dimensions and members
  • prepare data for NLQ or planner systems
  • create reproducible citation paths
  • compare provider models behind a common abstraction

On this page