djay / covidthailand

Thailand Covid testing and case data gathered and combined from various sources for others to download or view
126 stars 15 forks source link

Confirmed-cases..csv encoring issue #36

Closed djay closed 3 years ago

djay commented 3 years ago

https://data.go.th/dataset/8a956917-436d-4afd-a2d4-59e4dd8e906e/resource/be19a8ad-ab48-4081-b04a-8035b5b2b8d6/download/confirmed-cases.csv

Not sure what they have done or if there is a way unencode it

Hopefully it goes away today when it next updates. But since the API version and xlsx are 3 weeks out of date and the csv has now been overwritten in the cache, it does show a weak point in the system they I'm not sure how to get around.

djay commented 3 years ago

is there anyway to unencode whatever they did to their csv file? @porames

porames commented 3 years ago

Use TIS-620 encoding. I think it's a temporary mistake but meanwhile you can decode it like this https://github.com/porames/the-researcher-covid-bot/blob/f565c79f5133cb4bb42b9b891696e83c16001132/bot_jobs/get_provincial_dataset.py

djay commented 3 years ago

@porames worked like a charm. thats so much for that. never heard of tis-60 before.

djay commented 3 years ago

fixed in https://github.com/djay/covidthailand/commit/f3f0e445d84be4101b294e0ebce442198b0bf6ac#diff-d421b480081e3d243e74357099a7e90eb2b5377e9dae2df4b4b6608605d97e14R562