czyykj.com

The Ultimate Free App for Tracking Food Emissions

Written on

Chapter 1: Introduction to Food Emissions Tracking

Have I gone too far with this title? Can tracking food emissions be as thrilling as a free fitness app? Let’s explore this together.

To kick things off, here’s a brief summary: Last summer, I developed a website designed to help individuals easily assess the environmental impact of their food choices. It’s free, open-source, and prioritizes user privacy. Sounds intriguing, right?

In this article, we will dive into the reasons behind the project, what it entails, and how it functions. Stay tuned for an exciting announcement at the end, and feel free to star the GitHub repository to show your support!

Section 1.1: The Importance of Tracking Food Emissions

Why is there a need for this application? Why did I dedicate my summer to creating it? Let me provide some context.

In a study published by the University of Oxford in 2019, researchers revealed that food supply chains are responsible for 26% of total human-caused greenhouse gas (GHG) emissions. Notably, meat, aquaculture, eggs, and dairy account for approximately 83% of agricultural land use while contributing to around 57% of GHG emissions, despite only providing 37% of our protein and 18% of our calories. The study concluded that shifting towards plant-based diets could lead to a 76% reduction in land use and a 49% decrease in GHG emissions. So, how does this app fit into the bigger picture?

"What cannot be measured, cannot be improved."

With the world’s population nearing 10 billion and the existing animal agriculture systems exacerbating climate change and depleting our resources, it’s crucial to rethink our dietary choices. If this app can help raise awareness about the impact of our daily food selections, then we all benefit. This is the driving force behind my summer project!

Section 1.2: What Is the App and What Does It Do?

What exactly does this application offer?

This app allows environmentally-conscious individuals and businesses to gain a clearer understanding of their food-related emissions and how to reduce them.

Tracking food emissions can be challenging. Striking a balance between accuracy and user-friendliness is essential. Many existing apps offer precise calculations, but they require users to remember specific quantities of each food type consumed, which can deter regular tracking.

"Just let me enjoy my avocado toast in peace!"

Fortunately, this app takes a different route. Instead of demanding a detailed breakdown of every food and drink consumed, users simply indicate the type of diet followed for each meal on each day. This significantly reduces the time and effort required, resulting in a more enjoyable (and somewhat addictive) user experience.

In this video, the creator explores various free food tracking apps, including insights into their functionalities and effectiveness.

After submitting your meals, you’ll be directed to a results page where you can choose how to save your data. You can download your information as a JSON or CSV file, or directly copy it into a Google Sheet or Excel document for tracking purposes (recommended). This app is designed with privacy in mind; by default, none of your data is stored remotely, and all calculations occur locally on your device. Because it is open-source, you can review the code to verify this.

Section 1.3: Data Sources and Methodology

Where does the data come from? The methodology for calculating food emissions is well-documented and version-controlled for ongoing improvements. Currently, the primary data source is Mike Berners-Lee's book, "How Bad Are Bananas?" (2020), but I welcome any suggestions or contributions to enhance the methodology and broaden the data representation. Please feel free to comment, open an issue on GitHub, or contact me directly with ideas.

Chapter 2: Technical Aspects and Privacy Considerations

In this video, the effectiveness of MyNetDiary as a free calorie tracker is assessed, providing insights into its features and benefits.

Section 2.1: How Is the App Built?

Technically, this app is a straightforward static website similar to my previous projects. It’s built using basic HTML and JavaScript, with Bootstrap V5.2 CSS for styling, which accelerated the development process. The site is hosted on GitHub Pages, with DNS managed by Cloudflare.

Now, let’s address privacy.

Since this is a static website, it doesn’t rely on external databases for information storage or external services (APIs) for calculations. Everything needed is loaded when the site is accessed. When users enter and submit their information, calculations are performed directly on their device, ensuring that no data is sent or stored remotely. You can be confident that your submitted information remains on your computer, with temporary storage in your browser’s Session Storage, which is cleared when the browser session ends.

If you wish to keep track of your emissions impact, several options are available. You can copy results from the summary page to a Google Sheet (recommended) or download them in JSON or CSV format for custom processing.

To ensure user privacy, I’ve omitted a name field from the submission form, and any data collection should be voluntary. The optional 'trip start date' further anonymizes personal data.

Section 2.2: Understanding the Data

As previously mentioned, the current methodology (V1) is based mainly on Mike Berners-Lee's book and Public Health England's nutrition principles. The data is hard-coded in the index.js file, eliminating the need for API calls and enhancing transparency. If you have any suggestions regarding data sources or methodologies, please don’t hesitate to reach out!

How is this data utilized?

Calculations for results and insights are performed using the index.js and results.js files. The emissions for each meal are calculated as follows:

Meal Emissions (kgCO2e) = Proportion of meal daily intake * Diet emissions per day (kgCO2e)

To obtain daily emissions, the sum of all Meal Emissions for each day is calculated. This is feasible because the tool allows for one breakfast, lunch, dinner, and 'everything else' per day, ensuring a complete representation of meal (and emissions) proportions throughout the tracking period.

Section 2.3: Environmental Impact

Given the project's sustainability goals, I've conducted a thorough environmental audit to assess and minimize the software's impact, aligned with the six principles of the Green Software Foundation. I’ll share this audit in a separate article, so follow me to stay updated on green software optimizations!

Wrap-Up

Now that we’ve explored the Why, What, How, and environmental aspects of this free and open-source food emissions tracker, I hope you feel inspired to try it out if you haven’t already! Please browse the code, star the GitHub repository, and share your thoughts.

Exciting Announcement

Congratulations on making it this far! 🎉 That deserves a reward. 🎁 I’m in the process of developing an enhanced fitness website and nearing the launch of a closed beta. Here’s a sneak peek: it will feature customizable training plans, fun workout generation, and real-time engagement. If you're interested in early access to the beta, sign up as an email subscriber for updates.

If you found this article helpful, you might also enjoy reading about another free and open-source project I’ve created.

References

[1] 'Reducing food's environmental impacts through producers and consumers', J. Poore, T. Nemecek, University of Oxford, 2019

[2] 'Agriculture, Forestry and Other Land Use (AFOLU)', IPCC, 2018

[3] 'How bad are bananas?', Mike Berners-Lee, Profile Books, 2020

[4] 'Healthier and more sustainable catering: Nutrition principles', Public Health England, Crown [section 6.3]

[5] 'How to be a Green Software Practitioner', Green Software Foundation

Wishing you a wonderful day ahead!

Share the page:

Twitter Facebook Reddit LinkIn

-----------------------

Recent Post:

Breaking the Norms: A Rebel's Perspective on Laws 21 to 30 from The 48 Laws of Power

Explore the 21st to 30th Laws of Power with practical insights for work and love.

Mastering Multi-Genre Writing: Four Key Benefits for Authors

Discover how writing in multiple genres can enhance your skills and connect you with diverse readers.

The Remarkable Impact of Immigrants on Rocket Science

This article highlights the significant contributions of immigrants, particularly in the field of rocket science, and the importance of embracing diversity.