Commit 0dc9007e authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Stop outputting libelle_region (not always available)

parent 1f588759
......@@ -51,7 +51,6 @@ def get_coords_by_siren(siren):
'latitude': siege_social.get('latitude', ''),
'nom': siege_social.get('l1_normalisee', ''),
'region': siege_social.get('region', ''),
'libelle_region': siege_social.get('libelle_region', ''),
'departement': siege_social.get('departement', '')
}
}
......@@ -80,8 +79,8 @@ def main():
out = args.out.open('wt', encoding='utf-8') if args.out else sys.stdout
writer = csv.writer(out)
writer.writerow(['siren', 'nom', 'latitude', 'longitude', 'region',
'libelle_region', 'departement', 'statut', 'message'])
writer.writerow(['siren', 'nom', 'latitude', 'longitude', 'code_region',
'code_departement', 'statut', 'message'])
with input_filepath.open('rt', encoding='utf-8') as fd:
for line in fd:
......@@ -101,7 +100,6 @@ def main():
data['latitude'],
data['longitude'],
data['region'],
data['libelle_region'],
data['departement'],
'ok',
''])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment