360 Secure SkillHub
360 安全技能中心

Ville de Québec Open Data

提供命令行脚本,通过 Ville de Québec 开放数据平台的 CKAN API 搜索数据集、列出全部数据集、查看元数据,并按行数或条件过滤获取数据,可输出 JSON 或 CSV。数据与元数据主要为法语,运行需联网访问外部开放数据平台。

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

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add quebec-city-opendata
Metadata
name
Ville de Québec Open Data
description
Access 37+ datasets from the City of Quebec open data portal. Search, fetch, and analyze city data on streets, permits, trees, infrastructure, and more via the CKAN API.
permissions
Bash
triggers
["quebec city open data","ville de quebec data","quebec dataset","donnees quebec","quebec infrastructure"]

Ville de Québec Open Data

Access and analyze 37+ open datasets from the City of Quebec via the CKAN API hosted on donneesquebec.ca. Data covers streets, permits, trees, infrastructure, hydrography, and more.

Portal: https://www.ville.quebec.qc.ca/services/donnees-services-ouverts/ Data Hub: https://www.donneesquebec.ca/organisation/ville-de-quebec/ Platform: CKAN (donneesquebec.ca) Language: Data and metadata primarily in French

Quick Start

# Search for datasets
python3 scripts/quebec_data.py search "arbre"

# List all datasets
python3 scripts/quebec_data.py list

# View dataset info
python3 scripts/quebec_data.py info permis-delivres-ville-de-quebec

# Fetch data
python3 scripts/quebec_data.py fetch permis-delivres-ville-de-quebec --limit 5

# Export as CSV
python3 scripts/quebec_data.py fetch permis-delivres-ville-de-quebec --limit 100 --csv > permits.csv

# List queryable datasets
python3 scripts/quebec_data.py searchable

Commands Reference

Command Description
search <query> Search datasets by keyword (French)
list List all datasets
info <dataset-id> Show dataset metadata and resources
fetch <dataset-id> Fetch data from datastore (opts: --limit, --where, --csv)
searchable List datasets with queryable resources

Query Parameters

  • --limit N — Max rows to return (default: 10)
  • --where "condition" — SQL-like filter
  • --csv — Output as CSV instead of JSON

Language Note

Quebec City publishes data primarily in French. Dataset names, field names, and values are in French. Search queries should use French terms (e.g., "arbre" for tree, "permis" for permits, "rue" for street).

Data Sources

All data is sourced from the Ville de Québec via donneesquebec.ca under the Quebec Open Government Licence.