重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
geo-visualizer by dkyazzentwatwa/chatgpt-skills
npx skills add https://github.com/dkyazzentwatwa/chatgpt-skills --skill geo-visualizer使用 Folium 从地理数据创建交互式 HTML 地图。
from geo_visualizer import GeoVisualizer
# 简单标记地图
viz = GeoVisualizer()
viz.add_markers([
{"lat": 40.7128, "lon": -74.0060, "name": "New York"},
{"lat": 34.0522, "lon": -118.2437, "name": "Los Angeles"}
])
viz.save("cities.html")
# 从 CSV 文件
viz = GeoVisualizer()
viz.from_csv("locations.csv", lat_col="latitude", lon_col="longitude")
viz.save("map.html")
# 从 CSV 绘制标记
python geo_visualizer.py --input locations.csv --lat latitude --lon longitude --output map.html
# 添加热力图
python geo_visualizer.py --input data.csv --lat lat --lon lng --heatmap --output heat.html
# 带聚类功能
python geo_visualizer.py --input stores.csv --lat lat --lon lon --cluster --output stores.html
# 等值区域图
python geo_visualizer.py --geojson states.geojson --data stats.csv --key state --value population --output choropleth.html
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
class GeoVisualizer:
def __init__(self, center=None, zoom=10, tiles="OpenStreetMap")
# 数据加载
def from_csv(self, filepath, lat_col, lon_col, **kwargs) -> 'GeoVisualizer'
def from_dataframe(self, df, lat_col, lon_col, **kwargs) -> 'GeoVisualizer'
def from_geojson(self, filepath) -> 'GeoVisualizer'
# 标记
def add_marker(self, lat, lon, popup=None, tooltip=None, icon=None, color="blue")
def add_markers(self, locations: list, name_col=None, popup_cols=None)
def cluster_markers(self, enabled=True) -> 'GeoVisualizer'
# 图层
def add_heatmap(self, points=None, weight_col=None, radius=15) -> 'GeoVisualizer'
def add_choropleth(self, geojson, data, key_on, value_col, **kwargs) -> 'GeoVisualizer'
def add_route(self, points, color="blue", weight=3) -> 'GeoVisualizer'
def add_circle(self, lat, lon, radius_m, color="blue", fill=True)
# 输出
def save(self, filepath) -> str
def get_html(self) -> str
def fit_bounds(self) -> 'GeoVisualizer'
# 自定义图标
viz.add_marker(lat, lon, icon="fa-coffee", color="red")
# 带弹出内容
viz.add_marker(lat, lon, popup="<b>Store #123</b><br>Open 9-5")
# 从 CSV 文件,带弹出列
viz.from_csv("stores.csv", lat_col="lat", lon_col="lon")
viz.add_markers(viz.data, popup_cols=["name", "address", "phone"])
# 基础热力图
viz.add_heatmap()
# 加权热力图(例如,按销售额)
viz.add_heatmap(weight_col="sales", radius=20, blur=15, max_zoom=12)
# 根据数据为区域着色
viz.add_choropleth(
geojson="us-states.geojson",
data=state_data,
key_on="feature.properties.name", # GeoJSON 属性
value_col="population",
fill_color="YlOrRd", # 颜色比例尺
legend_name="Population"
)
可用的底图:
OpenStreetMap (默认)
CartoDB positron (浅色,简约)
CartoDB dark_matter (深色主题)
Stamen Terrain (地形特征)
Stamen Toner (高对比度黑白图)
viz = GeoVisualizer(tiles="CartoDB positron")
viz = GeoVisualizer()
viz.from_csv("stores.csv", lat_col="lat", lon_col="lon")
viz.add_markers(viz.data, popup_cols=["name", "address", "hours"])
viz.cluster_markers(True)
viz.fit_bounds()
viz.save("store_locator.html")
viz = GeoVisualizer(tiles="CartoDB dark_matter")
viz.from_csv("sales.csv", lat_col="lat", lon_col="lon")
viz.add_heatmap(weight_col="revenue", radius=25)
viz.save("sales_heat.html")
viz = GeoVisualizer()
stops = [(40.7, -74.0), (40.8, -73.9), (40.75, -73.95)]
viz.add_route(stops, color="blue", weight=4)
for i, (lat, lon) in enumerate(stops):
viz.add_marker(lat, lon, popup=f"Stop {i+1}")
viz.save("route.html")
每周安装量
55
代码仓库
GitHub 星标数
38
首次出现
2026年1月24日
安全审计
安装于
gemini-cli45
opencode44
codex42
cursor42
github-copilot39
claude-code37
Create interactive HTML maps from geographic data using Folium.
from geo_visualizer import GeoVisualizer
# Simple marker map
viz = GeoVisualizer()
viz.add_markers([
{"lat": 40.7128, "lon": -74.0060, "name": "New York"},
{"lat": 34.0522, "lon": -118.2437, "name": "Los Angeles"}
])
viz.save("cities.html")
# From CSV
viz = GeoVisualizer()
viz.from_csv("locations.csv", lat_col="latitude", lon_col="longitude")
viz.save("map.html")
# Plot markers from CSV
python geo_visualizer.py --input locations.csv --lat latitude --lon longitude --output map.html
# Add heatmap
python geo_visualizer.py --input data.csv --lat lat --lon lng --heatmap --output heat.html
# With clustering
python geo_visualizer.py --input stores.csv --lat lat --lon lon --cluster --output stores.html
# Choropleth map
python geo_visualizer.py --geojson states.geojson --data stats.csv --key state --value population --output choropleth.html
class GeoVisualizer:
def __init__(self, center=None, zoom=10, tiles="OpenStreetMap")
# Data loading
def from_csv(self, filepath, lat_col, lon_col, **kwargs) -> 'GeoVisualizer'
def from_dataframe(self, df, lat_col, lon_col, **kwargs) -> 'GeoVisualizer'
def from_geojson(self, filepath) -> 'GeoVisualizer'
# Markers
def add_marker(self, lat, lon, popup=None, tooltip=None, icon=None, color="blue")
def add_markers(self, locations: list, name_col=None, popup_cols=None)
def cluster_markers(self, enabled=True) -> 'GeoVisualizer'
# Layers
def add_heatmap(self, points=None, weight_col=None, radius=15) -> 'GeoVisualizer'
def add_choropleth(self, geojson, data, key_on, value_col, **kwargs) -> 'GeoVisualizer'
def add_route(self, points, color="blue", weight=3) -> 'GeoVisualizer'
def add_circle(self, lat, lon, radius_m, color="blue", fill=True)
# Output
def save(self, filepath) -> str
def get_html(self) -> str
def fit_bounds(self) -> 'GeoVisualizer'
# Custom icons
viz.add_marker(lat, lon, icon="fa-coffee", color="red")
# With popup content
viz.add_marker(lat, lon, popup="<b>Store #123</b><br>Open 9-5")
# From CSV with popup columns
viz.from_csv("stores.csv", lat_col="lat", lon_col="lon")
viz.add_markers(viz.data, popup_cols=["name", "address", "phone"])
# Basic heatmap
viz.add_heatmap()
# Weighted heatmap (e.g., by sales volume)
viz.add_heatmap(weight_col="sales", radius=20, blur=15, max_zoom=12)
# Color regions by data
viz.add_choropleth(
geojson="us-states.geojson",
data=state_data,
key_on="feature.properties.name", # GeoJSON property
value_col="population",
fill_color="YlOrRd", # Color scale
legend_name="Population"
)
Available base maps:
OpenStreetMap (default)
CartoDB positron (light, minimal)
CartoDB dark_matter (dark theme)
Stamen Terrain (terrain features)
Stamen Toner (high contrast B&W)
viz = GeoVisualizer(tiles="CartoDB positron")
viz = GeoVisualizer()
viz.from_csv("stores.csv", lat_col="lat", lon_col="lon")
viz.add_markers(viz.data, popup_cols=["name", "address", "hours"])
viz.cluster_markers(True)
viz.fit_bounds()
viz.save("store_locator.html")
viz = GeoVisualizer(tiles="CartoDB dark_matter")
viz.from_csv("sales.csv", lat_col="lat", lon_col="lon")
viz.add_heatmap(weight_col="revenue", radius=25)
viz.save("sales_heat.html")
viz = GeoVisualizer()
stops = [(40.7, -74.0), (40.8, -73.9), (40.75, -73.95)]
viz.add_route(stops, color="blue", weight=4)
for i, (lat, lon) in enumerate(stops):
viz.add_marker(lat, lon, popup=f"Stop {i+1}")
viz.save("route.html")
Weekly Installs
55
Repository
GitHub Stars
38
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli45
opencode44
codex42
cursor42
github-copilot39
claude-code37
科学数据探索性分析工具:自动检测200+格式,生成EDA报告与可视化建议
1,100 周安装