360 Secure SkillHub
360 安全技能中心

City of Lethbridge Open Data

该 Skill 提供命令行脚本,用于在 Lethbridge 市开放数据门户中搜索、列出和查看数据集信息,并通过 ArcGIS REST 接口按关键字获取要素数据,支持 JSON/CSV 输出和下载链接列举。运行需联网,本身不含数据分析、可视化或数据写回功能。

raychanpmp
raychanpmp
热度 43.23
最近更新 2026-05-11 17:38:25
分类:搜索依赖:代码执行 / 第三方 API应用场景:研究 / 数据处理 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add lethbridge-opendata
Metadata
name
City of Lethbridge Open Data
description
Access 123+ datasets from the City of Lethbridge open data portal. Search, fetch, and analyze city data on transit, infrastructure, elections, environment, and more via ArcGIS Hub.
permissions
Bash
triggers
["lethbridge open data","city of lethbridge data","lethbridge dataset","opendata.lethbridge.ca","lethbridge transit","lethbridge gis"]

City of Lethbridge Open Data

Access and analyze 123+ open datasets from the City of Lethbridge via ArcGIS Hub. Data covers transit, infrastructure, elections, environment, tourism, and more.

Portal: https://opendata.lethbridge.ca Platform: ArcGIS Hub

Quick Start

# Search for datasets
python3 scripts/lethbridge_data.py search "traffic"

# List all datasets
python3 scripts/lethbridge_data.py list

# View dataset info
python3 scripts/lethbridge_data.py info "Traffic Counts"

# Fetch data from ArcGIS feature service
python3 scripts/lethbridge_data.py fetch "Traffic Counts" --limit 5

# Fetch with field filter
python3 scripts/lethbridge_data.py fetch "Intersection Safety Devices" --limit 10 --format json

# Export as CSV
python3 scripts/lethbridge_data.py fetch "City Boundary" --csv

# List all datasets with download links
python3 scripts/lethbridge_data.py downloads

Commands Reference

Command Description
search <query> Search datasets by keyword
list List all datasets
info <name-or-id> Show dataset metadata and data source
fetch <name-or-id> Fetch data (opts: --limit, --format json/csv, --csv)
downloads List datasets with direct file download URLs

Data Sources

Lethbridge datasets come in three types:

  1. ArcGIS Feature Services — Queryable geospatial data (parks, streets, boundaries)
  2. ArcGIS Map Services — Read-only map layers
  3. Document Links — Direct file downloads (Excel, CSV, PDF)

The CLI auto-detects the source type and uses the appropriate method.

ArcGIS REST API

Geospatial datasets use the ArcGIS REST query API:

  • Endpoint: https://gis.lethbridge.ca/gisopendata/rest/services/OpenData/
  • Supports where, outFields, resultRecordCount, f (json/geojson) parameters
  • Max 2000 records per query

Data Sources

All data is sourced from the City of Lethbridge's Open Data Portal (opendata.lethbridge.ca). See references/datasets.md for a curated list of popular datasets.