# PRODUCTION source registry for the ACTIVATED csi-v1.1.0 methodology.
#
# Materialised per the post-activation reconciliation (upt-architecture
# docs/post-activation-reconciliation-v1-1-0.md, step 2) by re-versioning the CERTIFIED
# candidate registry data/source-registries/csi-v1.1.0-candidate.yaml
# (certified hash sha256:31c3c2f3ecda6633f79d7d817673c003bc7917c140e74019433c80b204308099,
# recorded in data/candidate-v1-1-0/candidate-certification.json) onto the OPERATIONAL
# csi-free-public-v1 registry shape the deterministic exporter actually computes with.
#
# Shape rules:
#   * The six unchanged metrics carry their csi-free-public-v1.yaml rows VERBATIM (same
#     sub_weights and quality knobs), so their aggregated values, coverage, confidence and
#     bounded deviations reproduce the locked series exactly under csi-v1.1.0.
#   * Overlay 1 (animal_product_trade): the certified candidate sources. faostat_tcl is the
#     FAOSTAT TCL element-5910 series (the same collected lineage as the v1.0.0 faostat_trade
#     row, re-anchored 2018-2022 upstream in the harmonised series) and carries the v1.0.0
#     quality knobs; un_comtrade_quantity is the quantity-consistent bridge that extends the
#     series past the FAOSTAT horizon.
#   * Overlay 2 (consumer_transition_score): the certified candidate's official-statistics
#     sources (Eurostat HICP EU27_2020 and Turkiye blocs, US BLS CPI/CE), replacing the
#     v1.0.0 FBS plant-protein-share construction per cpi_relative_price_basket_v1.
#   * The candidate registry's weight-zero audit rows (national_customs_evidence,
#     eurostat_hicp_lenses) are NOT carried: the engine loader rejects non-positive
#     sub_weights by design (validate_source_registry), and those rows are audit evidence,
#     never composed. They remain recorded in the certified candidate registry.
#
# The locked csi-v1.0.0 registries are untouched (revision-not-mutation). The snapshot stays
# provisional, never certified, until a reproducible production pipeline certifies a release.
#
# licence_status identifiers for the 19 national-portal rows were filled in from the
# 2026-08 data-rights review (upt-architecture docs/benchmark/source-rights-review-2026-08.md;
# per-source evidence in data/source-rights/csi-v1.1.0-review-evidence.json). licence_status
# is registry metadata, NOT hash material: the per-period source-registry material
# (unpt_csi.engine._source_registry_material) excludes it, so this edit changes no snapshot,
# kit, or proof-chain hash. Rights DECISIONS live in data/source-rights/csi-v1.1.0.yaml.
methodology_version: csi-v1.1.0
sources:
  # --- g20_livestock_population: FAOSTAT live-animal stocks (primary) + WB index ---
  - metric_id: g20_livestock_population
    source_id: faostat_live_animals
    provider: FAOSTAT
    source_url: https://bulks-faostat.fao.org/production/Production_Crops_Livestock_E_All_Data_(Normalized).zip
    licence_status: cc-by-4.0
    retrieval_method: public-bulk-download
    cadence: annual
    sub_weight: "0.40"
    static_quality: "0.95"
    method_quality: "0.95"
    grace_days: "400"
    half_life_days: "1825"
  - metric_id: g20_livestock_population
    source_id: wb_livestock_index
    provider: World Bank
    source_url: https://api.worldbank.org/v2/country/all/indicator/AG.PRD.LVSK.XD
    licence_status: cc-by-4.0
    retrieval_method: no-key-http-api
    cadence: annual
    sub_weight: "0.10"
    static_quality: "0.80"
    method_quality: "0.90"
    grace_days: "400"
    half_life_days: "1825"
  - metric_id: g20_livestock_population
    source_id: arg_datos_ckan
    provider: Datos Argentina / SENASA / SAGyP
    source_url: https://datos.gob.ar/
    licence_status: cc-by-4.0-per-dataset
    retrieval_method: national-public-source
    cadence: monthly-portal-scan
    sub_weight: "0.026"
    static_quality: "0.82"
    method_quality: "0.75"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: aus_abs_data_api
    provider: Australian Bureau of Statistics
    source_url: https://data.api.abs.gov.au/
    licence_status: cc-by-4.0
    retrieval_method: national-public-source
    cadence: weekly-api-fetch
    sub_weight: "0.026"
    static_quality: "0.88"
    method_quality: "0.85"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: bra_ibge_agregados
    provider: IBGE
    source_url: https://servicodados.ibge.gov.br/
    licence_status: decreto-8777-2016-free-use
    retrieval_method: national-public-source
    cadence: monthly-api-fetch
    sub_weight: "0.026"
    static_quality: "0.86"
    method_quality: "0.82"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: can_statcan_wds
    provider: Statistics Canada
    source_url: https://www150.statcan.gc.ca/
    licence_status: statcan-open-licence
    retrieval_method: national-public-source
    cadence: weekly-fetch
    sub_weight: "0.026"
    static_quality: "0.88"
    method_quality: "0.85"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: chn_nbs_national_data
    provider: National Bureau of Statistics of China
    source_url: https://data.stats.gov.cn/
    licence_status: nbs-terms-restricted
    retrieval_method: national-public-source
    cadence: monthly-portal-scan
    sub_weight: "0.026"
    static_quality: "0.78"
    method_quality: "0.65"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: fra_eurostat_livestock
    provider: Eurostat relay for France
    source_url: https://ec.europa.eu/eurostat/
    licence_status: eurostat-reuse-2011-833-eu
    retrieval_method: national-public-source
    cadence: weekly-api-fetch
    sub_weight: "0.026"
    static_quality: "0.88"
    method_quality: "0.85"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: deu_eurostat_livestock
    provider: Eurostat relay for Germany
    source_url: https://ec.europa.eu/eurostat/
    licence_status: eurostat-reuse-2011-833-eu
    retrieval_method: national-public-source
    cadence: weekly-api-fetch
    sub_weight: "0.026"
    static_quality: "0.88"
    method_quality: "0.85"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: ind_dahd_ogd
    provider: DAHD / data.gov.in
    source_url: https://www.data.gov.in/
    licence_status: godl-india
    retrieval_method: national-public-source
    cadence: quarterly-portal-scan
    sub_weight: "0.026"
    static_quality: "0.78"
    method_quality: "0.65"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: idn_bps_webapi
    provider: BPS Statistics Indonesia
    source_url: https://webapi.bps.go.id/
    licence_status: bps-api-terms-non-commercial
    retrieval_method: national-public-source
    cadence: monthly-api-fetch
    sub_weight: "0.026"
    static_quality: "0.84"
    method_quality: "0.80"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: ita_eurostat_livestock
    provider: Eurostat relay for Italy
    source_url: https://ec.europa.eu/eurostat/
    licence_status: eurostat-reuse-2011-833-eu
    retrieval_method: national-public-source
    cadence: weekly-api-fetch
    sub_weight: "0.026"
    static_quality: "0.88"
    method_quality: "0.85"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: jpn_estat
    provider: e-Stat / MAFF
    source_url: https://www.e-stat.go.jp/
    licence_status: japan-gstu-2.0
    retrieval_method: national-public-source
    cadence: monthly-fetch
    sub_weight: "0.026"
    static_quality: "0.86"
    method_quality: "0.82"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: kor_kosis_openapi
    provider: KOSIS
    source_url: https://kosis.kr/
    licence_status: kosis-use-terms
    retrieval_method: national-public-source
    cadence: monthly-fetch
    sub_weight: "0.026"
    static_quality: "0.86"
    method_quality: "0.82"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: mex_inegi_indicadores
    provider: INEGI / SIAP
    source_url: https://www.inegi.org.mx/
    licence_status: inegi-terminos-libre-uso
    retrieval_method: national-public-source
    cadence: monthly-api-fetch
    sub_weight: "0.026"
    static_quality: "0.86"
    method_quality: "0.82"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: rus_rosstat_fedstat
    provider: Rosstat / Fedstat
    source_url: https://www.fedstat.ru/
    licence_status: unverifiable-restricted
    retrieval_method: national-public-source
    cadence: quarterly-portal-scan
    sub_weight: "0.026"
    static_quality: "0.76"
    method_quality: "0.62"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: sau_gastat_open_data
    provider: GASTAT / Saudi Open Data
    source_url: https://www.stats.gov.sa/
    licence_status: gastat-use-policy
    retrieval_method: national-public-source
    cadence: monthly-portal-scan
    sub_weight: "0.026"
    static_quality: "0.76"
    method_quality: "0.62"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: zaf_statssa
    provider: Statistics South Africa
    source_url: https://www.statssa.gov.za/
    licence_status: statssa-publication-permission
    retrieval_method: national-public-source
    cadence: quarterly-portal-scan
    sub_weight: "0.026"
    static_quality: "0.76"
    method_quality: "0.62"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: tur_tuik_veri_portal
    provider: TUIK
    source_url: https://veriportali.tuik.gov.tr/
    licence_status: tuik-legal-notice-attribution
    retrieval_method: national-public-source
    cadence: monthly-portal-scan
    sub_weight: "0.026"
    static_quality: "0.78"
    method_quality: "0.65"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: gbr_defra_govuk
    provider: DEFRA / GOV.UK
    source_url: https://www.gov.uk/
    licence_status: ogl-v3.0
    retrieval_method: national-public-source
    cadence: annual-fetch
    sub_weight: "0.026"
    static_quality: "0.86"
    method_quality: "0.82"
    grace_days: "120"
    half_life_days: "730"
  - metric_id: g20_livestock_population
    source_id: usa_usda_quickstats
    provider: USDA NASS QuickStats
    source_url: https://quickstats.nass.usda.gov/
    licence_status: us-public-domain-nass-tos
    retrieval_method: national-public-source
    cadence: weekly-fetch
    sub_weight: "0.032"
    static_quality: "0.88"
    method_quality: "0.85"
    grace_days: "120"
    half_life_days: "730"

  # --- animal_agriculture_ghg: FAOSTAT emissions (sole free primary) ---
  - metric_id: animal_agriculture_ghg
    source_id: faostat_emissions
    provider: FAOSTAT
    source_url: https://bulks-faostat.fao.org/production/Emissions_Totals_E_All_Data_(Normalized).zip
    licence_status: cc-by-4.0
    retrieval_method: public-bulk-download
    cadence: annual
    sub_weight: "1"
    static_quality: "0.95"
    method_quality: "0.95"
    grace_days: "400"
    half_life_days: "1825"
    single_source_eligible: true

  # --- animal_agriculture_land_use: FAOSTAT pasture (primary) + WB ag land ---
  - metric_id: animal_agriculture_land_use
    source_id: faostat_pasture
    provider: FAOSTAT
    source_url: https://bulks-faostat.fao.org/production/Inputs_LandUse_E_All_Data_(Normalized).zip
    licence_status: cc-by-4.0
    retrieval_method: public-bulk-download
    cadence: annual
    sub_weight: "0.70"
    static_quality: "0.93"
    method_quality: "0.95"
    grace_days: "400"
    half_life_days: "1825"
  - metric_id: animal_agriculture_land_use
    source_id: wb_agricultural_land
    provider: World Bank
    source_url: https://api.worldbank.org/v2/country/all/indicator/AG.LND.AGRI.K2
    licence_status: cc-by-4.0
    retrieval_method: no-key-http-api
    cadence: annual
    sub_weight: "0.30"
    static_quality: "0.80"
    method_quality: "0.85"
    grace_days: "400"
    half_life_days: "1825"

  # --- livestock_feed_production: FAOSTAT Food Balance Sheets feed allocation ---
  # Real free-public series. Feed (element 5521, quantity of each commodity allocated to
  # feed, 1000 t) for a curated basket of FBS-native major feed-commodity family aggregates
  # (cereals 2905, pulses 2911, oilcrops 2913), geometric-mean combined like
  # faostat_livestock_primary / faostat_trade. FAOSTAT splits Food Balance Sheets into two
  # archives: the new-methodology FBS (2010 onwards, no 2000-2004 baseline) and the historic
  # FBSH (1961-2013). The faostat_feed aggregator uses FBSH for the baseline window and
  # 2000-2013, then chain-links the new FBS values onto the FBSH level at the 2013 overlap
  # year (a documented, methodology-visible splice). See configs/sources.free_public.v1.yaml
  # (the faostat_food_balances / faostat_food_balances_historic dataset defs and the curated
  # basket) and unpt_csi/harmonise/aggregate.py (_FAOSTAT_FEED_FAMILIES + _faostat_feed_spliced)
  # for the documented basket and splice. The basket was curated from the real discovery run
  # (data/collected/faostat/faostat_food_balances.discover.json). The metric weight (10) and
  # direction (-1) stay locked in csi.v1.yaml; this entry adds only the source mapping.
  - metric_id: livestock_feed_production
    source_id: faostat_feed
    provider: FAOSTAT
    source_url: https://bulks-faostat.fao.org/production/FoodBalanceSheets_E_All_Data_(Normalized).zip
    licence_status: cc-by-4.0
    retrieval_method: public-bulk-download
    cadence: annual
    sub_weight: "1"
    static_quality: "0.93"
    method_quality: "0.95"
    grace_days: "400"
    half_life_days: "1825"
    single_source_eligible: true

  # --- animal_product_output: FAOSTAT livestock primary (primary) + WB food index ---
  - metric_id: animal_product_output
    source_id: faostat_livestock_primary
    provider: FAOSTAT
    source_url: https://bulks-faostat.fao.org/production/Production_Crops_Livestock_E_All_Data_(Normalized).zip
    licence_status: cc-by-4.0
    retrieval_method: public-bulk-download
    cadence: annual
    sub_weight: "0.70"
    static_quality: "0.93"
    method_quality: "0.95"
    grace_days: "400"
    half_life_days: "1825"
  - metric_id: animal_product_output
    source_id: wb_food_index
    provider: World Bank
    source_url: https://api.worldbank.org/v2/country/all/indicator/AG.PRD.FOOD.XD
    licence_status: cc-by-4.0
    retrieval_method: no-key-http-api
    cadence: annual
    sub_weight: "0.30"
    static_quality: "0.80"
    method_quality: "0.85"
    grace_days: "400"
    half_life_days: "1825"

  # --- animal_agriculture_employment: World Bank proxy (share x labour force) ---
  - metric_id: animal_agriculture_employment
    source_id: wb_employment_proxy
    provider: World Bank
    source_url: https://api.worldbank.org/v2/country/all/indicator/SL.AGR.EMPL.ZS
    licence_status: cc-by-4.0
    retrieval_method: no-key-http-api
    cadence: annual
    sub_weight: "1"
    static_quality: "0.70"
    method_quality: "0.80"
    grace_days: "400"
    half_life_days: "1825"
    single_source_eligible: true

  # --- animal_product_trade (csi-v1.1.0 overlay 1): re-anchored 2018-2022; quantity bridge ---
  # faostat_tcl: FAOSTAT Trade, Crops and Livestock products, element 5910 export quantity --
  # the same collected series as the v1.0.0 faostat_trade row (same bulk dataset, same curated
  # basket, same quality knobs), entering the engine re-anchored to the 2018-2022 median per
  # data/baselines/csi-v1.1.0.yaml and the certified constants in
  # configs/baselines.csi-v1.1.0-candidate.yaml. Covers epochs 2000-2023.
  - metric_id: animal_product_trade
    source_id: faostat_tcl
    provider: FAOSTAT (Trade, Crops and Livestock products, element 5910 export quantity)
    source_url: https://bulks-faostat.fao.org/production/Trade_CropsLivestock_E_All_Data_(Normalized).zip
    licence_status: cc-by-4.0
    retrieval_method: public-bulk-download
    cadence: annual
    sub_weight: "0.60"
    static_quality: "0.93"
    method_quality: "0.95"
    grace_days: "400"
    half_life_days: "1825"
    single_source_eligible: true
  # un_comtrade_quantity: the certified quantity-consistent bridge (HS6 leaf net weight,
  # 18 G20 reporters) that extends the re-anchored series over the bridge epochs
  # (2024-2026), chain-linked off the latest collected FAOSTAT level by matched-panel
  # factors (2023 base) from the committed g20-trade-quantity artefact (activationUse true),
  # exactly as the certified candidate materialisation did.
  - metric_id: animal_product_trade
    source_id: un_comtrade_quantity
    provider: UN Comtrade (registered free tier, HS6 leaf net weight, 18 G20 reporters)
    source_url: https://comtradeapi.un.org/data/v1/get/C/M/HS
    licence_status: un-comtrade-policy-attribution
    retrieval_method: automated-json-api-keyed
    cadence: monthly
    sub_weight: "0.40"
    static_quality: "0.90"
    method_quality: "0.90"
    grace_days: "120"
    half_life_days: "730"
    single_source_eligible: true

  # --- consumer_transition_score (csi-v1.1.0 overlay 2): cpi_relative_price_basket_v1 ---
  # Official statistics replace the v1.0.0 FBS plant-protein-share construction: the pooled
  # score is the equal-weight mean over the non-overlapping blocs [EU27_2020, TR, USA]
  # available each month (DE/FR/IT are validation lenses inside the EU27_2020 bloc, never
  # pooled and never registered here -- the loader rejects weight-zero rows). Each bloc source
  # carries the pooled harmonised annual value it jointly produced; the per-year pooled panel
  # is recorded in the certified consumer replay evidence
  # (data/candidate-v1-1-0/consumer-restatement-parity.json).
  - metric_id: consumer_transition_score
    source_id: eurostat_hicp_eu27
    provider: Eurostat HICP ECOICOP ver.2 (prc_hicp_minr I25 + prc_hicp_iw weights, EU27_2020 bloc)
    source_url: https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/
    licence_status: eurostat-reuse-attribution
    retrieval_method: automated-json-api
    cadence: monthly
    sub_weight: "0.3334"
    static_quality: "0.95"
    method_quality: "0.90"
    grace_days: "120"
    half_life_days: "730"
    single_source_eligible: true
  - metric_id: consumer_transition_score
    source_id: eurostat_hicp_tur
    provider: Eurostat HICP ECOICOP ver.2 (prc_hicp_minr I25 + prc_hicp_iw weights, Turkiye)
    source_url: https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/
    licence_status: eurostat-reuse-attribution
    retrieval_method: automated-json-api
    cadence: monthly
    sub_weight: "0.3333"
    static_quality: "0.95"
    method_quality: "0.90"
    grace_days: "120"
    half_life_days: "730"
    single_source_eligible: true
  - metric_id: consumer_transition_score
    source_id: bls_cpi_ce_usa
    provider: US BLS CPI item aggregates + Consumer Expenditure annual weights (LABSTAT)
    source_url: https://download.bls.gov/pub/time.series/
    licence_status: public-domain-us-federal
    retrieval_method: automated-flat-file
    cadence: monthly
    sub_weight: "0.3333"
    static_quality: "0.95"
    method_quality: "0.90"
    grace_days: "120"
    half_life_days: "730"
    single_source_eligible: true
