Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Converts the UPPERCASE names of AKK to proper Albanian/Serbian/Turkish Titlecase.
Does some corrections on the fly.
TODO: add code to delete from roads_akk where name in ('Berbatovci', 'Jakup Mirena');
We currently do this in sql after the import, which means the gpkg output still has them.
<p><a rel="license" href="https://creativecommons.org/licenses/by/4.0/"><img alt="Licence Creative Commons" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />Cet article est mise à disposition selon les termes de la <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Licence Creative Commons Attribution 4.0 International</a>.</p>
100 : CCD32A
101 : ACD5F0
102 : A2C68E
104 : CEB5D3
107 : 6B4908
108 : A22E5B
109 : 989797
110 : 009DE0
111 : DA8B1C
112 : ADD1C7
Process: Radium [29379]
Path: /Applications/Radium.app/Contents/MacOS/Radium
Identifier: com.catpigstudios.Radium3
Version: 3.1.3 (338)
App Item ID: 597611879
App External ID: 813100600
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Radium [29379]
User ID: 502
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 2 columns, instead of 1 in line 5.
false;true;Danger potentiel;Avis de chaleur;Dimanche 14:00 à 18:00, pour le sud du pays: Sud du pays: températures maximales prévues autour de 30°C. Faible risque d'orages isolés en soirée.;yellow;09;;2017-06-11 14:00;2017-06-11 18:00sep=;
false;true;Danger potentiel;Avis de chaleur;Dimanche 14:00 à 18:00, pour le sud du pays: Températures maximales aux alentours de 30°C.;yellow;09;;2017-06-11 14:00;2017-06-11 18:00sep=;
false;true;Danger potentiel;Avis de chaleur;Dimanche 14:00 à 18:00, pour le sud du pays: Températures maximales jusqu'à 30°C.;yellow;09;;2017-06-11 14:00;2017-06-11 18:00sep=;
false;true;Danger potentiel;Avis de chaleur;Dimanche 14:00 à 18:00, pour le sud du pays: Températures maximales prévues: 30°C au sud du pays.;yellow;09;;2017-06-11 14:00;2017-06-11 18:00sep=;
false;true;Danger potentiel;Avis de chaleur;Jeudi 14:00 à 17:00, pour le sud du pays: Températures maximales jusqu'à 30°C.;yellow;09;;2017-06-15 14:00;2017-06-15 17:00
false;true;Danger potentiel;Avis de chaleur;Lundi 13:00 à 1
Process: postgres [52802]
Path: /usr/local/Cellar/postgresql/11.5_1/bin/postgres
Identifier: postgres
Version: 0
Code Type: X86-64 (Native)
Parent Process: postgres [482]
Responsible: postgres [482]
User ID: 502
Date/Time: 2019-11-20 15:27:38.492 +0100
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Return GeoJSON centroids with population for each locality in Luxembourg.
BD-Adresses doesn't include communes, so we use the OpenStreetMap community's
csventrifuge output, which has been enriched. The output of this script is
© OpenStreetMap Contributors, see https://openstreetmap.org/copyright.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

These are, grouped by URL, the privacy_policy_url attributes we have in ELI today:

We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 11 columns, instead of 7 in line 7.
rue,numero,localite,code_postal,id_caclr_rue,id_caclr_bat,lat_wgs84,lon_wgs84,coord_est_luref,coord_nord_luref,id_geoportail
Allée de la Poudrerie,10,Kockelscheuer,1899,2276,84858,49.559593880644755,6.101639986978819,75190.1050000002,69437.00999954632,100A00889002913_2276_10
Allée de la Poudrerie,8,Kockelscheuer,1899,2276,84857,49.559593880644755,6.101639986978819,75190.1050000002,69437.00999954632,100A00889002913_2276_8
An der Schmëdd,11,Hunsdorf,7397,9056,237623,49.69702094569644,6.1315344691089315,77360.1941999996,84720.56099955324,074D00314001451_9056_11
An der Schmëdd,1,Hunsdorf,7397,9056,237618,49.69702094569644,6.1315344691089315,77360.1941999996,84720.56099955324,074D00314001451_9056_1
An der Schmëdd,3,Hunsdorf,7397,9056,237619,49.69702094569644,6.1315344691089315,77360.1941999996,84720.56099955324,074D00314001451_9056_3
An der Schmëdd,5,Hunsdorf,7397,9056,237620,49.69702094569644,6.1315344691089315,77360.1941999996,84720.56099955324,074D00314001451_9056_5
An der Schmëdd,7,Hunsdorf,7397,9056,237621,49