Difference between revisions of "Countries taxonomy"

From Open Food Facts wiki
Jump to navigation Jump to search
Line 12: Line 12:
 
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].
 
== Attributes ==
 
== Attributes ==
 +
Each entry (country) can be accompanied by range of attributes:
 
* Wikidata - Each country has a link to wikidata, like: '''wikidata:en:Q31'''
 
* 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'''
 
* Languages - A list of official [[Languages taxonomy|languages]] in preferred order, like  '''language_codes:en:nl,fr,de'''

Revision as of 08:16, 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