Load national and market cost bases into OpenConstructionERP: the 8 national bases (Turkey Birim Fiyat, China Dinge, Brazil SINAPI, Spain BCCA, Italy Prezzario Toscana, Greece GGDE, Vietnam Dinh Muc, Indonesia AHSP), the 30 global markets, and 48 PPP market catalogs per base. Use when importing a cost database, repricing into a market, or troubleshooting a load.

GitHub
Install command
npx skhub add datadrivenconstruction/oce-load-cost-bases
Markdown
SKILL.md

Load Cost Bases into OpenConstructionERP

The catalog of bases (2026)

National bases ship a 95-column parquet each plus 26 language editions and a markets/ folder of 48 PPP-repriced resource catalogs.

Region idBasePositionsCurrencyPriced?
TR_NATIONALTurkey (Birim Fiyat, ÇŞB+10 institutions)22,704TRYyes
ZH_CHINAChina (Beijing Dinge + Bole 2022)11,312CNYyes
BR_NATIONALBrazil (SINAPI, CAIXA/IBGE)9,723BRLyes
ES_ANDALUCIASpain (BCCA 2023, Andalucía)6,453EURyes
IT_TOSCANAItaly (Prezzario Regione Toscana 2026)5,836EURyes
VN_NATIONALVietnam (Dinh Muc, TT 12/2021)4,299VNDcoefficient (rate 0)
ID_NATIONALIndonesia (AHSP, Permen PUPR)2,784IDRcoefficient (rate 0)
GR_NATIONALGreece (GGDE)2,647EURpartly

Plus the flagship global base: 30 markets under CIS-Russia-GESN-FER-TER (USA_USD, DE_BERLIN, RU_STPETERSBURG, …).

Load a base (API)

POST /api/v1/costs/load-cwicr/TR_NATIONAL
  • Reads the parquet (local WORLD_COST_BASES, cache, bundled dir, then GitHub download fallback).
  • Groups rows by rate_code (one row per work item, components[] inline).
  • Idempotent on (code, region): second call → {"status": "already_loaded", ...}.
  • After load, the backend swaps the region's text to the base's home language parquet (TR___DDC_CWICR/TR_tr_...), so a Turkish user sees Turkish.

Verify the load

GET /api/v1/costs/regions/stats/      # item count per region
GET /api/v1/costs/?region=TR_NATIONAL&limit=5   # check currency and descriptions
GET /api/v1/costs/{id}                # components[] = labour/material/machine lines
GET /api/v1/costs/category-tree/?region=TR_NATIONAL

Import the resource catalog

POST /api/v1/catalog/import/TR_NATIONAL

Reads DDC_CWICR_TR_Catalog.csv (resource_code, name, type, category, unit, price_avg, price_min, price_max, currency, usage_count + parent_* classification preserved in specifications).

Reprice a base into a market (PPP)

  1. Pick a market card from GET /api/v1/costs/base-catalog (e.g. TR_NATIONAL:DE_BERLIN_de).
  2. The platform downloads the market's DDC_CWICR_DE_BERLIN_de_Catalog.csv (resources already PPP-repriced to EUR and translated to German).
  3. It re-prices the base region's resource price sheet in place — text follows the language, price follows the market.

Troubleshooting

  • 404 "not found" → no local parquet and GitHub download failed; check ~/.openestimator/cache/{db_id}.parquet and network.
  • Empty currency → region missing from the currency map; add it to cwicr_v3_catalogue.py / _REGION_CURRENCY.
  • Coefficient base shows rate 0 → expected for VN/ID; seed prices via ResourcePriceService.seed_region.
  • Duplicate rows → importer collapses by (code, region); multiple price layers per code keep the first.
Discovery
Tags

No tags published for this skill.

Version
Latest version metadata

Version

v2026.09.24

Published

Sep 24, 2026

Category

Uncategorized

License

MIT

Source path

6_OpenConstructionERP/oce-load-cost-bases

Default branch

main

Latest commit

ce45bbf

Tree SHA

e20d7ee