Countries taxonomy: Difference between revisions

From Open Food Facts wiki
 
(5 intermediate revisions by the same user not shown)
Line 5: Line 5:


== Country codes ==
== Country codes ==
ISO standards, basis for country codes
[https://www.iso.org/iso-3166-country-codes.html ISO 3166] standard is used for the country codes.
 
And on [https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes Wikipedia].
 
== Implementation ==
== Implementation ==
The taxonomy currently in use is found on [https://github.com/openfoodfacts/openfoodfacts-server/blob/main/taxonomies/countries.txt Github].
The taxonomy currently in use is found on [https://github.com/openfoodfacts/openfoodfacts-server/blob/main/taxonomies/countries.txt Github].
== Wikidata ==
== Attributes ==
Relation with wikidata
Each entry (country) can be accompanied by range of attributes:
* Wikidata - Each country has a link to wikidata, like: '''wikidata:en:Q31'''
* Languages - A list of official [[Languages taxonomy|languages]] in preferred order, like  '''language_codes:en:nl,fr,de'''
* ISO two-letter country codes, like '''country_code_2:en:BE'''
* ISO three-letter country codes, like '''country_code_3:en:BEL'''
 
== Usage ==
== Usage ==
Where is this taxonomy used?
Where is this taxonomy used?
== Maintenance ==
== Maintenance ==
 
Which changes are allowed?
[[Category:Language Taxonomy]]
[[Category:Language Taxonomy]]
[[Category:Global_Taxonomies]]
[[Category:Global_Taxonomies]]

Latest revision as of 08:17, 19 December 2023

Introduction

The Countries taxonomy is one of the Taxonomies that form the basis of OFF. This taxonomy gives a list of all supported countries, their translations and short cuts (the country codes).

This taxonomy was built from Wikidata to get synonyms and translations for country names, 2-letter and 3-letter country codes, and official language. Some changes were then made manually, in particular to add missing languages, change the order of languages (which was not retrieved from wikidata) and in some special cases to change the country code (in particular GB to UK) and the main country name (United States of America to United States).

Country codes

ISO 3166 standard is used for the country codes.

And on Wikipedia.

Implementation

The taxonomy currently in use is found on Github.

Attributes

Each entry (country) can be accompanied by range of attributes:

  • Wikidata - Each country has a link to wikidata, like: wikidata:en:Q31
  • Languages - A list of official languages in preferred order, like language_codes:en:nl,fr,de
  • ISO two-letter country codes, like country_code_2:en:BE
  • ISO three-letter country codes, like country_code_3:en:BEL

Usage

Where is this taxonomy used?

Maintenance

Which changes are allowed?