data.gouv.fr中选举数据的多维数据集

cubicweb-elections的Python项目详细描述


摘要

data.gouv.fr中选举数据的多维数据集

安装

创建实例:

cubicweb create elections my_instance_elections

创建数据库:

cubicweb db-create my_instance_elections

不要启动db init

插入Postgis:

psql my_instance_elections -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
psql my_instance_elections -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql

完成数据库初始化:

cubicweb db-init my_instance_elections

推送OSM数据(有关详细信息,请参阅OSMFrance多维数据集自述):

  • 形状文件取自http://osm13.openstreetmap.fr/~cquest/openfla/export/ (也在https://www.data.gouv.fr/fr/organization/openstreetmap上共享)

  • 启动命令:

    cubicweb-ctl osmfrance_import_shp my_instance_elections --regions=/path/to/osm/dataosm/regions-20140306-100m-shp.zip --departements=/path/to/osm/dataosm/departements-20140306-100m-shp.zip --arrondissements=/path/to/osm/dataosm/arrondissements-20131220-100m-shp.zip  --epci=/path/to/osm/dataosm/epci-20140306-100m-shp.zip --communes=/path/to/osm/dataosm/communes-20140306-100m-shp.zip
    

推送选举数据:

cubicweb-ctl elections-import my_instance_elections

重建fti索引:

cubicweb-ctl db-rebuild-fti my_instance_elections

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何将cassandra中的行数据转换为与列相关的嵌套json   java如何使用jcr XPath在jcr:content/@jcr:data中搜索?   java在使用openCV进行安卓开发时如何利用手机的广角镜头   java解析扩展了接口,结束了一个潜在的无限循环   位置服务的@Override方法中存在java Android应用程序错误   java本地线程的用途和需求是什么   具有左右子访问的java节点树遍历   java验证JsonWebToken签名   JUL日志处理程序中的java日志记录   嵌入式Java读取给定时间段的串行数据。   java有没有办法从多个URL获取多个图像?   java线程通过等待intent阻止自己发送intent   java Spring MVC解析多部分内容请求   java JPA/Hibernate静态元模型属性未填充NullPointerException   java格式错误的字符(需要引号,得到I)~正在处理   java为什么PrintWriter对象抛出FileNotFoundException?   java Neo4j未正确保存标签   java IE不加载图像