When building 17 Fit, a privacy-first AI calorie and macro tracker for iPhone, iPad, and Apple Watch, one of our biggest engineering challenges wasn't the AI photo recognition—it was cleaning and normalizing nutrition data across 20 languages.
Most calorie trackers rely on unverified, crowd-sourced entries where users input whatever they see on a label, often mixing up raw and cooked weights or leaving micronutrients as 0. We wanted our web and in-app catalog of 2,500+ food calories and nutrition facts to rely strictly on verified national food composition databases: USDA FoodData Central (SR Legacy & FNDDS), ANSES-CIQUAL (France), CoFID (UK), BLS (Germany), and Fineli (Finland).
Here are the four main data normalization problems we had to solve:
Total Carbs (US) vs. Available Carbs (EU)
In the US (USDA), carbohydrate values include dietary fiber. In the European Union (under EU Regulation 1169/2011), food labels list available carbohydrates (excluding fiber). To make our data consistent for European users, we recalculated USDA entries to separate fiber from available carbs, ensuring accurate macro math across all regions.Removing US Mandatory Food Enrichment for European Markets
In the United States, grain products (flour, rice, pasta) are enriched by law with iron and B vitamins, and milk is fortified with vitamins A and D. When displaying these basic foods for users in Europe, raw USDA numbers would give false micronutrient totals. We built a pipeline that strips mandatory US enrichment values so the baseline matches unfortified European equivalents."Unknown Isn't Zero"
If a national database hasn't tested a food item for a specific micronutrient (like biotin, iodine, or pantothenic acid), standard trackers display0 mg (0%). That misleads users tracking micronutrient deficiencies. In our architecture, missing values are explicitly flagged as "no data" rather than zero. Where a primary record lacks specific vitamins, we cross-reference secondary national registries—for example, combining USDA SR Legacy with Germany's BLS database on pages like our lemon nutrition profile.Multi-Ingredient Dishes & Regional Recipes
National databases rarely include local culinary dishes. For regional soups and complex meals—such as our pickle soup (rozsolnyk) breakdown—we calculate macros, vitamins, and energy density algorithmically from standardized ingredient recipes using FNDDS and SR Legacy records, accounting for moisture loss and cooking yield.
All of these calculations—alongside our BMR, TDEE, and calorie deficit tools—are available directly on the web in 20 languages (including our Ukrainian localization) with zero ads, zero pop-ups, and no third-party trackers.
All project links & tools: https://linktr.ee/17fit
Top comments (0)