Skip to main content

Cube for elections data from data.gouv.fr

Project description

Summary

Cube for elections data from data.gouv.fr

Installation

Create an instance:

cubicweb create elections my_instance_elections

Create the database:

cubicweb db-create my_instance_elections

Do not launch the db-init

Insert 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

Finish the db initialization:

cubicweb db-init my_instance_elections

Push the osm data (see README of osmfrance cube for more details):

  • Shapefiles are taken from http://osm13.openstreetmap.fr/~cquest/openfla/export/ (also shared on https://www.data.gouv.fr/fr/organization/openstreetmap)

  • Launch the command:

    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

Push the elections data:

cubicweb-ctl elections-import my_instance_elections

Rebuild the FTI index:

cubicweb-ctl db-rebuild-fti my_instance_elections

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cubicweb-elections-0.2.0.tar.gz (17.5 kB view details)

Uploaded Source

File details

Details for the file cubicweb-elections-0.2.0.tar.gz.

File metadata

File hashes

Hashes for cubicweb-elections-0.2.0.tar.gz
Algorithm Hash digest
SHA256 35cf6e3e646cb50bb9e273a72fec82fe4656ec39d3740e562abb61118d3c9266
MD5 99e988a60662bff5c9d6431a07895b4b
BLAKE2b-256 bf5115b82e7b3eb1e6397f4d3f35887f9db576c2738c336d408add732438cc40

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page