---
title: "中国、澳大利亚、阿鲁巴甲烷排放时空分析与未来30年预测"
author: "李淑慧、余瑞、覃紫慧"
date: "2026-04-05"
format:
html:
toc: true
toc-depth: 3
theme: cosmo
embed-resources: true
code-fold: false
code-tools: true
---
<style>
/* 图片自适应宽度,防止溢出 */
img {
max-width: 100% !important;
height: auto !important;
}
figure img {
max-width: 100% !important;
height: auto !important;
}
/* Quarto 生成的图表容器 */
.cell-output-display img {
max-width: 100% !important;
height: auto !important;
}
figure {
max-width: 100% !important;
overflow: hidden;
}
</style>
> 📦 **源代码**: [GitHub 仓库](https://github.com/6622339/662)
# 1 研究背景
甲烷(CH₄)是仅次于二氧化碳的第二大温室气体,其全球增温潜势(GWP)在100年时间尺度上是CO₂的28倍。理解不同国家甲烷排放的时空特征及其驱动因素,对于制定差异化的减排政策至关重要。
本研究选取三个具有代表性的国家进行对比分析:
- **中国**:全球最大的发展中国家,经济快速增长与排放控制并行
- **澳大利亚**:成熟的发达经济体,能源密集型产业结构
- **阿鲁巴**:加勒比海小型岛国,经济体量极小
# 2 数据来源
## 2.1 甲烷排放数据
采用 EDGAR(Emissions Database for Global Atmospheric Research)v8.0 数据集,包含2005-2024年各国甲烷排放总量(单位:kt)。
```{python}
#| label: data-loading
#| message: false
import pandas as pd
import numpy as np
# 读取处理后的合并数据
import os
# Quarto 从 docs/ 目录运行,数据在上级目录
data_path = os.path.join("..", "data", "processed", "methane_clean.csv")
df = pd.read_csv(data_path)
print(f"数据维度: {df.shape}")
print(f"覆盖国家: {df['country'].unique()}")
print(f"年份范围: {df['year'].min()} - {df['year'].max()}")
print(f"\n数据预览:")
df.head(10)
```
## 2.2 社会经济数据
从世界银行(World Bank)获取同期GDP和人口数据,用于分析排放驱动因素。
## 2.3 数据处理
原始数据为宽表格式(年份为列),需转换为长表格式进行分析:
```{python}
#| label: data-preprocessing
#| code-fold: true
#| code-summary: "数据预处理代码"
# 数据清洗:去除空值和异常值
df_clean = df.dropna(subset=["ch4", "gdp", "pop"])
df_clean = df_clean[(df_clean["gdp"] > 0) & (df_clean["pop"] > 0) & (df_clean["ch4"] > 0)]
# 计算衍生指标
df_clean["ch4_intensity"] = df_clean["ch4"] / df_clean["gdp"] # 排放强度(kt/单位GDP)
df_clean["gdp_per_capita"] = df_clean["gdp"] / df_clean["pop"] # 人均GDP
print(f"清洗后数据量: {len(df_clean)} 行")
print(f"\n数据统计摘要:")
df_clean[["ch4", "gdp", "pop"]].describe()
```
# 3 研究方法
## 3.1 描述性统计分析
对三国甲烷排放进行时间序列可视化,分析2005-2024年的排放趋势。
```{python}
#| label: fig-trend
#| fig-cap: "2005-2024年三国甲烷排放历史趋势对比"
#| fig-width: 10
#| fig-height: 5
import matplotlib.pyplot as plt
# 使用系统可用的中文字体
plt.rcParams["font.sans-serif"] = ["Noto Sans CJK SC", "AR PL UMing CN", "DejaVu Sans"]
plt.rcParams["axes.unicode_minus"] = False
fig, ax = plt.subplots(figsize=(10, 5))
colors = ["#E53E3E", "#3182CE", "#38A169"]
countries = ["China", "Australia", "Aruba"]
for idx, country in enumerate(countries):
data = df_clean[df_clean["country"] == country]
ax.plot(data["year"], data["ch4"], marker="o", linewidth=2.5,
color=colors[idx], label=country)
ax.set_title("2005-2024年三国甲烷排放趋势", fontsize=14, pad=15)
ax.set_xlabel("年份", fontsize=12)
ax.set_ylabel("甲烷排放量 (kt)", fontsize=12)
ax.grid(True, linestyle="--", alpha=0.7)
ax.legend(fontsize=11)
plt.tight_layout()
plt.show()
```
## 3.2 ARIMA时间序列预测
采用ARIMA(1,1,1)模型对未来30年(2025-2054)甲烷排放进行预测,模型参数说明:
- **AR(1)**:自回归项,捕捉排放的持续性
- **I(1)**:差分阶数,处理非平稳性
- **MA(1)**:移动平均项,平滑随机波动
```{python}
#| label: fig-arima
#| fig-cap: "ARIMA模型预测:2005-2054年甲烷排放趋势(含95%置信区间)"
#| fig-width: 10
#| fig-height: 6
from statsmodels.tsa.arima.model import ARIMA
import warnings
warnings.filterwarnings("ignore")
future_years = np.arange(2025, 2055)
fig, ax = plt.subplots(figsize=(10, 6))
for idx, country in enumerate(countries):
# 提取历史数据
data = df_clean[df_clean["country"] == country].sort_values("year")
ts = data.set_index("year")["ch4"]
# 训练ARIMA模型
model = ARIMA(ts, order=(1,1,1))
result = model.fit()
# 预测未来30年
forecast = result.get_forecast(steps=30)
pred_mean = forecast.predicted_mean
pred_ci = forecast.conf_int()
# 绘制历史+预测+置信区间
ax.plot(ts.index, ts.values, marker="o", linewidth=2,
color=colors[idx], label=f"{country} 历史排放")
ax.plot(future_years, pred_mean, linestyle="--", linewidth=2,
color=colors[idx], label=f"{country} ARIMA预测")
ax.fill_between(future_years, pred_ci.iloc[:,0], pred_ci.iloc[:,1],
color=colors[idx], alpha=0.2)
ax.set_title("ARIMA模型预测:2005-2054年甲烷排放趋势", fontsize=14, pad=15)
ax.set_xlabel("年份", fontsize=12)
ax.set_ylabel("甲烷排放量 (kt)", fontsize=12)
ax.grid(True, linestyle="--", alpha=0.7)
ax.legend(fontsize=10, bbox_to_anchor=(1.02, 1), loc="upper left")
plt.tight_layout()
plt.show()
```
## 3.3 相关性分析
采用皮尔逊相关系数(Pearson correlation coefficient)量化甲烷排放与GDP、人口的线性关联强度。
```{python}
#| label: fig-correlation
#| fig-cap: "甲烷排放与GDP、人口的相关性散点图"
#| fig-width: 12
#| fig-height: 5
from scipy.stats import pearsonr
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 5))
# 子图1:甲烷 vs 人口
for idx, country in enumerate(countries):
data = df_clean[df_clean["country"] == country]
corr, p = pearsonr(data["pop"], data["ch4"])
ax1.scatter(data["pop"], data["ch4"], color=colors[idx],
label=f"{country} (r={corr:.3f})", s=60, alpha=0.8)
ax1.set_title("甲烷排放与人口相关性", fontsize=13, pad=10)
ax1.set_xlabel("人口 (百万)", fontsize=11)
ax1.set_ylabel("甲烷排放量 (kt)", fontsize=11)
ax1.grid(True, linestyle="--", alpha=0.7)
ax1.legend(fontsize=10)
# 子图2:甲烷 vs GDP
for idx, country in enumerate(countries):
data = df_clean[df_clean["country"] == country]
corr, p = pearsonr(data["gdp"], data["ch4"])
ax2.scatter(data["gdp"], data["ch4"], color=colors[idx],
label=f"{country} (r={corr:.3f})", s=60, alpha=0.8)
ax2.set_title("甲烷排放与GDP相关性", fontsize=13, pad=10)
ax2.set_xlabel("GDP (万亿美元)", fontsize=11)
ax2.set_ylabel("甲烷排放量 (kt)", fontsize=11)
ax2.grid(True, linestyle="--", alpha=0.7)
ax2.legend(fontsize=10)
plt.tight_layout()
plt.show()
```
```{python}
#| label: fig-heatmap
#| fig-cap: "甲烷排放、GDP、人口相关性热力图"
#| fig-width: 6
#| fig-height: 5
import seaborn as sns
corr_data = df_clean[["ch4", "gdp", "pop"]]
corr_matrix = corr_data.corr()
plt.figure(figsize=(6, 5))
sns.heatmap(corr_matrix, annot=True, cmap="coolwarm", vmin=-1, vmax=1,
linewidths=0.5, fmt=".2f")
plt.title("相关性热力图", fontsize=13, pad=15)
plt.tight_layout()
plt.show()
# 打印相关系数
print("皮尔逊相关系数:")
print(f" 甲烷 vs GDP: r = {corr_matrix.loc['ch4', 'gdp']:.3f}")
print(f" 甲烷 vs 人口: r = {corr_matrix.loc['ch4', 'pop']:.3f}")
print(f" GDP vs 人口: r = {corr_matrix.loc['gdp', 'pop']:.3f}")
```
## 3.4 人均排放分析
人均甲烷排放量可更公平地反映各国排放责任,计算公式:
$$\text{人均排放} = \frac{\text{甲烷排放总量 (kt)} \times 1000}{\text{人口 (人)}}$$
```{python}
#| label: fig-percapita
#| fig-cap: "2005-2024年三国人均甲烷排放对比"
#| fig-width: 10
#| fig-height: 5
# 计算人均排放(吨/人)
df_clean["per_capita"] = (df_clean["ch4"] * 1000) / df_clean["pop"]
markers = ["o", "s", "^"]
fig, ax = plt.subplots(figsize=(10, 5))
for country, color, marker in zip(countries, colors, markers):
data = df_clean[df_clean["country"] == country]
ax.plot(data["year"], data["per_capita"], label=country,
color=color, marker=marker, linewidth=2.5, markersize=6)
ax.set_title("2005-2024年三国人均甲烷排放对比", fontsize=14, pad=15)
ax.set_xlabel("年份", fontsize=12)
ax.set_ylabel("人均甲烷排放量 (吨/人)", fontsize=12)
ax.legend(fontsize=11)
ax.grid(alpha=0.3, linestyle="--")
plt.tight_layout()
plt.show()
```
# 4 研究结果
## 4.1 排放趋势分析
从2005-2024年的历史数据来看:
| 国家 | 排放特征 | 趋势描述 |
|------|----------|----------|
| 中国 | 排放总量最高 | 呈缓慢上升趋势,2010年后增速放缓 |
| 澳大利亚 | 排放量中等 | 长期保持平稳,波动较小 |
| 阿鲁巴 | 排放极低 | 接近零排放,无显著变化 |
## 4.2 驱动因素分析
相关性分析表明:
- **甲烷排放与GDP**:r = 0.92(极强正相关),表明经济规模是排放增长的核心驱动力
- **甲烷排放与人口**:r = 0.84(强正相关),人口规模对排放有显著影响
- **GDP与人口**:r = 0.84(强正相关),经济发展与人口增长高度同步
## 4.3 人均排放公平性
人均排放指标揭示了不同的排放责任:
- **澳大利亚**人均排放最高,反映发达国家高能耗生活方式
- **中国**人均排放较低,但总量巨大,体现发展中大国的双重特征
- **阿鲁巴**人均排放接近零,小岛屿发展中国家的排放可忽略不计
## 4.4 未来预测
ARIMA模型预测显示(2025-2054年):
- **中国**:排放保持缓慢上升,增速逐步放缓,反映减排政策逐步见效
- **澳大利亚**:排放基本平稳,无明显增长趋势
- **阿鲁巴**:维持极低排放水平,对全球减排贡献有限
# 5 结论与建议
## 5.1 主要结论
1. 三国甲烷排放水平差异显著,核心受**国家规模、经济发展水平、人口总量**三大因素影响
2. 经济发展是甲烷排放增长的最核心驱动力(r = 0.92)
3. 人均排放指标更适合用于国际排放公平性比较
4. 未来30年,中国排放将缓慢上升,澳大利亚与阿鲁巴保持稳定
## 5.2 政策建议
- **发展中国家**(如中国):需在经济增长中推进减排,提高能源利用效率
- **发达国家**(如澳大利亚):应依托技术优势深化减排,提供资金和技术支持
- **小岛屿国家**(如阿鲁巴):重点适应气候变化,减少脆弱性
# 6 复现指南
## 6.1 环境配置
```bash
# 创建虚拟环境
cd 662
uv venv .venv
source .venv/bin/activate
# 安装依赖
uv pip install -r requirement.txt
```
## 6.2 数据预处理
```bash
# 宽表转长表
python src/00_convert_wide_to_long.py
python src/00_worldbank_to_wide.py
# 数据合并与清洗
python src/01_data.py
```
## 6.3 生成分析结果
```bash
# 历史排放趋势
python src/02_ch4_trend.py
# ARIMA预测
python src/03_ch4_forecast_arima.py
# 相关性散点图
python src/04_ch4_correlation.py
# 人均排放对比
python src/05_per_capita_ch4.py
# 相关性热力图
python src/06_correlation_heatmap.py
```
## 6.4 生成报告
```bash
quarto render docs/report.qmd --to html
```
# 7 团队分工
| 成员 | 学号 | 负责内容 |
|------|------|----------|
| 李淑慧 | 2025303110033 | 数据预处理、可视化绘图 |
| 余瑞 | 2025303120005 | 数据分析、甲烷排放趋势图 |
| 覃紫慧 | 2025303120142 | 报告撰写、相关性分析 |
# 8 参考文献
1. EDGAR v8.0 - Emissions Database for Global Atmospheric Research. https://edgar.jrc.ec.europa.eu/
2. World Bank Open Data. https://data.worldbank.org/
3. Box, G.E.P., Jenkins, G.M. (1970). Time Series Analysis: Forecasting and Control. Holden-Day.