add async in build, start to make variance script
Signed-off-by: tykayn <contact@cipherbliss.com>
This commit is contained in:
parent
2be4e61a45
commit
0261facca3
@ -18,17 +18,17 @@ function exec_command(command: string) {
|
||||
});
|
||||
}
|
||||
|
||||
function build_department_geojson(department: string) {
|
||||
async function build_department_geojson(department: string) {
|
||||
let command = `ts-node convert_to_osm_tags.ts --department=${department}`;
|
||||
console.log('command', command)
|
||||
exec_command(command)
|
||||
await exec_command(command)
|
||||
|
||||
}
|
||||
|
||||
function convert_geojson_to_osm_for_department(department: string) {
|
||||
async function convert_geojson_to_osm_for_department(department: string) {
|
||||
let command = `geojsontoosm output/my_converted_data_set_filtered_zipcode_${department}.json > osm_output/bornes-irve-filetered-from-etalab-opendata_dep_${department}.osm`;
|
||||
console.log('command', command)
|
||||
exec_command(command)
|
||||
await exec_command(command)
|
||||
}
|
||||
|
||||
for (let ii = 1; ii <= max_departement; ii++) {
|
||||
@ -48,8 +48,12 @@ let more_departements = ['2A', '2B'
|
||||
|
||||
more_departements.forEach((department => {
|
||||
let departement_string = '' + department
|
||||
build_department_geojson(departement_string)
|
||||
convert_geojson_to_osm_for_department(departement_string)
|
||||
build_department_geojson(departement_string).then(r => {
|
||||
console.log('build_department_geojson', departement_string, r)
|
||||
})
|
||||
convert_geojson_to_osm_for_department(departement_string).then(r => {
|
||||
console.log('convert_geojson_to_osm_for_department', departement_string, r)
|
||||
})
|
||||
}))
|
||||
|
||||
|
||||
|
@ -23,9 +23,9 @@ let mini_arguments: any = minimist(process.argv.slice(2))
|
||||
|
||||
|
||||
// let sourceFilePathGeoJson = './etalab_data/small.json'
|
||||
// let sourceFilePathGeoJson = './etalab_data/all.json'
|
||||
let sourceFilePathGeoJson = './etalab_data/all.json'
|
||||
// let sourceFilePathGeoJson = './output/my_converted_data_set_filtered_zipcode_91.json'
|
||||
let sourceFilePathGeoJson = './output/my_converted_data_set_filtered_zipcode_91_small.json'
|
||||
// let sourceFilePathGeoJson = './output/my_converted_data_set_filtered_zipcode_91_small.json'
|
||||
|
||||
// wip filter
|
||||
let filterOnBoundingBox = true
|
||||
|
7
mapping_geojson_to_osm_tags/make_variance_from_csv.ts
Normal file
7
mapping_geojson_to_osm_tags/make_variance_from_csv.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
prendre un CSV,
|
||||
examiner toutes les colonnes et leurs valeurs,
|
||||
garder en mémoire les valeurs uniques de chaque colonne
|
||||
faire un nouveau csv qui ne montre que les valeurs uniques pour chacune des colonnes
|
||||
et qui compte le nombre de valeurs
|
||||
**/
|
Loading…
Reference in New Issue
Block a user