ResultsMotivated.com

Nutrition Labels for Data

<2024-08-14>

1. Nutrition labels

Standardized nutrition facts labels are a mundane part of everyday life. There are so many nutrition facts labels in the world that it is pretty much impossible to avoid them. If you step outside in a populated area and there is a piece of trash blowing in the wind, there is a good chance that piece of trash has a nutrition facts label. Nutrition facts labels are an icon of material culture.

For reference, here is the law that governs nutrition facts labels in the United States: https://www.ecfr.gov/current/title-21/chapter-I/subchapter-B/part-101/subpart-A/section-101.9

An interesting question is how hard it would be to draw up a nutrition facts label that meets these complicated specifications. The website www.nutritionfacts-labels.com demonstrates a straightforward solution to this problem. By reverse engineering, it is possible to observe that this website works by substituting the relevant numbers into a hard-coded SVG template. But this is not satisfying because it doesn't explain how they created the underlying template in the first place.

What's more interesting is to explore what can be accomplished by stepping outside the bounds of the CFRs. It is easy to come up with a design which more or less looks like a nutrition facts label and captures the spirit of the design which is natural to implement in code and capable of displaying more than just the nutrition data of a food product.

Nutrition Facts 8 servings per container Serving size 2/3 cup (55g) Amount per serving Calories 123 % Daily Value* Total Fat 8g 10% Saturated Fat 1g 5% Trans Fat 0g Cholesterol 0mg 0% Sodium 160mg 7% Total Carbohydrate 37g 13% Dietary Fiber 4g 14% Total Sugars 12g Includes 10g Added Sugars 20% Protein 3g Vitamin D 2mcg 10% Calcium 260mg 20% Iron 8mg 45% Potassium 240mg 6% * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

Modified: 2024-09-10 10:09:58 EDT

Emacs 29.1.50 (Org mode 9.7.6)