gini_data <- data.frame(
年份 = c(2003,2005,2007,2008,2009,2010,2011,2012,2013,2014,2015,
2016,2017,2018,2019,2020,2021,2022,2023),
基尼系数 = c(0.479,0.485,0.484,0.491,0.490,0.481,0.477,0.474,0.473,
0.469,0.462,0.465,0.467,0.468,0.465,0.468,0.466,0.467,0.468)
)
p <- ggplot(gini_data, aes(x = 年份, y = 基尼系数)) +
geom_line(color = "#1a3a5c", linewidth = 1.3) +
geom_point(color = "#1a3a5c", size = 3) +
geom_hline(yintercept = 0.4, linetype = "dashed", color = "#c55a11", linewidth = 0.8) +
geom_hline(yintercept = 0.5, linetype = "dashed", color = "#843c0c", linewidth = 0.8) +
annotate("text", x = 2003.5, y = 0.398, label = "国际警戒线 0.4",
color = "#c55a11", size = 3.5, hjust = 0, family = "PingFang SC") +
annotate("text", x = 2003.5, y = 0.498, label = "高度不平等线 0.5",
color = "#843c0c", size = 3.5, hjust = 0, family = "PingFang SC") +
annotate("rect", xmin = 2012, xmax = 2023, ymin = 0.455, ymax = 0.475,
fill = "#375623", alpha = 0.1) +
annotate("text", x = 2017.5, y = 0.472, label = "2012年后缓慢下降阶段",
size = 3.2, color = "#375623", family = "PingFang SC") +
scale_x_continuous(breaks = seq(2003, 2023, 2)) +
scale_y_continuous(limits = c(0.39, 0.51)) +
labs(title = "中国居民收入基尼系数:2003—2023年",
subtitle = "长期高于0.4的国际警戒线,2008年后缓慢回落,但仍处于较高水平",
x = NULL, y = "基尼系数",
caption = "数据来源:国家统计局历年住户调查数据")
ggplotly(p, tooltip = c("x","y"))