Trashemon-go
#Inspiration Trashemon Go came from our love of Pokemon Go and our desire for a better, greener planet through collaboration. Our team remembered the initial buzz of Pokemon Go and how people were going outside more and more often, and thought, what better usage of our times outside than helping make our communities greener? As yesterday was also the annual "Earth Hour"day, which is a global event that seeks to promote environmentally conscious lifestyles, we wanted to also play our part in helping make the world a greener place! After all, at the rate we are going, we will need 1 and ½ Earths to sustain our lifestyle? By 2030, we will need 2 Earths! For this hackathon, we decided to combine what worked about Pokemon Go (the community, the competition, and the game) and a green initiative. Over the years, we have noticed more and more litter showing up on sidewalks and in nature, disturbing the delicate ecosystems around us and contributing to landfills, pollution, and carbon emissions. We wanted to find a way to motivate not just adults but also kids and teens to go out and pick up litter, while learning about the positive impact their actions would have on the planet! Trashemon Go is an app that not only makes your neighborhood a cleaner and safer place but also fosters a sense of community and teamwork.
What it does
Trashemon Go is a novel and exciting app focused on reducing litter and fostering a sense of collaboration in neighbourhoods through gamification. Once users spot and pick up trash, our app analyzes the trash in the frame in real-time using the Google Cloud API and then it is assigned a point value based on the type of trash it is (plastic water bottle, soda can, etc). Trash that is more damaging to our earth or shows up more frequently in landfills are assigned higher point values. Data for this point allocation was pulled from this dataset (https://www.epa.gov/facts-and-figures-about-materials-waste-and-recycling/national-overview-facts-and-figures-materials). These point values are then able to be redeemed for coupons, gift cards, and rewards, powered by Honey. An information page shows up once the trash is detected, notifying the user of how damaging this trash really is through datasets and facts, along with tips on how to reduce littering with this specific type of trash (e.g. using cloth bags at the grocery store instead of plastic). In addition, another interesting feature is our Pinterest tool which recommends different crafts that can be made from the clean and sanitary litter that is detected. This tool also uses the Google Cloud API to determine the type of litter before bringing up the results of crafts relating to that specific item on Pinterest. Additional features of the app include team-formation. Groups of friends, family, or co-workers can create teams (Eco-teams) and compete against other teams in their neighbourhood or around their cities for rewards and to compete for the top spot on the leadership board. Within these teams, users can collaborate in the app’s chatroom to set up meetings and locations for trash pick-ups in their communities. Beyond these teams, users can also reach out to other community users through discussion posts on the app for tips and ideas on how to collect litter and gain points. The app also sends daily or weekly SMS messages to the users providing helpful tips on trash or notifying them of their status in their community leaderboard. Another feature is the community page, this is particularly useful for towns or cities who are looking for ways to include users in their garbage clean-ups. Towns can notify users who fall within a certain location about upcoming garbage pick-ups, events, and recommend locations for users to clean-up, fostering a sense of community in towns around the world, to unite their members under one purpose- saving the planet! A streak feature was also implemented to help motivate users to use the app everyday, and consequently clean up more and more trash in their neighborhoods.
How we built it
An important part of the application for the chatroom to create collaboration amongst teams and users. The chatroom was created using the Twilio Chatroom API, Android Studio, and Java. The back-end of this chat room was hosted through Node.js. We also created a SMS-service using the Twilio API to deliver messages to users reminding them to continue collecting trash and also giving them helpful tips of the day. This service was created using Node.js and Javascript. Once the app is opened, this SMS is delivered to the user's phone number. Outside of the chat room, the rest of the application was contained on the React Native platform, allowing for seamless integration into iOS and Android while only maintaining one set of code. The app was rendered using the Android Virtual Devices provided by Android Studio. To recognize items as trash, we used Google Cloud’s Vision API for image labeling. This is integrated with the React Native front-end with the camera triggered as the game starts and the user must snapshot a photo of the trash, which sends a request to Google. It then saves the description of the item in the Firebase database. Firebase is also used to store the credentials of the users and their team code, to allow for easy addition/login/authentication. Through our application logic, we identified plastics, milk cartons, and pop cans as trash, connecting the variable we get from Google and grouping it under one large category. Every time something is recognized as trash, a score is allotted to this item based on how frequently it is found in landfills/how damaging it is to the Earth. Data was used from the link in the paragraph above. The points/item were given from a scale of 1-200.
- TOOLS USED: * React Native, Expo, Javascript, Java, Google Vision API, Firebase. Sketch, Twilio Chat API, Twilio SMS API, Android Studio
Challenges we ran into
-
Using a techstack we were unfamiliar with, and challenging ones: prior to this hackathon, we have never created an interactive twilio chat room, using google vision, or react native. This was challenging as we had to learn and develop an application at the same time. Our application infrastructure is robust, with user sign up and creation as well.
-
All first year students doing our first online hackathon: for some of us, it’s our first hackathon. That large learning curve, along with the hackathon being virtual, provided challenges in terms of getting access to mentors easily or collaborating together in person. The communication was tough however we ensured to keep in touch together on slack and have touch points through on Google Hangouts, however many of the errors we ran into developing the application could have been avoided if we were all in person. This challenged us to be self sufficient in getting help and looking to resources online instead of relying on mentors and transparent communication in terms of updating our team on what we were working on
-
Version Control: Due to our unfamiliarity with the stack as well as the difficulty in communication caused by remote collaboration, we ran into many version control issues. We discovered that despite the seemingly fluid process of branching and merging using Git was quite intuitive, there were many nuances that led to unpredictable issues. For example, the files containing the environment variables required for APIs for products like Google Vision Cloud, Firebase, and Twilio were often prevented from being pushed to GitHub. Thus, we had to send these files on seperate channels, fragmenting our version control into different streams, and requiring much more focus on ensuring that team members were aware of changes made. Ultimately, we gained a thorough understanding of unique tools like .gitignore files and GitHub Secrets.
Design challenges:
-
Integrating google vision with react native: this was the biggest challenge by far, there is not much documentation from google specifically to make this work, as firebase is originally meant to work with Android and iOS. We ran into several issues getting the camera to work and getting firebase to work with npm however we were able to find some tutorials given by the Google Cloud mentors.
-
Running a multi-platform application on multiple devices: Sometimes the application would not run on all our computers and it was tough to get the android emulator up and running. Later we discovered a tool called Expo which allows you to build React Native Applications and connects directly to iOS, Android, and web-based emulators and pivoted our team towards that.
#Accomplishments that we're proud of
-
Creating our first Android and React-Native app. We knew going into this hackathon that this idea would be ambitious but we managed to pull through despite some issues with APIs, Firebase and Android studio. We’re happy we challenged ourselves with a difficult technical project, and we’re excited to explore these tools beyond the hackathon.
-
We are also all proud of our ability to work together despite not being able to see each other physically. This virtual hackathon made it difficult to collaborate easily - no sticky notes to whiteboard, drawing out designs together, or pair programming beside each other, but we were able to make the most of online tools such as slack to keep in touch, hangouts for video calls and screensharing, GitHub for version control, online IDEs such as repl.it to edit at the same time, and google calendar to set reminders for check ins and internal deadlines.
-
Building something that solves an important problem, and is feasible! We all got positive feedback from mentors and sponsors. We have a competitive advantage - there are no other applications out there that focus on collaboration and environmental-hacking, and encouraging communities to come together to clean-up. With the points system, we can integrate companies such as Honey to incentivize people to continue playing the game and redeem points to save money on purchases. Our application can be feasible as a business, through developing partnerships with companies for the point redeeming aspect. After this hackathon, we will actually be continuing this idea since we are all passionate about helping the environment and we believe it will test well to the mass market.
-
Developing an end to end application and concept from ideation to execution
What we learned
We learned how to use a cross platform mobile app development framework like React Native to rapidly build an application from scratch We learned how to use Google Cloud Vision in order to harness the power of Machine Learning with little experience in the highly technical field and perform image recognition We learned how to use Firebase, a simple method of data storage that does not need to be connected to a back-end framework, and rather be able to perform CRUD operations directly from the client-side. 4.We learned how to utilize a distributed version-control system (Git, in this case) in order to develop in parallel, maximizing efficiency in development, especially remotely (as it was in this case)
What's next for Trashemon Go
We’re hoping to add more data visualization aspects, and maybe expand the application to a web-page with analytics, leaderboards for the best players and community heros, and an interactive map that shows which parts in the community have the most trash as well as where our users tend to congregate. This would involve an open source data visualization aspect to highlight the impact of the application Develop partnerships with consumer organizations supporting environmental sustainability such as Honey and Amazon in order to allow users to redeem their points for real-world rewards Create a personal dashboard on the application where users can see their own individual impact and carbon footprint, and incorporation more gamification aspects (such as experience points or badges) where we can do research on how to engage users most and ensure they come back to play regularly Develop a tight-knit community where users can discuss social and environmental issues as well as how they--as a group--can effect change for the better.