Food Traceability Codes: Difference between revisions

From Open Food Facts wiki
No edit summary
No edit summary
 
(100 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This project aims to investigate all non-standard codes, usually printed on the packaging using a machine, such as batch numbers, the quality numbers ... and get the most information possible.
= TL;DR =
TL;DR: This project aims to decode packaging codes and all non-standard codes, usually printed on the packaging using a machine, such as batch numbers, the quality numbers ... and get the most information possible.


=== EMB Codes ===
=Codes by country or region=
 
== Australia ==
== Austria ==
== Belgium ==
== Bulgaria ==
== Canada ==
== Croatia ==
== Cyprus ==
== Czech Republic ==
== Denmark ==
== Estonia ==
==Europe==
Businesses in the EU handling food products, whether for human consumption or not, must be registered. In some cases, they cannot operate unless approved by their country's competent authority. EU countries draw up public lists of the approved establishments.
 
In accordance with Regulation (EC) No 852/2004 of the European Parliament and of the Council of 29 April 2004 on the hygiene of foodstuffs, establishments preparing foodstuffs must be registered in each Member State. Furthermore, establishments handling products of animal origin for which hygiene conditions are laid down in '''Regulation (EC) No 853/2004 (http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:300:0001:0033:EN:PDF)''' of the European Parliament and of the Council of 29 April 2004 laying down specific rules for food of animal origin, must be approved by the competent authority of each Member State. According to Regulation (EC) No 882/2004 of the European Parliament and of the Council of 29 April 2004 on official controls performed to ensure the verification of compliance with feed and food law, animal health and animal welfare rules, Member States must make up-to-date lists of such establishments available to other Member States and to the public.
 
In order to assist Member States in making up-to-date lists available to other Member States and to the public, the Commission has created a single, central and easy access to the different lists of approved food establishments published by each Member State.
 
Every national website is to contain a first page regrouping food activities for which approval is compulsory. For ease of reference, this masterlist is developed following the sequence of the sections in '''Annex III to Regulation (EC) No 853/2004 (http://eur-lex.europa.eu/legal-content/EN/ALL/?uri=OJ:L:2004:226:TOC)'''. Technical specifications pdf have been prepared to ensure wide availability of the information concerning these establishments and to improve the readability of the lists. They include layouts, together with relevant information and codes used to describe food activities.
 
There are also regulations for animal by-products and feed sector.
 
Member States will have to comply with these specifications as from 1 January 2007.
=== EU Food Establishments (Estampille Sanitaire) ===
* Food Establishments subpage: https://en.wiki.openfoodfacts.org/Food_Traceability_Codes/EU_Food_establishments
* Extraction scripts on Github : https://github.com/openfoodfacts/eu-food-data
*Example: FR 38.012.001 CE
*Deux premières lettres = pays, deux premiers chiffres = département, trois chiffres suivants = commune au code INSEE, trois derniers chiffres = établissement
*Estampille sanitaire est délivrée par autorité du pays.
*Les entreprises obtenant une estampille sanitaire sont organisées par Sections (entreposage, abattage volaille ...). Un travail de normalisation de ces sections sur l'ensemble des pays européens est en cours par les équipes de OFF.


=== EU Food Establishments ===
* http://en.wiki.openfoodfacts.org/Project:Food_establishments
* https://github.com/openfoodfacts/eu-food-data
* French list: http://agriculture.gouv.fr/liste-des-etablissements-agrees-ce
* French list: http://agriculture.gouv.fr/liste-des-etablissements-agrees-ce
* See list of country codes EMB: http://ec.europa.eu/food/food/biosafety/establishments/list_en.htm
* See list of country codes: https://ec.europa.eu/food/food/biosafety/establishments/list_en.htm


=== EU Organic Codes ===
=== EU Organic Codes ===
* https://github.com/openfoodfacts/bio-codes
* Integrated as sub-labels
== Finland ==
== France ==
See [[Food Traceability Codes/France|France]] for food codes specific to France
== Germany ==
== Greece ==
== Hungary ==
== Ireland ==
== Israel ==
== Italy ==
== Japan ==
== Latvia ==
== Lithuania ==
== Luxembourg ==
== Malta ==
== New Zealand ==
== Netherlands ==
== Norway ==
== Poland ==
== Portugal ==
== Romania ==
==Russian Federation==
* http://www.fsvps.ru/fsvps/importExport?_language=en
* Example for a French company: https://www.fsvps.ru/fsvps/importExport/france/enterprise.html?id=18640&_language=en
== Slovakia ==
== Slovenia ==
==Spain==
*AECOSAN http://www.aecosan.msssi.gob.es/
*Search Engine: http://rgsa-web-aesan.msssi.es/rgsa/formulario_ue_js.jsp
=== Spanish wines ===
I found the "Bodegas" directory in the "Consejo Regulador" site: http://es.riojawine.com/multimedia/files/directorio.xls There you can find the row: Pernod Ricard Winemakers Spain (Campo Viejo) with "Reg Embotellador" = "1.850-LO" Our number!! This is in the city of Logroño (the capital of La Rioja) and the street is "La Rad de Santa Cruz, s/n".
==== Spanish packaging codes site : RGSEAA number ====
* the RGSEAA number that is used to build the ES RGSEAA EC number
* website: http://rgsa-web-aesan.msssi.es/rgsa/formulario_principal_js.jsp web,
* If you look at it, with that information (Razón Social=Pernod Ricard Winemakers Spain; Localidad=Logroño), you get the only number: 30.00641/LO (i.e. ES 30.00641/LO CE). The address also matches the data.
**The winery celler (bodega) is this, just by curiosity :-)
http://www.pernodricardbodegas.com/bodegas/campo-viejo/la-bodega/?lang=en
http://www.aesan.msssi.gob.es/aesa/web/AESA.jsp
* All the associated companies and locations for the Spanish packaging codes (not only the animal derived ones) can be retrieved from: http://rgsa-web-aesan.msssi.es/rgsa/formulario_principal_js.jsp
* I keep a data sheet with all codes downloaded from that site.
** My last version is from 24-10-2014, so I guess is pretty up-to-date.
** I can upload the file if you want to some place (github, dropbox, ....).
** It is in odt format (openoffice/libreoffice) but I can convert it to another format if needed.
I also have a table (in wiki format) with the codes of the products added by myself with the name of the company, parent company, location and some other information. It is basically the info that I use to include beside the EU code or Tax Identification number and in the location of the processing company field. I have to clean it a bit and I'll post it here in a new wiki page.The only problem that I can see to match locations with locations in OpenStreetMap is that the first document uses for the places where other languages are used (beside to Spanish), sometimes the traditional name in Spanish, sometimes the name in the local language (basque, catalan...) and in other cases both. A mesh! In my table I use normally the Spanish names. We'll see if some modification have to be done to match with OpenStreetMap location names, whatever they are...Maybe a new field can be added to the app to put in there the company name (and parent companies) that match the EU packaging code (and match also the location of manufacturing or processing place). I normally include that information beside the packaging code, but that's ugly :wink: "
==== Is there a licence / terms of use for http://rgsa-web-aesan.msssi.es/rgsa/formulario_principal_js.jsp ? ====
I am looking inside the site (not just the searching engine) and I can't see anything regarding to the license or term of use. It's a public register depending on the public administration, so I don't think there is any problem to get the data. Otherwise wouldn't be available to the public.
====Can we just scrape it to get the data for all the ES packaging codes we have in the database? ====
>> Yes, the only problem can be the significative "zeros" after the key. The format is: AA.xxxxxx/BB, where AA is the key of the type of food (i.e. vegetables, fish, processed products...), BB is the province and xxxxxx is the number. But zeros at the beginning of the number are nor significatives. I mean, 21.000345/MA and 21.345/MA represent the same number. When OFF started 2 years ago, the engine presented always 6 digit. Now, show you normally 5. Well... summarizing, right now in OFF not always match the number (counting zeros) with the number in the RGSA datebase. So, if you write a script to retrieve the data you'll have to take that in consideration.
works with a GET request:
>> Yes, you can recuperate the data with a GET request with code or a script. I particularly get the data from the "easy" way: just write the key that I am lookin for (for example 21) in the space for the 2 first digit in the "N° RGSEAA:" field.  After searching you get all the results for that particular key and then you choose the "Exportar Excel" option. You can do the same for all the keys and join all the data in a table in a local database, a datasheet or wathever...


=== FSC Codes ===
== Sweden ==
== United Kingdom ==
in the UK, all figures is a code attributed directly by the FSA, when one or two letters followed by figures are code attributed by local authorities (the letters identify the local authority). But some UK codes also include an "S" after the figures, we still don't know why.
== United States ==
===Fruits & Vegetables===
http://www.motherjones.com/environment/2014/09/fruit-veggies-produce-origins-trade-secret


=== MSC Codes ===
 
 
 
 
=Codes by product=
==Fruits & Vegetables==
[[Food Traceability Codes/Fruits and vegetables]]
 
== FSC Codes (Packaging) ==
* Those are codes for the paper or cardboard used for packaging.
* FSC - Forest Stewardship Council
* https://info.fsc.org/details.php?id=a0240000005sQs5AAE&type=certificate&return=certificate.php
* https://world.openfoodfacts.org/labels (filter with "FSC")
 
==FAO Fisheries & Aquaculture Codes==
* http://www.fao.org/fishery/area/search/en
* [[Global origins taxonomy]]
 
== MSC Codes ==
* https://github.com/openfoodfacts/msc-codes
* https://github.com/openfoodfacts/msc-codes
* MSC (sustainable fishing) label can be easily accessed with precision, it would be nice to put a link to the website of the MSC with information from fisherman.
* MSC (sustainable fishing) label can be easily accessed with precision, it would be nice to put a link to the website of the MSC with information from fisherman.
Line 19: Line 128:
By putting this code in the URL of the MSC, it gets the name and origin of the fisherman http://cert.msc.org/supplierdirectory/VController.aspx?CertNr=MML-C-1021
By putting this code in the URL of the MSC, it gets the name and origin of the fisherman http://cert.msc.org/supplierdirectory/VController.aspx?CertNr=MML-C-1021


=== PLU Codes ===
There are approximately 1000+ products with this label that could be linked
* http://www.plucodes.com/docs/PLU_List_Commodity_Varietal_Bilingual.pdf
https://world.openfoodfacts.org/label/sustainable-seafood-msc
* https://docs.google.com/spreadsheets/d/1YieZxWFHv9bAHO9zRW4I5_ghnId5B2oxVz72vMvTF-I/edit#gid=1530069957
*  http://legufrulabelofolie.fr/index.php
* https://openfoodfacts.slack.com/files/teolemon/F02M8KZKV/minimalversion.xlsx


=== Soil Association ===
== Soil Association ==
organic food
* www.soilassociation.org
* www.soilassociation.org
* http://www.sacert.org/fooddrink/findalicensee
* https://www.sacert.org/fooddrink/findalicensee
* they seems to provide a number such as DA20245
* they seems to provide a number such as DA20245
=== Spanish wines ===
I found the "Bodegas" directory in the "Consejo Regulador" site: http://es.riojawine.com/multimedia/files/directorio.xls There you can find the row: Pernod Ricard Winemakers Spain (Campo Viejo) with "Reg Embotellador" = "1.850-LO" Our number!! This is in the city of Logroño (the capital of La Rioja) and the street is "La Rad de Santa Cruz, s/n".
Then if you look at the spanish packaging codes site (the RGSEAA number that is used to build the ES RGSEAA EC number) in the http://rgsa-web-aesan.msssi.es/rgsa/formulario_principal_js.jsp web, with that information (Razón Social=Pernod Ricard Winemakers Spain; Localidad=Logroño), you get the only number: 30.00641/LO (i.e. ES 30.00641/LO CE). The adress also match the data.
The winery celler (bodega) is this, just by curiosity :simple_smile:  http://www.pernodricardbodegas.com/bodegas/campo-viejo/la-bodega/?lang=en
http://www.aesan.msssi.gob.es/aesa/web/AESA.jsp


=== Import / Export Codes of the Russian Federation ===
== Egg Codes ==
* http://www.fsvps.ru/fsvps/importExport?_language=en
* Example for a French company: http://www.fsvps.ru/fsvps/importExport/france/enterprise.html?id=18640&_language=en
=== Egg Codes ===
* https://github.com/openfoodfacts/egg-codes
* https://github.com/openfoodfacts/egg-codes
* [[Project:Eggs]]


=== Bio Codes ===
== Bio Codes (EU)==
* https://github.com/openfoodfacts/bio-codes
* https://github.com/openfoodfacts/bio-codes
 
* Integrated as sub-labels
==Methodology to extract data==
[[Category:Food codes]]
===General===
== Get in touch ==
* All data (url list and data files) can be found here https://github.com/openfoodfacts/eu-food-data
{{Box
**There is a general csv file with the general link to the data repository for each country: https://github.com/openfoodfacts/eu-food-data/blob/master/list-eu-and-partner-countries.csv
| 1    = Slack channel
**There are individual folders for each target country (specific url-list for each European Agreement Section and data files)
| 2    = [https://openfoodfacts.slack.com/messages/C02LB7AV0/ #packaging_codes]
* A google sheet document is used to map all files available in the target countries. It also map the section name for every country in its own language (or translation in English) and the related European Section, which is used as a general taxonomy.
}}
This Google Sheet can be found here: https://docs.google.com/spreadsheets/d/1egdo58Ds8PNi5G_4F2UtWOWC1V0k3tXBgPhZXs5FRqM/edit?usp=sharing
===France===
*I just build a script that takes all the french agreement info from Agriculture Ministry and concatenate them in one file. Next step is to do the same for UK. The step after that is to cleverly agregate the duplicates (some companies have several health agreements under the same agreement number)
https://github.com/openfoodfacts/eu-food-data/blob/master/scripts/FR-script.py
This script use this file to get the list of URL to retrieve https://github.com/openfoodfacts/eu-food-data/blob/master/fr/urls-fr.txt
*First work performed on
===UK===
*As UK is divided in 4 regions (Ireland, England, Wales and Scotland) and because they have different file format, we use a 3-file script
https://github.com/openfoodfacts/eu-food-data/blob/master/scripts/UK-urls.txt => all UK urls
https://github.com/openfoodfacts/eu-food-data/blob/master/scripts/UK-methods.txt => list which method to use depending on the file type
https://github.com/openfoodfacts/eu-food-data/blob/master/scripts/UK-script.py => the script itself
===DE===
*@vince has per
 
 
[[fr:Projet:Codes_propriétaires]]

Latest revision as of 07:57, 20 August 2024

TL;DR

TL;DR: This project aims to decode packaging codes and all non-standard codes, usually printed on the packaging using a machine, such as batch numbers, the quality numbers ... and get the most information possible.

Codes by country or region

Australia

Austria

Belgium

Bulgaria

Canada

Croatia

Cyprus

Czech Republic

Denmark

Estonia

Europe

Businesses in the EU handling food products, whether for human consumption or not, must be registered. In some cases, they cannot operate unless approved by their country's competent authority. EU countries draw up public lists of the approved establishments.

In accordance with Regulation (EC) No 852/2004 of the European Parliament and of the Council of 29 April 2004 on the hygiene of foodstuffs, establishments preparing foodstuffs must be registered in each Member State. Furthermore, establishments handling products of animal origin for which hygiene conditions are laid down in Regulation (EC) No 853/2004 (http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:300:0001:0033:EN:PDF) of the European Parliament and of the Council of 29 April 2004 laying down specific rules for food of animal origin, must be approved by the competent authority of each Member State. According to Regulation (EC) No 882/2004 of the European Parliament and of the Council of 29 April 2004 on official controls performed to ensure the verification of compliance with feed and food law, animal health and animal welfare rules, Member States must make up-to-date lists of such establishments available to other Member States and to the public.

In order to assist Member States in making up-to-date lists available to other Member States and to the public, the Commission has created a single, central and easy access to the different lists of approved food establishments published by each Member State.

Every national website is to contain a first page regrouping food activities for which approval is compulsory. For ease of reference, this masterlist is developed following the sequence of the sections in Annex III to Regulation (EC) No 853/2004 (http://eur-lex.europa.eu/legal-content/EN/ALL/?uri=OJ:L:2004:226:TOC). Technical specifications pdf have been prepared to ensure wide availability of the information concerning these establishments and to improve the readability of the lists. They include layouts, together with relevant information and codes used to describe food activities.

There are also regulations for animal by-products and feed sector.

Member States will have to comply with these specifications as from 1 January 2007.

EU Food Establishments (Estampille Sanitaire)

  • Food Establishments subpage: https://en.wiki.openfoodfacts.org/Food_Traceability_Codes/EU_Food_establishments
  • Extraction scripts on Github : https://github.com/openfoodfacts/eu-food-data
  • Example: FR 38.012.001 CE
  • Deux premières lettres = pays, deux premiers chiffres = département, trois chiffres suivants = commune au code INSEE, trois derniers chiffres = établissement
  • Estampille sanitaire est délivrée par autorité du pays.
  • Les entreprises obtenant une estampille sanitaire sont organisées par Sections (entreposage, abattage volaille ...). Un travail de normalisation de ces sections sur l'ensemble des pays européens est en cours par les équipes de OFF.

EU Organic Codes

Finland

France

See France for food codes specific to France

Germany

Greece

Hungary

Ireland

Israel

Italy

Japan

Latvia

Lithuania

Luxembourg

Malta

New Zealand

Netherlands

Norway

Poland

Portugal

Romania

Russian Federation

Slovakia

Slovenia

Spain

Spanish wines

I found the "Bodegas" directory in the "Consejo Regulador" site: http://es.riojawine.com/multimedia/files/directorio.xls There you can find the row: Pernod Ricard Winemakers Spain (Campo Viejo) with "Reg Embotellador" = "1.850-LO" Our number!! This is in the city of Logroño (the capital of La Rioja) and the street is "La Rad de Santa Cruz, s/n".

Spanish packaging codes site : RGSEAA number

  • the RGSEAA number that is used to build the ES RGSEAA EC number
  • website: http://rgsa-web-aesan.msssi.es/rgsa/formulario_principal_js.jsp web,
  • If you look at it, with that information (Razón Social=Pernod Ricard Winemakers Spain; Localidad=Logroño), you get the only number: 30.00641/LO (i.e. ES 30.00641/LO CE). The address also matches the data.
    • The winery celler (bodega) is this, just by curiosity :-)

http://www.pernodricardbodegas.com/bodegas/campo-viejo/la-bodega/?lang=en http://www.aesan.msssi.gob.es/aesa/web/AESA.jsp

  • All the associated companies and locations for the Spanish packaging codes (not only the animal derived ones) can be retrieved from: http://rgsa-web-aesan.msssi.es/rgsa/formulario_principal_js.jsp
  • I keep a data sheet with all codes downloaded from that site.
    • My last version is from 24-10-2014, so I guess is pretty up-to-date.
    • I can upload the file if you want to some place (github, dropbox, ....).
    • It is in odt format (openoffice/libreoffice) but I can convert it to another format if needed.

I also have a table (in wiki format) with the codes of the products added by myself with the name of the company, parent company, location and some other information. It is basically the info that I use to include beside the EU code or Tax Identification number and in the location of the processing company field. I have to clean it a bit and I'll post it here in a new wiki page.The only problem that I can see to match locations with locations in OpenStreetMap is that the first document uses for the places where other languages are used (beside to Spanish), sometimes the traditional name in Spanish, sometimes the name in the local language (basque, catalan...) and in other cases both. A mesh! In my table I use normally the Spanish names. We'll see if some modification have to be done to match with OpenStreetMap location names, whatever they are...Maybe a new field can be added to the app to put in there the company name (and parent companies) that match the EU packaging code (and match also the location of manufacturing or processing place). I normally include that information beside the packaging code, but that's ugly :wink: "

Is there a licence / terms of use for http://rgsa-web-aesan.msssi.es/rgsa/formulario_principal_js.jsp ?

I am looking inside the site (not just the searching engine) and I can't see anything regarding to the license or term of use. It's a public register depending on the public administration, so I don't think there is any problem to get the data. Otherwise wouldn't be available to the public.

Can we just scrape it to get the data for all the ES packaging codes we have in the database?

>> Yes, the only problem can be the significative "zeros" after the key. The format is: AA.xxxxxx/BB, where AA is the key of the type of food (i.e. vegetables, fish, processed products...), BB is the province and xxxxxx is the number. But zeros at the beginning of the number are nor significatives. I mean, 21.000345/MA and 21.345/MA represent the same number. When OFF started 2 years ago, the engine presented always 6 digit. Now, show you normally 5. Well... summarizing, right now in OFF not always match the number (counting zeros) with the number in the RGSA datebase. So, if you write a script to retrieve the data you'll have to take that in consideration.

works with a GET request: >> Yes, you can recuperate the data with a GET request with code or a script. I particularly get the data from the "easy" way: just write the key that I am lookin for (for example 21) in the space for the 2 first digit in the "N° RGSEAA:" field. After searching you get all the results for that particular key and then you choose the "Exportar Excel" option. You can do the same for all the keys and join all the data in a table in a local database, a datasheet or wathever...

Sweden

United Kingdom

in the UK, all figures is a code attributed directly by the FSA, when one or two letters followed by figures are code attributed by local authorities (the letters identify the local authority). But some UK codes also include an "S" after the figures, we still don't know why.

United States

Fruits & Vegetables

http://www.motherjones.com/environment/2014/09/fruit-veggies-produce-origins-trade-secret



Codes by product

Fruits & Vegetables

Food Traceability Codes/Fruits and vegetables

FSC Codes (Packaging)

FAO Fisheries & Aquaculture Codes

MSC Codes

For example 3256224531289 Product code indicating the MSC "MML-C-1021." By putting this code in the URL of the MSC, it gets the name and origin of the fisherman http://cert.msc.org/supplierdirectory/VController.aspx?CertNr=MML-C-1021

There are approximately 1000+ products with this label that could be linked https://world.openfoodfacts.org/label/sustainable-seafood-msc

Soil Association

organic food

Egg Codes

Bio Codes (EU)

Get in touch

Slack channel