up csv irve

This commit is contained in:
Tykayn 2023-09-01 11:12:54 +02:00 committed by tykayn
parent 1f6c0a4598
commit f448f40c92
9 changed files with 394723 additions and 19086 deletions

View File

@ -0,0 +1 @@
,tykayn,spaceship,31.08.2023 23:15,file:///home/tykayn/.config/libreoffice/4;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
;variance de ./etalab_data/toilettes/small.csv;généré le:;Fri Aug 18 2023 13:39:11 GMT+0200 (heure dété dEurope centrale);lignes du csv original:;10;fait avec make_variance_from_csv.ts de Tykayn ;variance de ./etalab_data/toilettes/small.csv;généré le:;Thu Aug 31 2023 23:08:07 GMT+0200 (heure dété dEurope centrale);lignes du csv original:;10;fait avec make_variance_from_csv.ts de Tykayn
;TYPE;STATUT;ADRESSE;ARRONDISSEMENT;HORAIRE;ACCES_PMR;RELAIS_BEBE;URL_FICHE_EQUIPEMENT;geo_shape_1;geo_shape_2;geo_point_2d_1;geo_point_2d_2 ;TYPE;STATUT;ADRESSE;ARRONDISSEMENT;HORAIRE;ACCES_PMR;RELAIS_BEBE;URL_FICHE_EQUIPEMENT;geo_shape_1;geo_shape_2;geo_point_2d_1;geo_point_2d_2
;3;1;9;7;4;2;3;7;9;9;9;9 ;3;1;9;7;4;2;3;7;9;9;9;9

1 ;variance de ./etalab_data/toilettes/small.csv;généré le:;Fri Aug 18 2023 13:39:11 GMT+0200 (heure d’été d’Europe centrale);lignes du csv original:;10;fait avec make_variance_from_csv.ts de Tykayn ;variance de ./etalab_data/toilettes/small.csv;généré le:;Thu Aug 31 2023 23:08:07 GMT+0200 (heure d’été d’Europe centrale);lignes du csv original:;10;fait avec make_variance_from_csv.ts de Tykayn
2 ;TYPE;STATUT;ADRESSE;ARRONDISSEMENT;HORAIRE;ACCES_PMR;RELAIS_BEBE;URL_FICHE_EQUIPEMENT;geo_shape_1;geo_shape_2;geo_point_2d_1;geo_point_2d_2
3 ;3;1;9;7;4;2;3;7;9;9;9;9
4 ;SANISETTE;;63 AVENUE DU GENERAL LECLERC;75003;24 h / 24;Oui;;;2.3164276371957278;48.82101412751667;48.82101412751667;2.3164276371957278

View File

@ -18,7 +18,7 @@ let mini_arguments: any = minimist(process.argv.slice(2))
// } // }
let csv_content = 'variance de dataset\n'; let csv_content = 'variance de dataset\n';
let separator = ','; let separator = '\t';
let separator_fallback = ';'; let separator_fallback = ';';
let data_variance: any = {}; let data_variance: any = {};
@ -28,6 +28,11 @@ let fileNameOutput = `variance_${inputFile}`;
let inputPath = `./etalab_data/${folder}/${inputFile}` let inputPath = `./etalab_data/${folder}/${inputFile}`
// let inputPath = './etalab_data/toilettes/small_datas.csv' // let inputPath = './etalab_data/toilettes/small_datas.csv'
let outputPath = `etalab_data/${folder}` let outputPath = `etalab_data/${folder}`
console.log('mini_arguments', mini_arguments)
if (mini_arguments['inputFile']) {
inputFile = `${mini_arguments['input-file']}`
}
if (mini_arguments['source']) { if (mini_arguments['source']) {
inputPath = mini_arguments['source'] inputPath = mini_arguments['source']
} }
@ -47,7 +52,6 @@ function getColumnsFromRow(row: string) {
return headings return headings
} }
console.log('open file ', inputPath)
/** /**
* sort unique values ascending in each column * sort unique values ascending in each column
@ -58,8 +62,9 @@ function reorderValuesInDataVariance() {
}) })
} }
fs.readFile(inputPath, function (err: any, fileData: any) {
console.log('read file ', inputPath)
fs.readFile(inputPath, function (err: any, fileData: any) {
if (err) { if (err) {
throw new Error(err) throw new Error(err)
} else { } else {

View File

@ -12,7 +12,7 @@
"scripts": { "scripts": {
"start": "ts-node convert_to_osm_tags.ts --engine", "start": "ts-node convert_to_osm_tags.ts --engine",
"departments": "ts-node build_departments.ts", "departments": "ts-node build_departments.ts",
"variance": "ts-node make_variance_from_csv.ts", "variance": "ts-node make_variance_from_csv.ts --source=data_other/irve_osm_2023-08-30.csv",
"example": "ts-node convert_to_osm_tags.ts --engine=true --department=974 --source=\"./etalab_data/irve_bornes_recharge/all.json\"", "example": "ts-node convert_to_osm_tags.ts --engine=true --department=974 --source=\"./etalab_data/irve_bornes_recharge/all.json\"",
"irve": "ts-node convert_to_osm_tags.ts --engine=true --source=\"./etalab_data/irve_bornes_recharge/all.json\"", "irve": "ts-node convert_to_osm_tags.ts --engine=true --source=\"./etalab_data/irve_bornes_recharge/all.json\"",
"irve:up": "bash get_irve.sh && ts-node convert_to_osm_tags.ts --engine=true --source=\"./data_other/irve_osm_2023-08-30.geojson\"", "irve:up": "bash get_irve.sh && ts-node convert_to_osm_tags.ts --engine=true --source=\"./data_other/irve_osm_2023-08-30.geojson\"",

View File

@ -1 +1 @@
[out:csv(::id,::lon,::lat,capacity,name,ref,phone,contact)][timeout:25];area(id:3600007401)->.searchArea;(node["amenity"="charging_station"](area.searchArea););out meta;>;out meta qt; [out:csv(::id,::uid,::user,::changeset,::lon,::lat,'addr:postcode','addr:city',covered,layer,charging_type,'current:ac','current:dc','charging_station:output',capacity,voltage,amperage,socket,'note:location',access,charging_type,name,owner,network,operator,'operator:wikidata','operator:wikipedia','owner:ref:FR:SIREN',ref,'ref:EU:EVSE','email','contact:email','contact:phone',phone,contact,'socket:typee','socket:schuko','socket:type1','socket:type2','socket:type2:output','socket:type2_cable','socket:type2_combo','socket:type2_combo:output','socket:type3c','socket:type3c:output','socket:chademo','socket:chademo:output',fee,charge,'payment:contactless','parking:fee','payment:app','payment:credit_cards',reservation,authentication,'authentication:nfc','authentication:membership_card','authentication:none',bicycle,scooter,bus,hgv,motorcar,wheelchair,'survey:date',start_date,opening_hours,source,wikidata,description,note,fixme,shop,mapillary,panoramax)][timeout:25];area(id:3602202162)->.searchArea;(node["amenity"="charging_station"](area.searchArea););out meta;>;out meta qt;

View File

@ -1 +1 @@
[out:json][timeout:25];area(id:3600007401)->.searchArea; (node["amenity"="charging_station"](area.searchArea);); out center; [out:json][timeout:25];area(id:3602202162)->.searchArea; (node["amenity"="charging_station"](area.searchArea);); out center;

View File

@ -1,11 +1,15 @@
#!/bin/bash #!/bin/bash
echo "récupérer les bornes de recharge en Essonne" echo "récupérer les bornes de recharge en Essonne"
overpass_website="https://overpass-api.de/api/interpreter" overpass_website="https://overpass-api.de/api/interpreter"
# personnaliser les scripts:
# aire Essonne: id 3600007401
# aire IDF: id 3600008649
# aire FR: id 3602202162
curl --header "Content-Type: plain/text" --data @content_irve_geojson.txt --trace-ascii website-data.log "$overpass_website" > ../data_other/irve_osm_2023-08-30.geojson curl --header "Content-Type: plain/text" --data @content_irve_geojson.txt --trace-ascii website-data.log "$overpass_website" > ../data_other/irve_osm_2023-08-30.geojson
curl --header "Content-Type: plain/text" --data @content_irve_csv.txt --trace-ascii website-data.log "$overpass_website" > ../data_other/irve_osm_2023-08-30.csv curl --header "Content-Type: plain/text" --data @content_irve_csv.txt --trace-ascii website-data.log "$overpass_website" > ../data_other/irve_osm_2023-08-30.csv
du -sch ../data_other/irve_osm_2023-08-30.geojson #du -sch ../data_other/irve_osm_2023-08-30.geojson
du -sch ../data_other/irve_osm_2023-08-30.csv du -sch ../data_other/irve_osm_2023-08-30.csv
rm website-data.log rm website-data.log