Inspiration

The Transit Bus cancellation system in Peterborough can be confusing and unclear for many. Transit Bus cancellations in Peterborough are only reported through X (Twitter). Due to the bus cancellations being updated on only one platform, it limits the reach of the cancellation message to its proper audience and increases inconvenience. When a bus is cancelled, there is no way of knowing that it is cancelled other than to go to X (Twitter) to check. As Trent University students who rely on bus transportation daily throughout the winter season, we decided to create an app that notifies bus users about recent cancellations through notifications directly on their cell phones.

What it does

Our demo app PeteALERTS allows users to get a cancellation notification when one or more buses are cancelled throughout the day. When a bus is cancelled through X (Twitter), the app notifies the user that the bus will be cancelled. PeteALERTS uses keywords such as the bus number and the time, to tell the user when and which bus got cancelled, using OpenAI to frame it in a particularly concise manner.

How we built it

To build this app we used HTML, CSS, Python and Javascript. We used APIs to implement OpenAI to take out some of the keywords from the provided CSV file and display them in a sentence. In addition, we used React to open, read and display CSV files. React is a front-end library that was primarily used to create our app. We used the the PapaParse package to read the CSV file and parse through it. Once the data was parsed, the next step was to go line by line through it and present it in an organized and easily readable manner in the app. We also added the push notification such that each time a new dataset was added to the CSV file, it would trigger a notification.

Later on, we put them all together and worked through Git and GitHub. We made sure to push any changes and pull if others were pushing their changes, which allowed us to collaborate, and save our code in the event of a disaster.

Challenges we ran into

During ElleHacks, we ran into various challenges:

When we decided to utilize the React framework, our team encountered a steep learning curve, especially considering our limited experience with JavaScript. Initially, React seemed daunting and impractical. However, as we delved into its intricacies, we gradually uncovered its utility, particularly in facilitating the display of CSV data within our application.

Never having worked with APIs before, implementing OpenAI’s API was one of the bigger hurdles for us. Error after error, it seemed like we were getting nowhere! We did solve some ourselves, but the mentor booth was our saving grace. They helped us understand what exactly in our code was being problematic and allowed us to fix it ourselves.

Accomplishments that we're proud of

Being first-year computer science majors, we knew we wouldn’t be the most qualified team. However, that didn’t hurt our team spirit but rather added fuel to the burning fire that was our passion for learning. We came in with the mindset to win but also knew that it would be an essential learning experience, packed up into a sleepless, yet productive weekend. We truly did end up learning our fair share of knowledge; working as a team, getting past problems that seemed like we were picking at concrete walls with our fingernails, and getting to interact with like-minded people — it all worked its way in our minds as a means of confirming our obsession.

Our more technical achievements include getting an insight into using APIs for projects, their documentation and how to implement them into a project, and their overall potential in a variety of situations. On a lighter note, we were really grateful to have used our Git knowledge outside of the seminar halls, in a situation where we constantly had to interact with teammates, and keep our code, as well as our teammates code, in check.

What we learned

We learned how to use OpenAI API and React for front-end as well as JavaScript. Creating this project we learned how to use OpenAI to pick out keywords from our data. Using Javascript and React to open the CSV file and to display it.

Even though we all have little experience in JavaScript, most of our code in this project is in JavaScript and React framework.

What's next for PeteALERTS

We would like to implement additional features, such as a filter, where the user can choose which specific bus or buses they would like to receive alerts for, therefore further personalizing it to the user.

We would like to extend the app in the future to also include school buses, and instead of using our dummy database for the project, it would be great if we had the Twitter API and directly updating data from X.

Built With

Share this project:

Updates