Inspiration
When we heard about the sustainability category, we directly thought about AI because as you hear very often nowadays, the datacenters and processing necessary for AI have a huge impact on the environment. As we looked into the project more, we realized getting reliable information to estimate CO2 emissions based on AI usage was unworkable so we decided to pivot to general internet browsing. Instead, we decided to approximate as reliably as possible the emissions generated from your browsing, which were previously hard to estimate yourself.
What it does
Our chrome extension tracks your browser activity, gets your device information and retrieves live information about energy costs to estimate the CO2 emissions you generate. It then formats the data in an accessible, to help you change your habits and become more aware of your environmental impact.
How we built it
We have three main datapoints for our CO2 calculations. The first is the amount of downloaded data used to load the websites you browse. In order to do that we access the browser's Performance API which tracks this data and metadata. The second data point is the device the user uses because from our research we learned that in some cases the device used could account for up to 70% of emissions when browsing. In order to do that we use a series of checks using a browser agent, screen dimensions and touch compatibility in order to estimate as best as we can what device the user is using but there is also an option for manual overrides. Finally, the third data point is the user's location because the user's location determines how sustainable electricity production is in the area, therefore directly effecting browsing environmental costs. In order to do this, we get the user's location through a browser request then access the ElectricityMap API to get that location's CO2 cost per KWH produced. With all this data we calculate the CO2 emissions generated and then display it all through both a popup and a dashboard. We used Javascript, HTML and CSS to build the whole project.
Challenges we ran into
- As we stated previously, getting access to AI data like tokens used and generated was especially difficult to estimate and retrieve. To work with this issue, we decided to generalize our project to websites rather than simply AI tools.
- When we started thinking about getting website activity, we struggled to find an effective way of estimating data retrieval costs so we decided to estimate those costs by scraping specific websites for the number of products being loaded on Amazon, for example, or the number of minutes watched at a specific resolution on Youtube. We then learned about the Performance API to get information about downloaded data for any website which allowed us to estimate emissions for all websites, rather than specific ones.
Accomplishments that we're proud of
- Getting information from multiple different sources and then finding a way of processing all the data into one comprehensive number, your CO2, emissions. This wasn't an easy task since we had to handle multiple API's, the popup and dashboard and live updates. But we are really proud of the end result.
- Working with API's since for us it was our first working them. We feel like we gained a lot of confidence with these tools and have learned how to effectively use them for our purposes.
- Simply getting a project complete. For us three, this was our first hackathon and we all agree that we were able to accomplish a lot more than expected. We all loved the experience whether that included brainstorming with mentors, discussing with sponsors, or testing new tools out.
What we learned
- API's - We learned how to make API calls and use there data.
- Extensions - We learned how to make a chrome extension.
- Browser Tools - We learned how to use many browser tools and services which gave us access to the user's location and device.
What's next for CurbYourCarbon
We have multiple directions to extend our project. One is to lean back into the AI space and use AI dashboards to retrieve information about token usage, something we learned was possible only later but which required specific scripts for each dashboard. Another would be to look into how to quantify or estimate CO2 emissions on the server side since we are currently only considering client side energy usage. Finally another would be to make our current estimations simply more precise because there is always more data you can access.
Discord Handles
@rbessin @kshitij2825 @porple_5831
Log in or sign up for Devpost to join the conversation.