codeformuenster / verkehrsunfaelle

WIP Verkehrsunfälle in Münster
8 stars 0 forks source link

python-importer: Don't import numbers as floats #6

Closed ubergesundheit closed 5 years ago

ubergesundheit commented 5 years ago
select count(id) from objects where resource_name = 'record' and parent_id = '/buckets/accidents/collections/accidents_raw' and data->>'place_near' like '%.0';

 count 
-------
 44502
(1 row)
ubergesundheit commented 5 years ago

After https://github.com/codeformuenster/verkehrsunfaelle/commit/f1e6f4fb78ebdcab96b2a9ee4c0d66a7c13bf293

select data->'place', data->'place_near', data->'source_file', data->'source_row_number' from objects where resource_name = 'record' and parent_id = '/buckets/accidents/collections/accidents_raw' and data->>'place_near' like '%.0';

      ?column?       |           ?column?            |     ?column?      | ?column?
---------------------+-------------------------------+-------------------+----------
 "Kappenberger Damm" | "Abschn 6.1, km 2.0"          | "VU PP 2018.xlsx" | 313
 "Rosenstraße"       | "41609.0"                     | "VU2008.xlsx"     | 428
 "Himmelreichallee"  | "65.0"                        | "VU2014.xlsx"     | 1064
 "Von-Vincke-Straße" | "39634.0"                     | "VU2008.xlsx"     | 1696
 "L585"              | "Ortsumgehung Wolbeck km 2.0" | "VU PP 2015.xlsb" | 2009
 "Von-Vincke-Straße" | "40729.0"                     | "VU2011.xlsx"     | 2534
 "Thomas-Morus-Weg " | "40793.0"                     | "VU2011.xlsx"     | 3346
 "Grevener Straße"   | "41001.0"                     | "VU2012.xlsx"     | 5162
 "Holsteiner Straße" | "20.0"                        | "VU2012.xlsx"     | 5684
 "Marktallee"        | "88.0"                        | "VU2011.xlsx"     | 7648
 "Feldstiegenkamp"   | "39420.0"                     | "VU2007.xlsx"     | 7792
 "Brüningheide"      | "67.0"                        | "VU2010.xlsx"     | 9218
 "Marktallee"        | "71.0"                        | "VU2011.xlsx"     | 9460
(13 rows)