/seao-convert

Project to convert data from SEAO into more usable formats.

Primary LanguageCoffeeScript

seao-convert

Project to convert data from SEAO into more usable formats. This first version just reads all the XML files, converts them to JSON and dumps them in a mongoDB instance.

requirements

install

Copy the data sources, unzipped in the avis-xml folder then:

npm install

coffee createCollectionAvis.coffee
coffee import.coffee

extra

A json dump for mongoDB is available here You can import it using mongoimport

csv

A csv dump is available here

In order to reproduce this file, make sure you have imported your data in your mongoDB using the import.coffee script, and then run: coffee convertCSV.coffee >avis.csv

The script produces the CSV in the standard input, so you can just redirect it to some file.

Since there are nested objects (fournisseurs.fournisseur), I decided to duplicate lines in order to flatten the structure. So for one avis, you have one line per fournisseur.