Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a canonical country code to country name mapping #2584

Merged
merged 7 commits into from Mar 14, 2022

Conversation

iamleeg
Copy link
Contributor

@iamleeg iamleeg commented Mar 14, 2022

Here's the backend support for building a list of the country names used in the app, which we can add to the data dictionary.

Why in the backend?

So that the result can combine the lists of names used in both libraries we use: https://github.com/michaelwittig/node-i18n-iso-countries in TypeScript, and https://github.com/deactivated/python-iso3166 in Python; so that it uses the version of those libraries that is actually live; and so that it lists the countries/codes that are actually found in the live data.

What next?

Next is writing a script that uses this to add to the data dictionary (not necessarily that file; maybe a supplement). But the queries I've used here are slow-ass so it's possible that the backend will time out: if that happens then I'll also need to consider indexes. I don't think it needs to be super responsive because I don't imagine third-party users needing this API, but it should work so if it actually times out I'll deal with it.

@iamleeg iamleeg merged commit d096007 into main Mar 14, 2022
@iamleeg iamleeg deleted the 2559_canonical_country_list branch March 14, 2022 16:58
@abhidg abhidg changed the title 2559 canonical country list Create a canonical country code to country name mapping Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants