GeoJSON centroid for each postcode in Luxembourg
Published on July 11, 2016 by Guillaume Rischard
Python program that downloads the latest addresses geojson using the data.public.lu API, and returns GeoJSON centroids for each postcode in Luxembourg.
A sample centroids.geojson.xz (from 2016-07-11) is included.
- Downloads the latest addresses geojson
- Average the position of all postcodes
- Spit out geojson
Run like :
python3 postcode-centroid.py > centroids.geojson
There are 63 postcodes in Luxembourg that contain only one address. Some of these are for residential addresses. You might want to consider merging these points with the nearest neighbour if you need to anonymise the output data of your project.
Discussion between the reusers and the community about this reuse.