CodeforLeipzig / wo-ist-testzentrum

https://wo-ist-testzentrum.de/#leipzig
Other
7 stars 4 forks source link

Update data for Berlin #8

Closed k-nut closed 3 years ago

k-nut commented 3 years ago

@johnjohndoe do you have any idea why git would suddenly think that the cities/berlin.json file is a binary file? I re-generated it by running node preprocessing/berlin/compile-berlin-geojson.js > cities/berlin.json

johnjohndoe commented 3 years ago

@k-nut No, but I also stumbled about it. I had no time to investigate, though. Normally you can configure specific behavior in a .gitattributes file but I see no reason why Git handles JSON files different here.

k-nut commented 3 years ago

I am even more confused now. I added another trivial commit and for that one both git and GitHub don't seem to think that it is binary data. Do you have any other idea what to check here?

k-nut commented 3 years ago

Huh, interesting: It seems to be related to the file type that gets reported for that file on the current master:

❯ file cities/berlin.json
cities/berlin.json: Little-endian UTF-16 Unicode text, with CRLF line terminators
❯ file cities/cities.json
cities/cities.json: JSON data
k-nut commented 3 years ago

Ok, I managed to find a workaround. See the two commits. The overall Files changed view is still confused here (because the file on master has the wrong encoding), but if you look at commit b63a0dc505b0072c0783a7908b620640e7bdf58b directly, you can see the actual content changes (although it is still difficult because a lot of data changed).

joergreichert commented 3 years ago

Maybe we should something like this: https://github.com/benbalter/geojson-diff

As I guess Berlin has no african colony (anymore), the coordinates for https://medicov.de/ entry are mistaken image

johnjohndoe commented 3 years ago

Isn't that what I fixed in #5?

k-nut commented 3 years ago

@johnjohndoe I guess your changes were override when I re-ran the update script. I added another two commits now though. The first one filters the (0,0) entries and the other one that updates the data so that the invalid entries are removed. Please review again :)