skip to primary navigation skip to content

Studying at Cambridge

DAPA Measurement Toolkit


Data processing


Analysis of dietary data is a two-step process involving:

  1. The measurement of food consumption using dietary assessment tools
  2. The conversion of reported dietary intakes into estimates of nutrient data

The conversion of reported dietary intakes into estimates firstly requires coding of data. The accuracy of data obtained from studies and final estimates depend on the precision and completeness of the initial measurement of consumption, consistency and precision during coding, and use of a representative and comprehensive food composition database. The following sections outline the processes involved in converting collected dietary data to estimates of food and nutrient intake.

Computer-based dietary assessment (e.g. INTAKE24 [2]) facilitates data entry and automatically processes dietary data. Underlying algorithms and related assumptions of the automated system are common with those needed in use of a traditional dietary assessment.

The coding process used depends on dietary assessment methods:

  • Coding of open-ended data (from weighed or estimated food diaries, or 24-hour recalls): Generally carried out using an electronic database which is searched by the coder to match food items reported with a food or food code on the system (e.g. food composition table) [3].
  • Cording of dietary data with a fixed list of dietary items (from a food-frequency questionnaire): Generally, when the list of items is created during the design phase, every item on a list should be matched to items on the system. Thus, no effort is generally needed for a coder to match reported items with items on the system.
  • If temporal and geographical information becomes available as common in diet records and recalls, such attributes can be coded.

In each case, a reported or fixed item can be matched to multiple food items on the system. For example, reported consumption of ‘pizza’ may be matched to:

  • A single item of ‘pizza’ in a food composition table
  • Three items of ‘pizza’ from three different brands, with 33% weight each
  • Multiple items of flour, tomato, cheese, salt, and others on the basis of a recipe documented from a culinary society

This process requires assumptions of typical dietary consumption in a population and depends on availability of items in a food composition table. Ideally the matching procedure is developed with detailed observations of dietary consumption in a population (e.g. multiple-day weighed food diaries) and validated by objective methods (e.g. duplicate diet).

Potential sources of error

(i) Difficulties in interpreting written details in food diaries or 24 hour recalls, for example:

  • Food diaries completed by young children (or even adults), it may be difficult to read if the clarity of writing and spelling is poor.
  • Information obtained during an interviewer administered 24 hour recall may be poorly documented by the interviewer.

(ii) Coding which does not best match the food or beverage actually consumed, for example:

  • Coding a pot of yoghurt as standard yoghurt when low-fat yoghurt was reported in the food diary.
  • Coding a pot of yoghurt as standard yoghurt when low-fat yoghurt was actually consumed, but reported without any details.
  • Incorrect assumptions assigned to food items listed in a food-frequency questionnaire, which could readily happen when a population used in development of the questionnaire is different from the study population.

(iii) Human error; making mistakes during food coding, for example:

  • Number displacement. Mistakenly coding 200g of pasta rather than the quantity reported in the diary e.g. 100g.
  • Forgetting to code spread (e.g. butter or margarine) twice i.e. for each slice of bread when a sandwich is coded.
  • When it has been reported that half a cup of tea has been drunk, halving only the weight of tea consumed and not the weight of milk and sugar.

(iv) Personal characteristics of the food coder may also influence a coder’s judgement when interpreting a food record [1], for example:

  • Age
  • Nationality
  • Familiarity with cooking
  • Views on portion sizes
  • Personal eating habits
  • Degree of familiarity with the population being investigated

Standardisation of coding process

The coding process involves numerous assumptions and judgements. In the process of coding open-ended dietary data, some degree of estimation and intuition is involved, irrespective of the skill and experience of the coder. Research groups have endeavoured to minimise the errors involved with coding by providing training for dietary coders and implementing quality control checks [15].

Attempts have been made to standardise the coding process [5]. For instance, a code book was designed for use in the INTERMAP study [3] which acted as a ‘rule book’. Its aim was to remove the need for coders to make subjective decisions.

The number of errors during coding may also be minimised if ‘coding rules’ are established to deal with incomplete or ambiguous entries in the food record [3]. For instance, the dietary coding manual (see Figure D.1.13) developed for use in the Infant Feeding Peer Support Trial provides standard infant portion sizes for commonly consumed food and drinks as well as listing default entries to aid coders in the coding process.

Figure D.1.13 Example of dietary coding manual page for baby foods from Infant Feeding Peer Support Trial.
Source: Department of Public Health and Epidemiology, University College London.

Key considerations

Key considerations or guidelines for improving the coding process include the following: [1, 3]:

  • Train a coder to get familiar with the types of foods and supplement products consumed by the study population. An example is use of a duplicate diet or direct observation to assess quantitative accuracy of food coding of interview-based 24-hour recall.
  • Become accustomed with the workings of the dietary analysis programme and its food composition database.
  • Asking respondents to keep packaging of e.g. ready meals and unusual processed foods to return with the record can help with identification and coding.
  • Adopt a standardised protocol for handling the coding of each new/substitute food item (‘food rules’) so that all coders deal with these items in a consistent manner.
  • Develop a ‘code book’ or set of default rules to deal with missing information for certain types of foods and beverages e.g. for unknown types of cooking fat or an unknown type of milk added to a bowl of cereal.
  • Implement quality control procedures such as routine spot-checks. It is good practice to check all entries keyed by new coders until the error rate drops to acceptable levels. Thereafter, a pre-agreed % error may be checked on a regular basis as a means of ongoing quality control.
  • Independent duplicate coding by two coders.
  • Validation study with sensitivity analyses pertaining different assumptions and judgements.
  • Keep the database up-to-date by updating nutritional composition data on foods already listed on the database and adding new foods.
  • Keep an inventory of food composition information for foods that are not included in the food composition database. This may be particularly the case for niche foods such as sports products or low-fat varieties, or baby and toddler foods.
  • Edit checks in software to prevent gross data entry errors so you can't enter 1000g of pasta instead of 100g.

Coding programmes for a food frequency questionnaire

scanner. Once dietary intake information has been formatted electronically, a computer program is operated to generate data on dietary intakes. A wide range of computer systems (of varying quality) are available to help with nutritional analysis.

Analysis software links consumption data to a food composition data (e.g. that provided by McCance and Widdowson’s The Composition of Foods [7]).

Universities or research centres tend to develop their own software and databases which may contain specific information on particular nutrients or food constituents. Analysis programs have been specifically developed for use in large cohort studies. Examples include DINER (Data Into Nutrients for Epidemiological Research) [15], CAFE (Compositional Analyses from Frequency Estimates) [14] and FETA (FFQ EPIC Tool for Analysis) designed for use in the EPIC-Norfolk study into diet and cancer [11].

Commercially available coding programmes are also available, for example:

  • CompEat
  • Dietplan6
  • Microdiet
  • Nutmeg Menu Planner
  • Saffron Nutrition
  • WinDiets Research
  • WISP

Such coding programmes can vary greatly in their design, utility, and target audience e.g. health professionals, catering establishments, sports industries, nutritionists and dieticians or for personal use.

Which coding programme to use?

As seen above, a large range of options is available. The choice of coding programme will depend on the population being studied and should therefore incorporate appropriate foods and portion sizes within its nutritional database. For example, if the nutritional intake of infants and young children is being examined foods normally consumed by these age groups should be available within the programme.

Ideally, analysis programmes should be flexible, and easily updateable to add new variables and to keep abreast of the changing food supply. It is estimated that about 10,000 foods are modified, appear or are discontinued each year in the UK [15].

Types of variables generated from consumption data

Depending on available data collected and research interests, diverse variables can be generated.

  • An amount of consumption of nutrients, foods, and food groups
  • Frequency of consumption of foods and food groups
  • Frequency of dietary consumption in a certain dietary setting (e.g. breakfast)

A data processing algorithm can embed calculation of degrees of nutritional adequacy in a nutrient level or a whole-diet level from a dietary data. Such an algorithm is useful when a purpose of a dietary assessment is for screening of nutritional adequacy or when a researcher likes to provide timely feedback to participants.

Food composition databases

Food composition databases provide detailed information on the nutritional composition of foods. These databases may be:

Currently there are over 150 food composition tables and electronic databases in existence worldwide [6]. The LanguaL website [4] (an international framework for food description) provides links to food composition databases from various countries which are currently available online.

Variation in food composition databases

Food composition databases vary greatly in terms of number and detail of nutrients and other food chemicals included. Please see the dedicated page for more detail on the potential sources of error associated with use of food composition databases.


  1. Braakhuis AJ, Meredith K, Cox GR, Hopkins WG, Burke LM. Variability in estimation of self-reported dietary intake data from elite athletes resulting from coding by different sports dietitians. Int J Sport Nutr Exerc Metab. 2003;13(2):152-65.
  2. Bradley J, Simpson E, Poliakov I, Matthews JN, Olivier P, Adamson AJ, et al. Comparison of INTAKE24 (an Online 24-h Dietary Recall Tool) with Interviewer-Led 24-h Recall in 11-24 Year-Old. Nutrients. 2016;8(6).
  3. Conway R, Robertson C, Dennis B, Stamler J, Elliott P. Standardised coding of diet records: experiences from INTERMAP UK. Br J Nutr. 2004;91(5):765-71.
  4. Danish Food Informatics. LanguaL - the International Framework for Food Description [cited 2016 1st December]. Available from:
  5. Englyst HN, Quigley ME, Hudson GJ. Definition and measurement of dietary fibre. Eur J Clin Nutr. 1995;49 Suppl 3:S48-62.
  6. European Food Information Resource. European Food Information Resource [cited 2016 1st December]. Available from:
  7. Food Standards Agency. McCance and Widdowson's the Composition of Foods. Seventh Summary ed. Cambridge: Royal Society of Chemistry; 2014.
  8. Gibson RS. Principles of Nutritional Assessment 2ed. Oxford: Oxford University Press; 2005.
  9. Greenfield H, Southgate DAT. Food Composition Data: Production, Management and Use (2nd edn.). London Elsevier; 2003.
  10. Ishihara J, Inoue M, Kobayashi M, Tanaka S, Yamamoto S, Iso H, et al. Impact of the revision of a nutrient database on the validity of a self-administered food frequency questionnaire (FFQ). J Epidemiol. 2006;16(3):107-16.
  11. Mulligan AA, Luben RN, Bhaniani A, Parry-Smith DJ, O'Connor L, Khawaja AP, et al. A new tool for converting food frequency questionnaire data into nutrient and food group values: FETA research methods and availability. BMJ Open. 2014;4(3).
  12. Prosky L. What is dietary fiber? J AOAC Int. 2000;83(4):985-7.
  13. Schakel SF, Dennis BH, Wold AC, Conway R, Zhao L, Okuda N, et al. Enhancing data on nutrient composition of foods eaten by participants in the INTERMAP study in China, Japan, the United Kingdom, and the United States. ‎J Food Comp Anal.2003;16(3):395-408.
  14. Welch AA, Luben R, Khaw KT, Bingham SA. The CAFE computer program for nutritional analysis of the EPIC-Norfolk food frequency questionnaire and identification of extreme nutrient values. J Hum Nutr Diet. 2005;18(2):99-116.
  15. Welch AA, McTaggart A, Mulligan AA, Luben R, Walker N, Khaw KT, et al. DINER (Data Into Nutrients for Epidemiological Research) - a new data-entry program for nutritional analysis in the EPIC-Norfolk cohort and the 7-day diary method. Public Health Nutr. 2001;4(6):1253-65.