# GENERATED by governance/data_contract.py — do not edit.
#
# Regenerate:  python -m governance.data_contract --write
# Check:       python -m governance.data_contract --check
#
# Everything below is read from a register that already gates the build: the licence register
# (docs/LICENSE_REGISTER.md), the catalogue (catalog/products.py), the published dictionary
# (pipelines/publish/release.py), the freshness SLAs (quality/freshness_sla.yml) and the release
# floors (quality/floors.yml). Editing this file by hand makes it disagree with the pipeline it
# describes, which is the one thing a data contract must never do.
dataContractSpecification: 1.1.0
id: certvas-af-macro
info:
  title: African & EM Macro Indicators
  version: '2026.11'
  description: Twelve countries by twelve indicators, 2010-2024, from official statistical releases.
  owner: Certvas
  contact:
    name: Certvas
    email: mandase@certvas.com
    url: https://certvas.com/skus/af-macro.html
terms:
  usage: "Licensed per the Certvas Data Licence Agreement. Every row carries `license_class`, the register\
    \ code governing permitted use of the SOURCE it was extracted from — redistribution rights differ\
    \ per source and the register is authoritative:\n  - S013 World Bank Open Data — CLEARED; basis: CC\
    \ BY 4.0 (open data, incl. commercial use)\n  - S014 ECB euro FX reference rates (via Frankfurter\
    \ API) — CLEARED; basis: ECB reuse policy: reference rates may be reused free of charge with acknowledgement\
    \ (see docs/licenses/S014/)\n  - S032 World Bank Global Economic Monitor (GEM) — CLEARED; basis: VERIFIED\
    \ 2026-08-08 (evidence docs/licenses/S032/): CC BY 4.0 — World Bank data-licensing page permits copy/modify/distribute\
    \ \"for any purpose, **including commercial use**\" with attribution; same basis as cleared S005/S013."
  limitations: "Derived from primary filings and official publications, never from exchange price feeds;\
    \ Certvas holds no market-data licence and publishes no prices. Source conditions that travel with\
    \ the data:\n  - S013: Attribution to World Bank; indicator values only (public statistics, no natural\
    \ persons)\n  - S014: Attribute the ECB; reference rates are indicative daily snapshots (~16:00 CET),\
    \ NOT executable fixings — state this to buyers; no natural persons\n  - S032: Attribute \"The World\
    \ Bank, Global Economic Monitor (GEM), CC BY 4.0\" + indicate transformation; series are as-published\
    \ levels (NOT a vintage/revision archive — Certvas point-in-time vintages accrue from ingest forward);\
    \ quarterly re-verify third-party carve-out; no natural persons."
  billing: Certvas — African & EM Macro Indicators Sample (free) — FREE; Certvas — African & EM Macro
    Indicators (AF-MACRO) — $129
  noticePeriod: P30D
models:
  gold_macro:
    description: African & EM Macro Indicators — gold_macro.
    type: table
    fields:
      country_iso3:
        type: string
        description: ISO-3 country code.
      country_name:
        type: string
        description: Country name.
      indicator_code:
        type: string
        description: World Bank indicator code (e.g. FP.CPI.TOTL.ZG).
      indicator_name:
        type: string
        description: Human-readable indicator name.
      year:
        type: long
        description: Observation year.
      value:
        type: double
        description: Indicator value for the country-year.
      observed_at:
        type: timestamp_tz
        description: Certvas ingest time — gates as-of reads (no look-ahead).
      source_ref:
        type: string
        description: World Bank series reference (S013:worldbank/<code>).
      license_class:
        type: string
        description: License Register code (S013 World Bank / S014 ECB FX).
    quality: &id001
    - type: custom
      engine: certvas
      description: 'arithmetic cross-validation pass rate: min 0.8. Enforced by exports/release_gate.py
        — below its floor a release auto-HOLDs and does not publish.'
      specification: arithmetic_pass_rate min 0.8
    - type: custom
      engine: certvas
      description: 'dual-model agreement rate: min 0.95. Enforced by exports/release_gate.py — below its
        floor a release auto-HOLDs and does not publish.'
      specification: dual_model_agreement_rate min 0.95
    - type: custom
      engine: certvas
      description: 'minimum extraction confidence: min 0.85. Enforced by exports/release_gate.py — below
        its floor a release auto-HOLDs and does not publish.'
      specification: extraction_confidence_min min 0.85
    - type: custom
      engine: certvas
      description: 'Soda check failures: max 0. Enforced by exports/release_gate.py — below its floor
        a release auto-HOLDs and does not publish.'
      specification: soda_failures max 0
    - type: custom
      engine: certvas
      description: 'Pandera schema failures: max 0. Enforced by exports/release_gate.py — below its floor
        a release auto-HOLDs and does not publish.'
      specification: pandera_failures max 0
    - type: custom
      engine: certvas
      description: 'Arelle XBRL validation errors: max 0. Enforced by exports/release_gate.py — below
        its floor a release auto-HOLDs and does not publish.'
      specification: arelle_errors max 0
  gold_macro_hf:
    description: African & EM Macro Indicators — gold_macro_hf.
    type: table
    fields:
      series:
        type: string
        description: 'Canonical series id: FX.<CCY>.USD, CPI.<ISO3>.HEADLINE, CPI.<ISO3>.YOY, POLICY_RATE.<ISO3>.'
      country_iso3:
        type: string
        description: ISO-3 country code.
      series_type:
        type: string
        description: fx / cpi / policy_rate.
      date:
        type: string
        description: Observation / period / effective date (CPI period = first of month).
      value:
        type: double
        description: Indicator value for the country-year.
      unit:
        type: string
        description: e.g. LCU_per_USD, index_<base>, percent_yoy, percent.
      series_ref:
        type: string
      release_date:
        type: string
        description: Source publication date for this print (a revision is a NEW vintage).
      vintage:
        type: string
        description: Vintage label (= release_date). gold key is (series, date, vintage).
      frequency:
        type: string
        description: daily / monthly / event.
      observed_at:
        type: timestamp_tz
        description: Certvas ingest time — gates as-of reads (no look-ahead).
      source_ref:
        type: string
        description: World Bank series reference (S013:worldbank/<code>).
      license_class:
        type: string
        description: License Register code (S013 World Bank / S014 ECB FX).
    quality: *id001
servicelevels:
  freshness:
    description: "Maximum age of the newest observation, per table, from quality/freshness_sla.yml. Suspensions\
      \ are stated rather than hidden:\n  - gold_macro: 20 days (SUSPENDED until 2026-10-01 — refresh-macro\
      \ schedule frozen on the GitHub Actions budget; the table drifts by design until then)"
    timestampField: observed_at
  availability:
    description: 'No uptime commitment. Certvas is a sole trader and the API is best-effort: automated
      checks alert the founder when it fails, but there is no on-call rota. Data is delivered as versioned
      files, which do not depend on the API being up.'
  support:
    description: No contractual response time. One person, one time zone (Africa/Gaborone, UTC+2). mandase@certvas.com
      is read daily on working days.
  backup:
    description: No stated recovery objective. Raw source documents are immutable and archived; a published
      pack is reproducible from them, but no RTO or RPO is promised.
  retention:
    description: No deletion schedule. Published versions are permanent by design — a point-in-time dataset
      whose history can be withdrawn is not point-in-time. Superseded versions stay resolvable via their
      DOI.
