Menu

How we normalized USDA and EU food databases for 2,500+ items in our iOS nutrition app
📰

How we normalized USDA and EU food databases for 2,500+ items in our iOS nutrition app

DEV Community: ios·17 Fit·about 10 hours ago
#Jfw3WDfG
#devtoios#devto#dev#food#usda
Reading 0:00
15s threshold

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).…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.