问题一:降水量与土地利用/覆被类型的时空演化特征
# 导入必要的库
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import geopandas as gpd
# 1. 降水量数据分析
# 读取降水量数据,假设数据为CSV格式,包含列:年份、地点、降水量
rainfall_data = pd.read_csv('rainfall_1990_2020.csv')
# 按年份计算全国平均降水量,最大值,最小值,标准差
rainfall_stats = rainfall_data.groupby('year')['rainfall'].agg(['mean', 'std', 'max', 'min'])
# 生成折线图展示时间演化特征
plt.figure(figsize=(10,6))
plt.plot(rainfall_stats.index, rainfall_stats['mean'], label='Mean Rainfall')
plt.fill_between(rainfall_stats.index, rainfall_stats['min'], rainfall_stats['max'], color='b