制作中国汽车市场产销分析可视化仪表盘。数据来源为 akshare(CPCA乘联会厂商排名接口)。
接口说明akshare.car_market_man_rank_cpcaCPCA乘联会·厂商排名(狭义/广义乘用车)
支持 产量、 批发、 零售 三种口径,支持单月和累计模式。
bash
# 产量 YTD(1-2月累计)
python3 china_auto_dashboard.py --year 2026 --start-month 1 --end-month 2 --type 产量
# 单月批发销量(2月)
python3 china_auto_dashboard.py --year 2026 --start-month 2 --end-month 2 --type 批发销量
# 零售销量(Q1累计)
python3 china_auto_dashboard.py --year 2026 --start-month 1 --end-month 3 --type 零售销量
# 全年累计
python3 china_auto_dashboard.py --year 2025 --start-month 1 --end-month 12 --type 产量
参数说明:
参数说明--year目标年份(默认 2026)--start-month起始月份(默认 1)--end-month结束月份(默认 2)--type``产量 / 批发销量 / 零售销量``--scope``狭义乘用车(默认)/ 广义乘用车``--output输出图片路径
bash
pip install akshare pandas matplotlib numpy
# 中文字体(如需显示中文)
# Linux: apt install fonts-noto-cjk fonts-wqy-microhei
text
┌─────────────────────────────────────────────────────────────┐
│ KPI卡1: 总量(YTD) │ 基准去年 │ 冠军 │ 增速王 │ 跌幅王 │
├────────────────────────────┬────────────────────────────────┤
│ Top N 厂商排行条形图 │ 同比变化(万辆 + %) │
│ 彩色=当年 灰色=去年 │ 红=增长 绿=下降 │
├────────────────────────────┴────────────────────────────────┤
│ 产量 vs 批发 vs 零售 三维对比(底部) │
└─────────────────────────────────────────────────────────────┘
text
china-auto-analysis/
├── SKILL.md ← 本文件
└── china_auto_dashboard.py ← 核心可视化脚本