covidatlas / li

Next-generation serverless crawler for COVID-19 data
Apache License 2.0
57 stars 33 forks source link

Use full country name, rather than country code, in location name #588

Closed joliss closed 3 years ago

joliss commented 3 years ago

The current code works okay for "California, US", because "US" happens to be a synonym for "United States", but produces confusing results for "Maribor, SI" (now "Maribor, Slovenia") or "ET" (now "Ethiopia").

Note that this patch changes all location slugs as a side effect.

joliss commented 3 years ago

The only real change in this commit is to src/events/locations/get-location-names/index.js. Everything else is search-and-replace.

ryanblock commented 3 years ago

I think if in the end-user facing presentation of data we'd like to be more verbose that's probably fine – although part of the reason I used ISO country abbreviations is because some of our location names were getting onerously long. One thing we should not do, however, is start changing slugs and IDs – that has the potential to introduce cascading failures throughout the codebase.

jzohrab commented 3 years ago

LGTM. I'd like to give users (consumers) a few days' heads up prior to making this change, so I'll put a note in #announcements in Slack to ping all users, and then we can merge it on Friday. Thanks @joliss , appreciated!