Urgent.News

What's breaking now, across thousands of outlets.

Tech

Auditing 857,655 Open Food Facts labels with pandas: how many nutrition facts contradict themselves?

Open Food Facts is the largest open food database in the world. Scan a barcode in almost any calorie app and the numbers you get come from there. At Lean, where those labels feed a calorie tracker, we asked a simple question: how many of them are internally consistent? This post is the technical walkthrough. The full results, the category breakdown and the PDF are on Zenodo (DOI…

The Open Food Facts database is the largest open food database in the world, containing barcode scans from calorie apps. At Lean, they questioned how many of these labels are internally consistent. This post provides a technical walkthrough, with results available on Zenodo and summarized on lean-app.com. The coherence test compares declared energy values in kcal per 100g to calculations based on macronutrients using EU regulation 1169/2011's Atwater factors.

If there is a discrepancy, the label's accuracy is questionable. The pipeline uses pandas to filter French products, calculate macronutrient values, and identify incoherent labels. Out of 857,655 complete labels, 46,757 (5.5%) are incoherent. Protein bars have the highest incoherence rate at 20.8%, while staple foods have the lowest.

Heavy-tailed failures include 31,867 labels with more than 20% error and 18,215 with more than 50% error. Calorie trackers relying solely on label scans may inherit these errors, while trackers using Lean's additional methods for calculating burned calories are more accurate.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

CAP Theorem Finally Made Sense to Me

While studying system design, I came across something called CAP theorem. At first, it sounded simple: A distributed system can choose any two out of Consistency, Availability, and Partition…

Node.js Security Essentials: The Checklist I Use in Production

Every middleware, header, and validation rule that has actually stopped an attack — from a 7-year production record that includes one very expensive pentest. The pentest report arrived on a Tuesday.

  • Checklist compiled from 7 years of production experience to prevent Node.js attacks
  • Eight high-severity vulnerabilities, including open CORS policy and SQL injection, identified
  • Common middleware can easily prevent listed vulnerabilities in Node.js production systems

More from Saturday 5 September →