Skip to content

Commit

Permalink
MAJ COG 2017 (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdesboeufs committed Apr 20, 2017
1 parent 4886274 commit 945b811
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 29 deletions.
9 changes: 4 additions & 5 deletions fetch_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ mkdir -p data
echo "Retrieve datasets"
wget -N -P data/ $GEOAPI_DATA_BASE_URL/communes/laposte_hexasmal.json
wget -N -P data/ $GEOAPI_DATA_BASE_URL/communes/communes-dp25.json
wget -N -P data/ $GEOAPI_DATA_BASE_URL/communes/insee_cog_france2016.tsv
wget -N -P data/ $GEOAPI_DATA_BASE_URL/communes/insee_cog_arrond2016.tsv
wget -N -P data/ $GEOAPI_DATA_BASE_URL/communes/insee_cog_depts2016.tsv
# Awaiting the update of the file planned for April
# wget -N -P data/ $GEOAPI_DATA_BASE_URL/communes/insee_cog_reg2016.tsv
wget -N -P data/ $GEOAPI_DATA_BASE_URL/communes/insee_cog_france2017.tsv
wget -N -P data/ $GEOAPI_DATA_BASE_URL/communes/insee_cog_arrond2017.tsv
wget -N -P data/ $GEOAPI_DATA_BASE_URL/communes/insee_cog_depts2017.tsv
wget -N -P data/ $GEOAPI_DATA_BASE_URL/communes/insee_cog_reg2017.tsv
wget -N -P data/ $GEOAPI_DATA_BASE_URL/communes/insee_population_metropole.csv
wget -N -P data/ $GEOAPI_DATA_BASE_URL/communes/insee_population_dom.csv
echo "Completed"
19 changes: 0 additions & 19 deletions forced_data/insee_cog_reg2017.tsv

This file was deleted.

4 changes: 2 additions & 2 deletions lib/integration/communes.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ function init(ctx, next) {
/* Chargement des communes */
function loadCommunes(options = {}) {
return function (ctx, next) {
ctx.debug('Chargement du jeu de données insee_cog_france2016 ');
ctx.debug('Chargement du jeu de données insee_cog_france2017 ');
let count = 0;

fs.createReadStream(options.srcPath || __dirname + '/../../data/insee_cog_france2016.tsv')
fs.createReadStream(options.srcPath || __dirname + '/../../data/insee_cog_france2017.tsv')
.pipe(iconv.decodeStream('win1252'))
.on('error', next)
.pipe(parse({ delimiter: '\t', columns: true }))
Expand Down
4 changes: 2 additions & 2 deletions lib/integration/departements.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ function init(ctx, next) {
/* Chargement des départements */
function loadDepartements(options = {}) {
return function (ctx, next) {
ctx.debug('Chargement du jeu de données insee_cog_depts2016 ');
ctx.debug('Chargement du jeu de données insee_cog_depts2017 ');
let count = 0;

fs.createReadStream(options.srcPath || __dirname + '/../../data/insee_cog_depts2016.tsv')
fs.createReadStream(options.srcPath || __dirname + '/../../data/insee_cog_depts2017.tsv')
.pipe(iconv.decodeStream('win1252'))
.on('error', next)
.pipe(parse({ delimiter: '\t', columns: true }))
Expand Down
2 changes: 1 addition & 1 deletion lib/integration/regions.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function loadRegions(options = {}) {
ctx.debug('Chargement du jeu de données insee_cog_reg2017 ');
let count = 0;

fs.createReadStream(options.srcPath || __dirname + '/../../forced_data/insee_cog_reg2017.tsv')
fs.createReadStream(options.srcPath || __dirname + '/../../data/insee_cog_reg2017.tsv')
.pipe(iconv.decodeStream('win1252'))
.on('error', next)
.pipe(parse({ delimiter: '\t', columns: true }))
Expand Down

0 comments on commit 945b811

Please sign in to comment.