Inspiration The inspiration for this project came from the growing concern about climate change and the role transportation plays in carbon emissions. As individuals, we often don't realize the environmental impact of the vehicles we use for daily commuting. I wanted to build a simple web app that could help people calculate their personal carbon footprint based on transportation choices, so they can make more eco-friendly decisions.

This project combines my interest in both sustainability and technology, and I wanted to contribute in a small way to raise awareness about climate change.

What I Learned While working on this project, I gained a deeper understanding of how to use Flask for building web applications. I also explored concepts like carbon footprint calculations and how data-driven solutions can help users make more informed decisions.

This project was a great opportunity to practice integrating Python, Flask, and basic web development skills to create a functional app. I learned the importance of providing actionable suggestions to users, which can be achieved through simple interactions like a calculator.

How I Built It Backend Development: I started by using Flask for the backend, which allowed me to create a RESTful API to process user input (transportation type and distance) and calculate the carbon footprint.

Frontend Development: I used HTML and CSS to build the user interface. The design is simple, making it easy for users to interact with the app.

Carbon Footprint Calculation: Based on research, I used a simple formula to estimate the carbon emissions for various transportation types.

For example, a Car emits about 0.2 kg of CO2 per kilometer.

The formula for calculation is:

Carbon Footprint

Distance × Emission Factor Carbon Footprint=Distance×Emission Factor

Suggestions for Reduction: After calculating the carbon footprint, the app gives suggestions for reducing emissions, such as using public transportation, carpooling, or switching to electric vehicles.

Challenges Faced Accuracy of Emission Factors: One challenge I faced was determining the correct emission factors for different transportation types. I had to rely on general estimates and make sure the calculations were simple yet accurate enough for the app’s purpose.

Frontend Design: Designing the interface was initially tricky as I wanted the app to be intuitive. However, after iterating on the design, I found a minimal and user-friendly layout.

Deployment: Deploying the app to a hosting platform like Heroku was new to me, and I ran into issues configuring the environment and setting up the proper dependencies. But once I figured out the deployment process, it worked seamlessly.

Share this project:

Updates