Inspiration
We were inspired by the growing concern and threat of climate change to our planet. In order to combat climate change and global warming, everyone can work together to decrease their carbon footprint and make our planet a better and safer place to live.
What it does
Our project is a website that features a carbon footprint calculator API from Carbon Calculator, a "Welcome to the Carbon Footprint Calculator", and a button. The carbon footprint calculator API can calculate the carbon footprint of the user's household energy, flights, car, motorcycle, and public transportation usage, and secondary usages such as clothing, household goods, electronics, and more. It can calculate the individual carbon footprint and the total amount and compare it to the country and world average.
How we built it
We used React (Javascript) and VSCode to make this program. After starting up a new program, we deleted the default components and started working on our own. We primarily coded in the App.js and index.js files under the src folder. In the App.js file, we made our components (title, button, and API) and exported them to the index.js file. In the index.js file, we were able to organize our components, so our title came first, then the button, and then the API.
Challenges we ran into
We originally wanted to add pages and a navigation bar to the program, but we ran into errors regarding the import of the pages while compiling. After trying to resolve these issues by changing the file names and downloading different packages, we were unable to resolve the issues without comprising the program from compiling. We decided to keep our program simple and continue to work on this issue in the future.
Accomplishments that we're proud of
Although we weren't able to achieve a multi-page website, we're proud that as beginner coders we were able to code some of the basics and learn some Javascript.
What we learned
We learned how to run a React program and how to integrate an API. We also learned about making different pages and a navigation bar for a website.
What's next for Carbon Footprint Calculator
We hope that we can work through the errors of adding more pages and make pages featuring informational articles, a newsletter, and a map API that can show the best fuel-efficient and environmentally conscious routes.
Log in or sign up for Devpost to join the conversation.