# karlheinrich-jpg/the-data-of-energy-poverty-index architecture

> Architecture diagram of the GitHub repository karlheinrich-jpg/the-data-of-energy-poverty-index, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/karlheinrich-jpg/the-data-of-energy-poverty-index
- Repository: https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index

## Overview

This repository is a research workflow for constructing a provincial energy-poverty index, forecasting it from province-year predictors, interpreting model predictions, and comparing those patterns with fixed-effects panel associations. The documented main path runs from indicator data through entropy-weighted EPI and chronological SSA-LSTM evaluation; benchmark models and alternate index constructions support robustness. Source excerpts are partial, so links to unsampled analyses are based on README descriptions and are limited to documented relationships.

Main entry points: [`能源贫困预测CNN-LSTM/Exogenous_Variables_and_Table.xlsx`](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/Exogenous_Variables_and_Table.xlsx) (Predictor data), [`能源贫困预测CNN-LSTM/EPI_entropy_output.xlsx`](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/EPI_entropy_output.xlsx) (EPI workbooks), [`能源贫困预测CNN-LSTM/LSTM-SHAP-base.py`](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/LSTM-SHAP-base.py) (LSTM SHAP), [`能源贫困预测CNN-LSTM/SSA-LSTM.py`](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/SSA-LSTM.py) (SSA-LSTM)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_index["Index construction"]
  node_raw_indicators["Indicator data<br/>[EP数据.xlsx]"]
  node_epi_method["Entropy EPI<br/>[EWM.py]"]
  node_epi_result["EPI workbooks"]
  node_alternate_epi["Alternate EPI<br/>[CRITIC-因子分析-PCA.py]"]
  node_epi_alternates["Alternate index results"]
end

subgraph group_forecast["Forecasting"]
  node_predictor_data["Predictor data"]
  node_ssa_lstm["SSA-LSTM<br/>[SSA-LSTM.py]"]
  node_checkpoint["Model checkpoint"]
  node_benchmarks["Model benchmarks<br/>[模型对比.py]"]
  node_comparison_plot["Comparison plots<br/>[模型对比＋绘图.py]"]
  node_comparison_results["Benchmark results"]
end

subgraph group_interpret["Interpretation"]
  node_shap_base["LSTM SHAP<br/>[LSTM-SHAP-base.py]"]
  node_shap_heterogeneity["Regional SHAP<br/>[LSTM-SHAP-异质性.py]"]
  node_shap_robustness["Index robustness SHAP<br/>[LSTM-SHAP-鲁棒性.py]"]
  node_shap_findings["SHAP evidence<br/>[SHAP分析+TOP依赖图.py]"]
end

subgraph group_inference["Panel inference"]
  node_twfe["TWFE analysis"]
  node_twfe_results["TWFE results"]
end

node_researcher(("Researcher"))
node_research_outputs["Research results"]

node_researcher -->|"constructs index"| node_epi_method
node_raw_indicators -->|"provides indicators"| node_epi_method
node_epi_method -->|"writes EPI"| node_epi_result
node_researcher -->|"tests alternatives"| node_alternate_epi
node_raw_indicators -->|"provides indicators"| node_alternate_epi
node_alternate_epi -->|"writes scores"| node_epi_alternates
node_researcher -->|"runs forecast"| node_ssa_lstm
node_epi_result -->|"supplies target"| node_ssa_lstm
node_predictor_data -->|"supplies predictors"| node_ssa_lstm
node_ssa_lstm -->|"saves weights"| node_checkpoint
node_researcher -->|"runs comparisons"| node_benchmarks
node_epi_result -->|"supplies target"| node_benchmarks
node_predictor_data -->|"supplies predictors"| node_benchmarks
node_benchmarks -->|"writes metrics"| node_comparison_results
node_comparison_results -->|"provides metrics"| node_comparison_plot
node_researcher -->|"interprets forecasts"| node_shap_base
node_checkpoint -.->|"provides model"| node_shap_base
node_epi_result -->|"supplies target"| node_shap_base
node_predictor_data -->|"supplies features"| node_shap_base
node_researcher -->|"tests regions"| node_shap_heterogeneity
node_epi_result -->|"supplies target"| node_shap_heterogeneity
node_predictor_data -->|"supplies features"| node_shap_heterogeneity
node_researcher -->|"tests robustness"| node_shap_robustness
node_epi_alternates -->|"supplies alternate targets"| node_shap_robustness
node_predictor_data -->|"supplies features"| node_shap_robustness
node_shap_base -->|"supports interpretation"| node_shap_findings
node_shap_heterogeneity -->|"supports interpretation"| node_shap_findings
node_shap_robustness -->|"supports interpretation"| node_shap_findings
node_researcher -->|"runs panel analysis"| node_twfe
node_epi_result -->|"supplies outcome"| node_twfe
node_predictor_data -->|"supplies lagged predictors"| node_twfe
node_twfe -->|"writes estimates"| node_twfe_results
node_shap_findings -->|"contributes evidence"| node_research_outputs
node_twfe_results -->|"contributes estimates"| node_research_outputs
node_comparison_results -->|"contributes metrics"| node_research_outputs

click node_raw_indicators "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/EP%E6%95%B0%E6%8D%AE.xlsx"
click node_epi_method "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/EWM.py"
click node_epi_result "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/EPI_entropy_output.xlsx"
click node_alternate_epi "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/CRITIC-%E5%9B%A0%E5%AD%90%E5%88%86%E6%9E%90-PCA.py"
click node_epi_alternates "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/EPI_CRITIC_FA_PCA_output.xlsx"
click node_predictor_data "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/Exogenous_Variables_and_Table.xlsx"
click node_ssa_lstm "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/SSA-LSTM.py"
click node_checkpoint "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/best_SSA_LSTM_checkpoint.pth"
click node_benchmarks "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/%E6%A8%A1%E5%9E%8B%E5%AF%B9%E6%AF%94.py"
click node_comparison_plot "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/%E6%A8%A1%E5%9E%8B%E5%AF%B9%E6%AF%94%EF%BC%8B%E7%BB%98%E5%9B%BE.py"
click node_comparison_results "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/Model_Comparison.xlsx"
click node_shap_base "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/LSTM-SHAP-base.py"
click node_shap_heterogeneity "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/LSTM-SHAP-%E5%BC%82%E8%B4%A8%E6%80%A7.py"
click node_shap_robustness "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/LSTM-SHAP-%E9%B2%81%E6%A3%92%E6%80%A7.py"
click node_shap_findings "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/SHAP%E5%88%86%E6%9E%90%2BTOP%E4%BE%9D%E8%B5%96%E5%9B%BE.py"
click node_twfe "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/tree/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM"
click node_twfe_results "https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/TWFE_EPI_results.xlsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_raw_indicators,node_epi_method,node_epi_result,node_alternate_epi,node_epi_alternates toneBlue
class node_predictor_data,node_ssa_lstm,node_checkpoint,node_benchmarks,node_comparison_plot,node_comparison_results toneAmber
class node_shap_base,node_shap_heterogeneity,node_shap_robustness,node_shap_findings toneMint
class node_twfe,node_twfe_results toneRose
class node_researcher,node_research_outputs toneIndigo
```

## Components

### Index construction

- [Indicator data](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/EP%E6%95%B0%E6%8D%AE.xlsx): `EP数据.xlsx`
- [Entropy EPI](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/EWM.py): `能源贫困预测CNN-LSTM/EWM.py`
- [EPI workbooks](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/EPI_entropy_output.xlsx): `能源贫困预测CNN-LSTM/EPI_entropy_output.xlsx`
- [Alternate EPI](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/CRITIC-%E5%9B%A0%E5%AD%90%E5%88%86%E6%9E%90-PCA.py): `能源贫困预测CNN-LSTM/CRITIC-因子分析-PCA.py`
- [Alternate index results](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/EPI_CRITIC_FA_PCA_output.xlsx): `能源贫困预测CNN-LSTM/EPI_CRITIC_FA_PCA_output.xlsx`

### Forecasting

- [Predictor data](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/Exogenous_Variables_and_Table.xlsx): `能源贫困预测CNN-LSTM/Exogenous_Variables_and_Table.xlsx`
- [SSA-LSTM](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/SSA-LSTM.py): `能源贫困预测CNN-LSTM/SSA-LSTM.py`
- [Model checkpoint](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/best_SSA_LSTM_checkpoint.pth): `能源贫困预测CNN-LSTM/best_SSA_LSTM_checkpoint.pth`
- [Model benchmarks](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/%E6%A8%A1%E5%9E%8B%E5%AF%B9%E6%AF%94.py): `能源贫困预测CNN-LSTM/模型对比.py`
- [Comparison plots](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/%E6%A8%A1%E5%9E%8B%E5%AF%B9%E6%AF%94%EF%BC%8B%E7%BB%98%E5%9B%BE.py): `能源贫困预测CNN-LSTM/模型对比＋绘图.py`
- [Benchmark results](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/Model_Comparison.xlsx): `能源贫困预测CNN-LSTM/Model_Comparison.xlsx`

### Interpretation

- [LSTM SHAP](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/LSTM-SHAP-base.py): `能源贫困预测CNN-LSTM/LSTM-SHAP-base.py`
- [Regional SHAP](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/LSTM-SHAP-%E5%BC%82%E8%B4%A8%E6%80%A7.py): `能源贫困预测CNN-LSTM/LSTM-SHAP-异质性.py`
- [Index robustness SHAP](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/LSTM-SHAP-%E9%B2%81%E6%A3%92%E6%80%A7.py): `能源贫困预测CNN-LSTM/LSTM-SHAP-鲁棒性.py`
- [SHAP evidence](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/SHAP%E5%88%86%E6%9E%90%2BTOP%E4%BE%9D%E8%B5%96%E5%9B%BE.py): `能源贫困预测CNN-LSTM/SHAP分析+TOP依赖图.py`

### Panel inference

- [TWFE analysis](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/tree/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM): `能源贫困预测CNN-LSTM`
- [TWFE results](https://github.com/karlheinrich-jpg/the-data-of-energy-poverty-index/blob/main/%E8%83%BD%E6%BA%90%E8%B4%AB%E5%9B%B0%E9%A2%84%E6%B5%8BCNN-LSTM/TWFE_EPI_results.xlsx): `能源贫困预测CNN-LSTM/TWFE_EPI_results.xlsx`

### Other components

- **Researcher**
- **Research results**

## Connections

- Researcher → Entropy EPI: constructs index
- Indicator data → Entropy EPI: provides indicators
- Entropy EPI → EPI workbooks: writes EPI
- Researcher → Alternate EPI: tests alternatives
- Indicator data → Alternate EPI: provides indicators
- Alternate EPI → Alternate index results: writes scores
- Researcher → SSA-LSTM: runs forecast
- EPI workbooks → SSA-LSTM: supplies target
- Predictor data → SSA-LSTM: supplies predictors
- SSA-LSTM → Model checkpoint: saves weights
- Researcher → Model benchmarks: runs comparisons
- EPI workbooks → Model benchmarks: supplies target
- Predictor data → Model benchmarks: supplies predictors
- Model benchmarks → Benchmark results: writes metrics
- Benchmark results → Comparison plots: provides metrics
- Researcher → LSTM SHAP: interprets forecasts
- Model checkpoint → LSTM SHAP: provides model
- EPI workbooks → LSTM SHAP: supplies target
- Predictor data → LSTM SHAP: supplies features
- Researcher → Regional SHAP: tests regions
- EPI workbooks → Regional SHAP: supplies target
- Predictor data → Regional SHAP: supplies features
- Researcher → Index robustness SHAP: tests robustness
- Alternate index results → Index robustness SHAP: supplies alternate targets
- Predictor data → Index robustness SHAP: supplies features
- LSTM SHAP → SHAP evidence: supports interpretation
- Regional SHAP → SHAP evidence: supports interpretation
- Index robustness SHAP → SHAP evidence: supports interpretation
- Researcher → TWFE analysis: runs panel analysis
- EPI workbooks → TWFE analysis: supplies outcome
- Predictor data → TWFE analysis: supplies lagged predictors
- TWFE analysis → TWFE results: writes estimates
- SHAP evidence → Research results: contributes evidence
- TWFE results → Research results: contributes estimates
- Benchmark results → Research results: contributes metrics
