xunhuang / covid-19

MIT License
17 stars 16 forks source link

Remove the country prefix from subdivision IDs #113

Closed aschleck closed 4 years ago

aschleck commented 4 years ago

This expects lower level subdivision codes to be prefixed with their parent. Also extended the sparql query to fetch the Caribbean Netherlands, and sorted it by code length because Saint Barthélemy is both BL and FR-BL and in this case we want BL.

aschleck commented 4 years ago

This diff is hard to read but it's basically what's going on: https://pastebin.com/PC1CZga8 . However, I forgot to rerun the diff after changing the code for Saint Barthélemy.

xunhuang commented 4 years ago

question: how do you generate data/worlddata/country_regions.json? I tried using a curl command (curl --data-urlencode query@query.sparql 'https://query.wikidata.org/sparql?format=json') to generate but it gives me the verbose version. I looked for 15 mins and gave up and resorted to clicking on the GUI to download. what did you do?

Thank you for painstaking fixing the irregularity by hand. The new code and result looks great and neat.

aschleck commented 4 years ago

Haha I clicked the button too. I looked at the Curl command but it seemed like effort and opted out of thinking about it

xunhuang commented 4 years ago

they clearly were thinking about compatibility with other languages so consumers can parse data into different types. some other day.

On Wed, May 6, 2020 at 11:01 AM April Schleck notifications@github.com wrote:

Haha I clicked the button too. I looked at the Curl command but it seemed like effort and opted out of thinking about it

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/xunhuang/covid-19/pull/113#issuecomment-624801015, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFSGFZME6B2OBJYZZIZVDDRQGQYFANCNFSM4M2GKHTA .