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

refactor: Review and update country reference data #4922

Open
jpye-finch opened this issue Mar 24, 2023 · 6 comments
Open

refactor: Review and update country reference data #4922

jpye-finch opened this issue Mar 24, 2023 · 6 comments
Labels
Milestone

Comments

@jpye-finch
Copy link
Collaborator

jpye-finch commented Mar 24, 2023

Description

Our country list is out of date. Having last been updated 5 years ago.

This ticket is to review and update. Plus to consider having a list of:

  • Nationalities > Nationality
  • Countries > Addresses

https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/664133/CH_Nationality_List_20171130_v1.csv/preview

Link to Slack thread: https://opencrvsworkspace.slack.com/archives/GHCFF9M6X/p1678881179834889

@jpye-finch jpye-finch changed the title Review and update country list refactor: Review and update country reference data Mar 25, 2023
@rikukissa
Copy link
Member

Labeling as medium priority. Keeping these reference data up to date should be routine maintenance

@naftis
Copy link
Collaborator

naftis commented Jun 28, 2024

https://github.com/OpenBookPrices/country-data
The country-data package we're using is outdated, currencies and countries have changed during the years. Needs to be replaced altogether.

@euanmillar euanmillar moved this from Backlog to Ready to build in OpenCRVS Core Oct 18, 2024
@euanmillar euanmillar added this to the v1.7.0 milestone Oct 18, 2024
@Siyasanga Siyasanga self-assigned this Oct 31, 2024
@Siyasanga Siyasanga moved this from Ready to build to In Development in OpenCRVS Core Oct 31, 2024
@Siyasanga
Copy link
Collaborator

Siyasanga commented Nov 7, 2024

Hi @jpye-finch @naftis & @rikukissa I found these alternatives to the country-data package that we are currently using, since country-data was kind of a all in one package with all the info about a country including currency and name I wasn't sure if the new package we go with must have those(currency, Internationalised name, languages ... etc) or we just need to be able to map their iso-codes(ISO 3166-1 alpha 2 & ISO 3166-1 alpha 3) to the country's English name?

For instance, the convertToMSISDN() and countryAlpha3toAlpha2() use both iso-codes in their logic

I've asked chatGpt to write a quick comparison of the different alternatives that we can use and here is what I got:

Country-data package alts:

  • i18n-iso-countries
    • Content: Provides standardised country codes (ISO 3166-1) and localised country names in multiple languages.
    • Similarity to country-data: It has a similar structure to country-data but is limited to ISO codes and names without extra data like calling codes or currency info.
    • Use Case: Great for projects needing ISO codes and multilingual support.
    • Maintenance: Actively maintained with a simple API.
  • countries-and-timezones
    • Content: Provides country information with timezone data, including UTC offsets and daylight saving time (DST) support. It also includes limited extra data, like country codes.
    • Similarity to country-data: If timezones are a key aspect of your project, this is a close match, though it lacks more general data like currencies.
    • Use Case: Best if time zones are essential, and only basic country data is needed.
    • Maintenance: Actively maintained and useful for timezone-centric projects.
  • world-countries
    • Content: Offers a rich dataset, including ISO codes, calling codes, currency codes, and geographical details.
    • Similarity to country-data: The closest match, as it includes a broader array of country data similar to country-data, such as calling codes and currency.
    • Use Case: Good for projects requiring multiple types of country data beyond just codes and names.
    • Maintenance: Actively maintained, with a JSON format that’s straightforward to use.

Do you guys a preference from this list? I personally think going with the world-countries package is the best solution since it's the one that is very similar to the country-data package we are trying to replace by providing extensive information about a country even though we might not use all the info provided.

@Zangetsu101
Copy link
Collaborator

@Siyasanga Thanks for looking into these packages, I agree with you on this. Let's go with the world-countries

@naftis
Copy link
Collaborator

naftis commented Nov 13, 2024

The bundle sizes:

Be mindful not to have this as a frontend dependency (at least in the case of world-countries) but rather pass the minimum set to the client.

@rikukissa
Copy link
Member

Even with the smallest of those,

...and localised country names in multiple languages

Sounds quite redundant as we will still have to have all of those names in our translation files

@Siyasanga Siyasanga moved this from In Development to Ready to build in OpenCRVS Core Nov 14, 2024
@Siyasanga Siyasanga removed their assignment Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Ready to build
Development

No branches or pull requests

6 participants