Skip to content

Data Exploration and Analysis

zhouning edited this page Mar 22, 2026 · 1 revision

数据探索与空间分析指南

GIS Data Agent v14.5 — 基于 Google ADK 的 AI 地理空间平台 仓库:https://github.com/zhouning/gisdataagent

数据探索

数据质量概览

上传数据后,使用 describe_geodataframe 获取完整的数据质量概要:

  • 坐标参考系 (CRS):识别并验证投影信息
  • 空值分析:每个字段的空值数量与比例
  • 重复检测:几何和属性层面的重复要素统计
  • 几何问题:无效几何、自相交、空几何等
  • 统计摘要:数值字段的均值、中位数、标准差、分位数

示例提示词:

请描述一下这个数据集的质量情况
Describe the quality profile of this dataset

空间分析工具

基础空间操作

工具 功能 示例提示词
缓冲区分析 生成指定距离的缓冲区 对学校点做500米缓冲区
叠加分析 交集、并集、差集运算 求两个图层的交集
裁剪 按边界裁剪数据 用行政区边界裁剪土地利用数据
分区统计 按区域聚合统计值 按街道统计平均房价
热力图 点密度可视化 生成犯罪事件热力图
聚类分析 空间聚类(DBSCAN/K-means) 对POI点进行空间聚类
邻近分析 K近邻、距离矩阵 找出每个学校最近的3个医院

空间统计分析

探索性空间数据分析 (ESDA)

方法 说明 适用场景
Moran's I 全局空间自相关指数 判断数据是否存在空间聚集模式
LISA 局部空间自相关指标 识别高-高、低-低、高-低、低-高聚类
Getis-Ord Gi* 热点/冷点分析 发现统计显著的热点和冷点区域

示例提示词:

计算房价的Moran's I指数
对人口密度做热点分析
Perform a hotspot analysis on population density

高级分析

时间序列预测

对时空数据进行趋势分析和预测:

预测未来3个月的NDVI变化趋势
Forecast NDVI trends for the next 3 months

假设分析 (What-If)

模拟参数变化对空间指标的影响:

如果容积率提高20%,对交通拥堵有什么影响?
What if we increase building density by 20%?

网络分析

中心性分析、可达性评估:

计算道路网络的介数中心性
Analyze road network betweenness centrality

可达性分析

评估设施服务覆盖范围:

分析医院的15分钟步行可达范围
Analyze 15-minute walking accessibility to hospitals

遥感分析

功能 说明 示例提示词
NDVI 归一化植被指数 计算这幅影像的NDVI
DEM 分析 数字高程模型:坡度、坡向、山影 分析DEM的坡度分布
LULC 分类 土地利用/土地覆盖分类 对遥感影像进行土地利用分类

DRL 优化引擎

使用 MaskablePPO(来自 sb3_contrib)进行土地利用布局优化:

  • 自定义环境ParcelScoringPolicy 评估用地方案
  • 优化目标:通过配对农田↔林地置换最小化碎片化,同时保持面积平衡
  • 5 种优化场景:支持不同约束条件下的用地规划
  • 模型权重scorer_weights_v7.pt 预训练权重

示例提示词:

优化这个区域的土地利用布局
Optimize the land use layout for this area

多源数据融合

10 种融合策略,支持跨格式、跨来源的数据整合:

策略 说明
spatial_join 基于空间关系的连接
attribute_join 基于属性字段的连接
zonal_stats 分区统计融合
overlay_union 叠加并集
overlay_intersection 叠加交集
nearest_join 最近邻连接
temporal_join 时间窗口连接
hierarchical_merge 层级聚合融合
feature_enrichment 要素属性增强
conflict_resolution 冲突消解融合

融合执行支持 PostGIS 下推 加速大规模空间运算。

示例提示词:

将人口数据与行政区划数据基于空间位置融合
Fuse population data with admin boundaries using spatial join

Data Exploration and Analysis Guide

GIS Data Agent v14.5 — AI geospatial platform on Google ADK Repository: https://github.com/zhouning/gisdataagent

Data Exploration

Data Quality Profile

After uploading data, use describe_geodataframe to get a full quality profile:

  • CRS (Coordinate Reference System): Identify and validate projection info
  • Null analysis: Null count and ratio for each field
  • Duplicate detection: Duplicate feature statistics at geometry and attribute levels
  • Geometry issues: Invalid geometry, self-intersections, empty geometry, etc.
  • Statistical summary: Mean, median, standard deviation, and quantiles for numeric fields

Example prompts:

请描述一下这个数据集的质量情况
Describe the quality profile of this dataset

Spatial Analysis Tools

Basic Spatial Operations

Tool Function Example Prompt
Buffer Generate buffers at a specified distance Create a 500m buffer around schools
Overlay Intersection, union, difference operations Find the intersection of these two layers
Clip Clip data by boundary Clip land use data by admin boundary
Zonal statistics Aggregate statistics by zone Calculate average housing price by district
Heatmap Point density visualization Generate a crime incident heatmap
Clustering Spatial clustering (DBSCAN/K-means) Cluster POI points spatially
Nearest neighbors KNN, distance matrix Find the 3 nearest hospitals for each school

Spatial Statistical Analysis

Exploratory Spatial Data Analysis (ESDA)

Method Description Use Case
Moran's I Global spatial autocorrelation index Determine if data exhibits spatial clustering patterns
LISA Local Indicators of Spatial Association Identify High-High, Low-Low, High-Low, Low-High clusters
Getis-Ord Gi* Hotspot/Coldspot analysis Find statistically significant hot and cold spots

Example prompts:

计算房价的Moran's I指数
Perform a hotspot analysis on population density

Advanced Analysis

Time Series Forecasting

Perform trend analysis and forecasting on spatiotemporal data:

预测未来3个月的NDVI变化趋势
Forecast NDVI trends for the next 3 months

What-If Analysis

Simulate the impact of parameter changes on spatial metrics:

如果容积率提高20%,对交通拥堵有什么影响?
What if we increase building density by 20%?

Network Analysis

Centrality analysis, accessibility assessment:

计算道路网络的介数中心性
Analyze road network betweenness centrality

Accessibility Analysis

Evaluate facility service coverage:

分析医院的15分钟步行可达范围
Analyze 15-minute walking accessibility to hospitals

Remote Sensing

Feature Description Example Prompt
NDVI Normalized Difference Vegetation Index Calculate NDVI for this image
DEM analysis Digital Elevation Model: slope, aspect, hillshade Analyze slope distribution from DEM
LULC classification Land Use / Land Cover classification Classify land use from remote sensing imagery

DRL Optimization Engine

Land-use layout optimization using MaskablePPO (from sb3_contrib):

  • Custom environment: ParcelScoringPolicy evaluates land-use plans
  • Optimization goal: Minimize fragmentation via paired farmland-forest swaps while maintaining area balance
  • 5 optimization scenarios: Support different constraint conditions for land planning
  • Model weights: Pre-trained weights from scorer_weights_v7.pt

Example prompts:

优化这个区域的土地利用布局
Optimize the land use layout for this area

Multi-Source Data Fusion

10 fusion strategies supporting cross-format, cross-source data integration:

Strategy Description
spatial_join Join based on spatial relationships
attribute_join Join based on attribute fields
zonal_stats Zonal statistics fusion
overlay_union Overlay union
overlay_intersection Overlay intersection
nearest_join Nearest neighbor join
temporal_join Temporal window join
hierarchical_merge Hierarchical aggregation fusion
feature_enrichment Feature attribute enrichment
conflict_resolution Conflict resolution fusion

Fusion execution supports PostGIS push-down for accelerating large-scale spatial operations.

Example prompts:

将人口数据与行政区划数据基于空间位置融合
Fuse population data with admin boundaries using spatial join

Clone this wiki locally