Inspiration
Our inspiration came from our love for the planet, high-speed railways, excruciatingly specific API interactions, and a desire to show how utilizing rail infrastructure can positively impact the environment. The real and tangible inspiration for this project was a map of a possible US high-speed rail system. We wanted to create a tool that could provide hard data to justify the construction of such or any routes and hopefully convince both the public and lawmakers that a cross-country rail system is feasible and necessary.
What it does
The main nuance of our app -the feature that makes it different from a simple calculator- is that it allows the user to declare their desired route. The user first starts by interacting with a Google Maps widget, selecting the origin and destination of their path. Data about this route, most importantly being distance, is passed to a set of calculations in order to determine fuel cost per passenger and emissions from the vehicle along that path. We believe that charts and graphs showing generalized benefits of high speed rail are ineffective. Showing comparison data for someone's daily route invokes a sense of ownership and shows how their lives directly affect the environment. The emissions are calculated holistically, taking into account not only the usage of the transportation, but also the carbon required to construct, maintain, and provide fuel for the infrastructure.
How we built it
The app contains one interaction with the user and three overall components. The first component begins after the user selects route origin and destination. These selections query the Google Cloud(GC) JavaScript Map API for the coordinates of those two points. This data is then passed to a second GC API, namely the Geocoding package. Through a process called 'Reverse Geocoding', we convert the latitude and longitude values into a rough address for the points. Now that we have tangible start and stop locations, we query the GC Directions API for the optimal route between the points. We utilize the response in two ways- the route is rendered on the JavaScript Map widget and route distance is pulled from the response object. The render is only for graphical representation as the distance is the only thing passed to the next component. The distance value is used in a series of conversions to acquire the different metrics listed above. Intermediate values are also displayed. The constants in our equations are derived from pre-existing, international infrastructure studies and reports. All of the results are passed to the final component: the front end. We display all of the results in a fashion that makes comparison between travel modalities easy and understandable. We also designed graphics to accentuate the page alongside information about current railways systems. The whole product is hosted on Google Cloud and the domain is through Domain.com
Challenges we ran into
The main challenge we ran into occurred during data collection for the conversion factors. Since we are showing the benefits of a system not yet utilized en masse in the US, we had to rely on other country's data. Some of the reports we viewed contained slightly contradictory claims and values for emissions and cost. This made it harder to create clear methods of conversion. Our results are not exact as a system the app imagines does not yet exist in our country.
Accomplishments that we're proud of
We are proud of our use of the Google APIs, as none of us had previous experience interacting with any APIs. We are also proud of how we combined data collection, calculation, and environmentally-relevant information into one cohesive product. This was two of our team's first hackathons, so we are also very proud to have participated.
What we learned
As aforementioned, we learned a ton about API interaction and how that ties into a front-end application. We also gained valuable insight into rail infrastructure around the world. Use of our app also reaffirmed our beliefs in the merit of a high-speed rail system for the US.
What's next for Rail Emissions Calculator
We would like to add more modalities, specifically airplane and travel by water. We also want to expand our route ability outside of the United States.
Log in or sign up for Devpost to join the conversation.