kaiiam / mifc

A minimum information standard checklist formalizing the description of food composition data and related metadata.
MIT License
2 stars 1 forks source link

Create enumeration with ISO country codes #21

Open kaiiam opened 2 days ago

kaiiam commented 2 days ago

As discussed in #19 we'll have at least two fields which are about a countries either of origin or acquisition currently food_acquisition_country, food_origin_country. We should create an enum for these using the ISO codes. As discussed in #19 the question is if we should use the two (ISO 3166-1 alpha-2) or three letter ISO codes ISO 3166-1 alpha-3.

I am pretty convinced by the arguments in https://andrewwhitby.com/2021/01/08/the-right-country-codes/ that the 3 letter code is better and less ambiguous than the 2 letter code, but happy to hear arguments to the contrary. The Periodic Table of Food Initiative (PTFI) for example is using the 2 letter codes currently.

My currently plan is use python to parse the wiki page for ISO codes or similar and generate the linkML enum which uses the ISO 3 letter codes as the enum values with their the country names as the country names as the Description. Perhaps we can also map that to the ISO 2 letter codes in the Enum TBD (for me) how to do that correctly in LinkML. I don't think Meaning is correct as ISO country codes aren't IRIs/curies from a semantic web resource as far as I'm aware.

Suggestions welcome.