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

Countries field should not be free format #11467

Open
aleene opened this issue Feb 20, 2025 · 2 comments
Open

Countries field should not be free format #11467

aleene opened this issue Feb 20, 2025 · 2 comments

Comments

@aleene
Copy link
Contributor

aleene commented Feb 20, 2025

What

The countries field determines which countries or regions a product is sold in. Currently the site allows free format entries. This allows users to enter inexistent and faulty entries.

Steps to reproduce the behaviour

Check out the website.

Expected behaviour

Allow only entries from the countries taxonomy.

Why

To many nonsense entries, which require repair, like a lot of rubbish in the countries_tags field returned by the API, e.g. fr:en-fr, en:royaume-uni, fr:dom-tom, en:european-union, de:allemagne, de:švýcarsko, fr:frankreich, en:francia-espana, …

@JagjeevanAK
Copy link

JagjeevanAK commented Mar 1, 2025

Image

@aleene Are you referring to this field?

@github-throwaway
Copy link
Collaborator

Relevant slack comment:

Hi everyone,
I’ve compiled a list of mappings for country tags that appear multiple times, linking them to their respective country codes (415 tags → 227 countries). I’m sharing it here in case it’s useful for others as well.
During this process, I came across many tags that don’t correspond to actual countries. Some represent historical countries (e.g., Yugoslavia, Soviet Union), while others are regions within countries (e.g., Scotland, Jersey, Quebec). Also, there are often wrong language prefixes for country names in other languages.
To ensure high-quality data, I’d suggest either removing these “invalid” country tags or introducing a separate field to capture regional information.
Let me know what you think!

https://openfoodfacts.slack.com/archives/C03H290LF/p1740745757961939?thread_ts=1740007727.605589&channel=C03H290LF&message_ts=1740745757.961939

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To discuss and validate
Development

No branches or pull requests

3 participants