未知
项目描述
摘要
-------
Cube for data.gouv.fr accidents (http://www.data.gouv.fr/fr/dataset/base-de-donnees-accidents-corporels-de-la-circulation-sur-6-annees)
安装
------------
创建实例
cubicweb create accidents my_instance_accidents
创建数据库
cubicweb db-create my_instance_accidents
! 不要启动db-init !
插入postgis
psql my_instance_accidents -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
psql my_instance_accidents -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql
完成数据库
cubicweb db-init my_instance_accidents
推送数据
在http://fr.dbpedia.org/sparql上获取市和区
使用以下请求以JSON格式
prefix db-owl: <http://dbpedia.org/ontology/>
select ?ville ?code ?name ?lat ?long ?dep ?depcode ?depname where {
?ville db-owl:country <http://fr.dbpedia.org/resource/France> .
?ville dbpedia-owl:inseeCode ?code.
?ville foaf:name ?name.
?ville dbpedia-owl:department ?dep.
?dep dbpedia-owl:inseeCode ?depcode.
?dep foaf:name ?depname.
?ville geo:lat ?lat.
?ville geo:long ?long.
}
使用以下命令推送市/区
cubicweb-ctl shell my_instance_accidents /path/to/cubes/accidents/import_communes.py /path/to/json/files
在data.gouv.fr上下载车辆和事故文件。
推送数据
cubicweb-ctl shell my_instance_accidents /path/to/cubes/accidents/import_vehicules.py /path/to/vehicules.csv
cubicweb-ctl shell my_instance_accidents /path/to/cubes/accidents/import_accidents.py /path/to/accidents.csv
-------
Cube for data.gouv.fr accidents (http://www.data.gouv.fr/fr/dataset/base-de-donnees-accidents-corporels-de-la-circulation-sur-6-annees)
安装
------------
创建实例
cubicweb create accidents my_instance_accidents
创建数据库
cubicweb db-create my_instance_accidents
! 不要启动db-init !
插入postgis
psql my_instance_accidents -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
psql my_instance_accidents -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql
完成数据库
cubicweb db-init my_instance_accidents
推送数据
在http://fr.dbpedia.org/sparql上获取市和区
使用以下请求以JSON格式
prefix db-owl: <http://dbpedia.org/ontology/>
select ?ville ?code ?name ?lat ?long ?dep ?depcode ?depname where {
?ville db-owl:country <http://fr.dbpedia.org/resource/France> .
?ville dbpedia-owl:inseeCode ?code.
?ville foaf:name ?name.
?ville dbpedia-owl:department ?dep.
?dep dbpedia-owl:inseeCode ?depcode.
?dep foaf:name ?depname.
?ville geo:lat ?lat.
?ville geo:long ?long.
}
使用以下命令推送市/区
cubicweb-ctl shell my_instance_accidents /path/to/cubes/accidents/import_communes.py /path/to/json/files
在data.gouv.fr上下载车辆和事故文件。
推送数据
cubicweb-ctl shell my_instance_accidents /path/to/cubes/accidents/import_vehicules.py /path/to/vehicules.csv
cubicweb-ctl shell my_instance_accidents /path/to/cubes/accidents/import_accidents.py /path/to/accidents.csv
项目详情
关闭
cubicweb-accidents-0.1.0.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 3fa042f1bcce979f711be4ee2c437840f2803277a34a43f3e4b6071717468b85 |
|
MD5 | 9d468765aee803afc2f3acd26b413aa7 |
|
BLAKE2b-256 | 98f1d21f31bc582cf4af0d8f4eeba72e578ebf56f917cae8a51b0739b64dd5af |