This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
Summary
-------
Cube for data.gouv.fr accidents (http://www.data.gouv.fr/fr/dataset/base-de-donnees-accidents-corporels-de-la-circulation-sur-6-annees)



Installation
------------

Create an instance:

cubicweb create accidents my_instance_accidents

Create the database:

cubicweb db-create my_instance_accidents

! Do not launch the db-init !

Insert 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

Finish the db:

cubicweb db-init my_instance_accidents



Push the data:

Get the communes and departements on http://fr.dbpedia.org/sparql
in JSON, using the following request:


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.
}



Push the communes/departements using:

cubicweb-ctl shell my_instance_accidents /path/to/cubes/accidents/import_communes.py /path/to/json/files


Download both vehicules and accidents files on data.gouv.fr.
Push the data:

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
Release History

Release History

0.1.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
cubicweb-accidents-0.1.0.tar.gz (14.0 kB) Copy SHA256 Checksum SHA256 Source Apr 29, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting