Inspiration

As the pandemic continues to influence us in various ways, one thing that has been heavily affected and talked about is traveling (or the lack of). There have been arguments that have sprung up that the decrease in levels of people driving to work, flying home for Thanksgiving and Christmas, etc over the past year has resulted in overall cleaner air quality. This got us thinking: After the pandemic ends, people will most likely assume their old habits when it comes to their desired modes of transport, with no thought to how their inability to travel places influenced the environment. We decided to build a web application that can educate users on how they choose to travel on a daily basis affects the environment. Hopefully this will help them start realizing how they can change their decisions as the world eventually begins to open back up once the pandemic winds down. This is our way of promoting sustainability, one trip at a time.

What it does

Green Mapping is a web application that is designed to educate users on how the way they choose to travel impacts the environment through route planning technology. Just like Google Maps, users can input their desired starting location, their desired optimal location, and get an optimal route based on their chosen mode of transportation and factors such as traffic. However, unlike Google Maps, Green Mapping also considers the environmental impact that each route to the user's destination has on the environment, and recommends a new route that takes into account these considerations as well as time of travel and mode of transportation. A table is also provided that shows the route information such as the duration and mileage, as well as the estimated carbon footprint in moles of CO2 and the amount of gas needed to make the trip. As users continue to use this application, they will hopefully begin to unconsciously think about how they choose to travel leaves behind more than just a physical footprint.

How we built it

Built on top of the Google Map, Directions, and Places API, our application takes advantage of the tools provided in all three services to offer our users the information they need to make more sustainable travel decisions.

On our main map interface page, we run scripts behind the scenes that initialize and interact with the various components on our page that allows our application to run. For instance, when the user starts typing in their desired starting point and destination, the Google places API will begin interacting with the text being input and offer autocompleted suggestions. We also generate the interactive map using the Google Maps API. A separate script handles the actual route rendering provided by the Google Directions API when the user actually presses the button to calculate their route. Once the route is rendered, users can change their transportation method to walking or public transit for example to see the other routes that they can take. Unlike Google maps, our app takes into consideration the most optimal route for all transportation methods supported by the Google API (walking, cycling, driving, and public transportation), and recommends a route based on score from factors such as gas used, overall time, and mileage for each method to the user that is most likely more sustainable than the route they were initially planning to take. From the data for each transportation method from the starting point to the destination, we also perform dynamic rendering to generate a table to show the carbon footprint left by each mode of transportation, as well as items like the amount of gas and the estimated travel time.

Challenges we ran into

There were several challenges along the way. The first one we faced was simply learning an API that we had never interacted with before. Once we finally felt comfortable with it, we had to determine how to measure and quantify the environmental impact a car journey had and how to best leverage the API we were using to find good alternatives. Finally, a lack of robustness in another API we were using caused us some difficulty in compiling the data we had to display.

Accomplishments that we're proud of

We are proud of this project's ability to leverage API's and allow users to interact with data in an intuitive way. Our project is ready to accommodate many new features and capable of being added to in meaningful ways which we are proud to know. From a less technical standpoint, we are proud that we are able to inform people about the environmental impacts their trips can have and encourage them to do them in more environmentally friendly ways.

What we learned

We were able to learn a lot about the technical aspects of web development including the notion of accessing API's with keys (specifically Google's API's), dynamically altering the page through JavaScript, etc. In terms of more qualitative learning, we believe we learned to work as a team better and to create a larger societal impact.

What's next for green-mapping

Our next step is to expand upon the functionality of the project. Currently, we use estimates to determine the harm a person's trip can do to the environment. Due to a few incompatibilities, we were unable to add custom per-vehicle reports of a trip's environmental impact. With a few tweaks to make it work, we aim to make Green Mapping more personalized for each user.

Share this project:

Updates