city-compare

city-compare: A multi-dimensional economic comparison and diagnostic tool for 50 Chinese cities, covering eight dimensions (economic scale, growth, fiscal, income, consumption, industry, openness, public services). Supports K-means clustering, radar charts, and a Streamlit interactive dashboard. Used when comparing city economic strength or conducting city-selection analysis.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "city-compare" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-286346b78caec90002b18e4b21f3acb94ff7bf6cefcc4a5607b8301132269d17. Verify the upstream source and version against https://skillhub.cn/skills/user_053d27d0/city-compare-zx before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

city-compare: A multi-dimensional economic comparison and diagnostic tool for 50 Chinese cities, covering eight dimensions (economic scale, growth, fiscal, income, consumption, industry, openness, public services). Supports K-means clustering, radar charts, and a Streamlit interactive dashboard. Used when comparing city economic strength or conducting city-selection analysis.

0 Downloads

Introduction source: third_party · user_053d27d0 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: city-compare
description: >
  中国 50 城经济多维对比诊断工具,覆盖 8 个维度(经济规模/增长/财政/收入/消费/工业/开放/公共服务),
  支持 K-means 聚类、雷达图与 Streamlit 交互仪表板。当用户需要对比城市经济实力、城市选择分析时调用。

city-compare -- 中国城市经济多维对比诊断

能力边界

支持的操作:

  • 50 个中国主要城市的经济数据查询(直辖市、省会、计划单列市、GDP 前列地级市)
  • 8 个经济维度指标对比:经济规模、增长动能、财政收入、居民收入、消费活力、工业实力、对外开放、公共服务
  • 多城市雷达图叠加对比(基于 Plotly,交互式悬停/缩放/导出)
  • 各维度排名条形图
  • 8 个维度间的相关性热力图矩阵
  • K-means 城市聚类分析(自动分组相似城市)
  • PCA 降维散点图(揭示城市群分布模式)
  • 城市差距分析(多城市在同一维度上的相对差距可视化)
  • Streamlit Web 交互式仪表板应用
  • 综合得分排名表(加权综合评分)

不支持的操作:

  • 房价、学区、宜居度等居住类指标
  • 实时交通拥堵、环境污染等高频传感器数据
  • 全球城市跨国对比
  • 城市人口迁徙、通勤等空间数据
  • 时间序列分析(仅有横截面数据)
  • 自定义维度或指标权重(使用内置权重方案)

触发条件

当用户提出以下意图时触发本 Skill:

  • "比较北京、上海、深圳、广州的经济数据"
  • "哪些城市经济增长最快"
  • "城市经济雷达图对比"
  • "中国城市聚类分析"
  • "分析城市经济结构差异"
  • "城市选择决策辅助"、"去哪个城市发展"
  • 任何涉及中国城市经济数据对比、多维度评估的需求

使用方法

# 启动 Streamlit Web 应用
streamlit run app.py

# 运行演示脚本
python examples/demo.py

Streamlit 应用操作流程:

  1. 在左侧边栏选择 2-5 个城市
  2. 右侧主区域自动展示:综合排名表、雷达图叠加对比、维度排名条形图
  3. 切换 Tab 可查看:相关性热力图、聚类散点图、差距分析

输出示例

综合排名 (加权评分):
─────────────────────────────────────────────
排名  城市    综合得分  经济规模  增长动能  ...
─────────────────────────────────────────────
 1    上海     92.1      98.3     85.2    ...
 2    北京     90.7      95.8     82.1    ...
 3    深圳     88.4      90.2     91.5    ...
 4    广州     82.6      85.1     78.3    ...
 5    苏州     79.3      82.4     80.1    ...
...

雷达图 (Plotly 交互式):
  [8 维度雷达图,多城市叠加,不同颜色区分]

聚类结果 (K-means, k=4):
  群组 A (一线综合型): 北京, 上海, 深圳, 广州
  群组 B (工业导向型): 苏州, 无锡, 东莞, 佛山...
  群组 C (区域中心型): 成都, 武汉, 南京, 杭州...
  群组 D (特色发展型): ...

FAQ

Q1: 数据来源是什么? 数据通过 akshare 实时获取(优先在线),失败时回退到项目内置的 config/cities.yaml 静态数据。数据源涵盖各城市统计年鉴/统计公报的公开数据。

Q2: 覆盖哪些城市? 覆盖 50 个主要城市:4 个直辖市、27 个省会/首府、5 个计划单列市,以及部分 GDP 排名前列的地级市(如苏州、无锡、佛山、东莞等)。

Q3: 8 个维度各包含哪些具体指标? 经济规模(GDP 总量)、增长动能(GDP 增速/固定资产投资增速)、财政收入(一般公共预算收入)、居民收入(人均可支配收入)、消费活力(社会消费品零售总额)、工业实力(规上工业增加值)、对外开放(进出口总额/实际利用外资)、公共服务(一般公共预算支出/人均医疗等)。

Q4: 综合得分是如何计算的? 各维度原始数据经过 Min-Max 归一化后,按等权重加总得到综合得分。8 个维度在综合评分中权重相等。

Q5: K-means 聚类有什么用? 帮助自动识别城市类型分组(如一线综合型、工业导向型、区域中心型等),理解不同城市的发展模式差异,为城市比较和政策研究提供参考框架。

技术栈

  • 语言: Python 3.9+
  • Web 框架: Streamlit(交互式仪表板)
  • 数据源: akshare(实时在线获取),config/cities.yaml(静态降级数据)
  • 科学计算: NumPy, Pandas, scikit-learn(K-means 聚类、PCA、StandardScaler)
  • 可视化: Plotly(雷达图、柱状图、热力图、散点图)、Plotly Express
  • 核心模块: city_compare/ (fetcher, radar, report)
  • 入口: app.py (Streamlit)、examples/demo.py (脚本演示)

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 覆盖50个中国主要城市,8个经济维度指标对比,实用性强
  • 支持K-means聚类、雷达图与Streamlit交互仪表板,功能完整
  • 适用于城市经济实力对比、城市选择分析等高频刚需场景
Trigger Precision90/100

Highlights

  • 触发词精准完整,覆盖多种变体,边界清晰
  • 支持多城市对比、聚类分析、雷达图等多种查询意图
Structure and Standards90/100

Highlights

  • Phase/步骤清晰,有出口条件,含端到端示例
  • frontmatter完整,单文件≤500行,结构规范
Execution Reliability85/100

Highlights

  • 工具来源明确,参数正确,覆盖主要异常
  • 不可逆操作有确认机制,执行可靠性良好
Evidence Verifiability (mean of the first four)89/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.