From a country’s deforestation activities to a household’s increased use of air conditioning, using Earth’s resources contributes to carbon emissions and spurs global warming. Some consequences of large carbon footprints include shrinking water supplies, increasing incidents of severe weather, and changes in the food supply. Most people do not have a tangible idea of how much they impact the environment, but emission can change that.

We wanted to create a carbon footprint calculator that also educates users on how to become more green, and keeps track of their progress over time. This encourages users to form new habits, compete with their friends, and learn about their direct impact on the environment.

What it does

By using emission, users can keep themselves and their friends accountable for their impacts on the environment. Each day, users take a short quiz that is used to calculate their CO2 emissions based on transportation, diet, energy, wardrobe, water usage, and recycling habits. Emission will then rate the extent of overall impact by giving each user a Sustainability Score ranging from A to F.

In the dashboard, users can explore maps of different emissions, a line graph of their Sustainability Score over time, and a calorie counter to ensure that they don’t sacrifice a healthy diet in favor of sustainability.

Emission not only makes users more aware of your carbon footprint, but it also gives users tailored advice on how to lower it. The website’s information page features a chatbot where individuals can ask questions such as “How can I lower carbon emissions caused by transit?” to which the chatbot will respond with a list of tips to make the commute greener. This educates the user on what they should do to lower their carbon footprint.

For further motivation, we added some healthy competition. Emission has a leaderboard that ranks users based on their carbon footprint. Individuals can view their ranking globally, regionally, and amongst their friends.

Emission also has several week-long challenges that can be completed to earn a badge. These can include taking cold showers, cutting out meat and dairy, and only buying second-hand clothing. Because the commitment is only one week, trying out the new habit will be much more manageable and users can consider adopting it as part of their permanent lifestyle.

How we built it

After wire framing the design using Whimsical, we developed the website in HTML, CSS, and JavaScript, and used for simultaneous online collaboration. We made our server in Python using Flask, since we wanted to try something new, and Flask was completely new to all but one member. We used Chart.js to visualize the user’s data and MongoDB to store each user along with their score, activities, and friends.

Once the website was set up, we added features using Google Cloud and UiPath. UiPath was used in building the calorie counter, running lookups in the USDA FoodData Central API for each food entered through a Python script. Dialogflow was implemented in Google Cloud to run a chatbot which could educate the user on how to lower their carbon footprint for each of the six graded categories. Google Earth Engine was also used in conjunction with Leaflet to display a map of the world with an overlay of concentrations of different harmful emissions to visualize the main atmospheric pollutants defining each geographic area’s carbon footprint.

For our carbon emissions calculations, we researched effects of transit, diet, energy, wardrobe, recycling, and water on one’s carbon footprint and compiled a holistic formula that encompasses these impacts into a total amount of metric tons of carbon emissions per year, and ranked the result with a Sustainability Score.

Challenges we ran into

It was difficult finding and getting the quantitative data on how carbon emissions could be calculated based on different factors for each individual topic. Some topics such as water and energy required an in-depth look at how they contribute to a person’s carbon footprint because of how widespread and prominent they were.

Another challenge we had was with UiPath — something that none of our teammates have used before. Our team spent over 24 hours trying to figure out how it works, how to link it to python scripts, and how to port the robot to our website. After scouring many forums and failing to implement the bot over and over again, we were finally able to use UiPath to look up the calories contained in a single serving of a specified food using the United States Department of Agriculture’s FoodData Central API.

Yet another challenge we faced was in configuring the Dialogflow chatbot to respond to queries. Initially, we believed that just entering a single word to look for would be enough to allow the chatbot to respond, but when we tested it out the chatbot did not recognize what we were saying. We then had to come up with multiple phrases people could use to ask the chatbot for information, which Dialogflow could use to generalize input to multiple different cases. After manually entering and tagging around 100 total phrases into Dialogflow, the chatbot was able to naturally respond to user queries.

Accomplishments that we're proud of

We are very proud of our user-friendly and aesthetic design of the website. We were always moving things around and formatting pages in different ways because of applications such as the calorie counter and emission’s Google Cloud-based chatbot.

Another thing we are extremely proud of is figuring out the carbon footprint formula that accounts for each different topic. This equation combines information from multiple different sources, from fashion to water consumption, into one metric to accurately represent an individual’s carbon footprint.

We also love the complexity of the emission website with the implementation of a landing page, log in/sign up, different profiles, and the ability to add friends. We added fun pages such as the leaderboard page where the user can compete with people around the world or choose to compete with just their friends and the ability to view a map of global CO2 emissions that enables the user to see how much carbon emission is in their area.

Furthermore, after much work, our team was able to implement a chatbot in which the user can ask for more information on carbon footprint and receive tips that inform you about how to reduce your carbon footprint. We’re super proud of this, as none of us had even set up a Google Cloud account before this hackathon, much less implemented a fully functional chatbot in it.

Possibly the most impressive achievement (to the backend devs) of this hackathon was linking a responsive UiPath Robot to our website. We used our experience in Python requests from our past hackathons and applied it to the Robot structure which we had never even seen before. After struggling to implement the Robot for an entire day, we were ecstatic when the website finally began picking up data sent from the UiPath Robot for the calorie lookup.

What we learned

In creating the calorie lookup, our team had to learn how to program Robots using UiPath to automate a search through an API. This seemed like a daunting task for a group of developers who had never touched automation before, much less used it for API searching. Nevertheless, we persevered, not only learning the basics of UiPath, but also how to connect it to Python scripts, HTTPS requests, and more.

Before this past weekend, none of us even knew how to get into the Google Cloud interface, but once we thought of creating a chatbot, we realized we had to learn to use Dialogflow within Google Cloud. In deciding to create a bot which educates the user about one of six topics, we learned to define Entities, connecting them with Intents to create a bot which, when connected to the Google Cloud interface, could respond to queries and log response information. Once we figured out how to add the Dialogflow chatbot to our website, we had a responsive chatbot to educate users on their environmental impact.

To develop our website, we used Flask to create templates, link pages together, and integrate our databases for login information and user sustainability scores. It was our first time using Flask, but we were able to seamlessly navigate between HTML pages using Flask and access our databases from multiple pages in order to display the leaderboard, user scores, badges, and friends.

Most of all, we learned a lot about how each of our daily tasks affects the environment. While creating emission to inform others, we also gained an understanding of how the carbon footprint of simple activities like texting, calling, surfing the web, and sending an email can become a significant contributor to global carbon emissions due to the energy used by servers.

What's next for emission

We hope to develop a more sophisticated chatbot that can answer a wider variety of questions, such as “How many pounds of carbon emission was caused by my diet on June 2nd?” We also hope to add more detailed factors to the carbon emissions formula for greater accuracy, be able to view your friend’s profiles to see their badges, and add more statistics to your profile, such as “Your carbon emissions are higher than 68% of users.”

Built With

Share this project: