This repo contains scripts for downloading addresses in France via the National Address Base (Base Adresse Nationale).
Install all dependencies with: pip install -r requirements.txt
.
The dlfiles.py
script makes it easier to download ZIP files. By default, the loop goes from 1 (Département de l'Ain) to 95 (Département du Val d'Oise). For overseas departments, simply change the parameters of the range()
function.
[!WARNING]
Check that files do not contain commas ,
. If not, remove them with CTRL+F and replace with a blank character. Data is separated by semicolons ;
.
When all the files have been executed, you can now run either the sort-csv-optimized.py
script or the sort-csv-optimized.py
script, which is much faster to run. The outputs will appears in sorted-communs
and sorted-voies
directories.