`
Yearbook Excel Sources (by year)
│
├─[Pipeline 1: National Sector]──────────────────────────────────────┐
│ 2分行业数据/.xlsx │
│ ↓ read_new_cat2_excel() │
│ Yearly CSVs (one per yearbook year) │
│ ↓ read_yearly_csvs() + standardize_combined_data() │
│ economic_indicators/规模以上工业企业主要经济指标{range}.csv │
│ Columns: Year, sector_ch, sector_code, sector_level, │
│ sector_cat2_code, sector_cat2_ch, sector_cat4_code, │
│ sector_cat4_ch, + ~15 economic metrics │
├────────────────────────────────────────────────────────────────────┤
│ │
├─[Pipeline 2: Regional Sector]──────────────────────────────────────┤
│ 3分地区数据/.xlsx │
│ ↓ process_year_dir() → clean_region_panel() per file │
│ Yearly CSVs (per yearbook directory) │
│ ↓ read_one_year() + standardize_region_data() │
│ economic_indicators/分地区规模以上工业企业主要经济指标{range}.csv │
│ Columns: Year, province, sector_ch, sector_code, sector_level, │
│ + ~15 economic metrics (aligned with national schema) │
├────────────────────────────────────────────────────────────────────┤
│ │
├─[Pipeline 3: Product Output]───────────────────────────────────────┤
│
read_excel_as_text() — no type inference, all columns as characternormalize_industry_name() — standardize separators, fix known typos (e.g., 煤矿采选 → 煤炭开采和洗选业)to_numeric() with missing-marker handlingSource: RESSET_NLC_INDUSTRYCODE_2012__N_1.csv (GB/T 4754-2012 categories)
Matching levels:
Special handling:
ambiguous for manual review` Year, sector_ch, sector_code, sector_level, sector_cat2_code, sector_cat2_ch, sector_cat4_code, sector_cat4_ch, metric_index, FirmNumberN, IndustrialSalesValueN, TotalAssetsN, TotalNetAssetsN, PaidInCapitalN, FixedAssetsN, FixedAssetDepreciationN, LiquidAssetsN, LiquidLiabilitiesN, StaffNumberN, TotalRevenueN, TotalCostN, TotalProfitN, NetProfitN, TaxN `
Each Excel sheet can contain multiple panels (e.g., left panel for one industry, right panel for another). Detection:
| Raw | Standardized |
|---|---|
| 总计 | 全国 |
| 合计 | 全国 |
| 地 区 | 地区 (header only) |
| 北 京 | 北京 |
Some products appear under slightly different names across years: ` Target: #啤酒(万千升) Source: 啤酒(万千升) → remove # prefix Target: 碳酸钠(电石,折100升/千克)(万吨) Source: 碳酸钠(电石,折100升/千克)(万吨) → unify slash Target: 磷肥(折含P2O5100%)(万吨) Source: 磷肥(折合P((2))O5100%)(万吨) → fix OCR errors `
| Product | Source | Method |
|---|---|---|
| 石灰, 铸件, 玻璃制品, 砖瓦 | MEIC other industrial products | Direct + fill missing |
| 工业供热, 居民供热 | MEIC heat fuel inputs | Coal → heat energy conversion |
| MEIC火电煤耗 | MEIC electricity-coal fuels | TCE-weighted sum |
| 水泥煤耗量 | MEIC cement workbook | Cement × clinker ratio × technology share × intensity |
| 烧结 | Pig iron × MEIC province ratio | Ratio applied |
| 焦炭 | MEIC coke production fuel | Activity × 100 conversion |