Each year, large-scale earthquakes leave behind devastating trails of destruction in their wake – causing thousands of deaths and billions of dollars worth of destroyed infrastructure. According to geological experts, due to the San Andreas fault that runs through California, UCLA is at a greatly heightened risk for a future mega-earthquake that will likely cause significant economic, social, and environmental damage to the region.

Thus, in the case of such an event, it is crucial for government to be able to effectively and efficiently manage the emergency response to help ensure the safety of citizens and the city. This is currently an incredibly difficult task for government officials, as communication systems for victims such as 911 and Twitter fail to provide insight into the most affected areas.

What it does

GeoCheck leverages low-cost SMS messaging, natural language processing, and GPS capabilities to provide a clear and dynamic picture of regions most in need of emergency support during an earthquake event. Users first text an SMS number, which then asks them a few quick questions about their situation, such as the number of injured people, days of food/water left, and ongoing dangers such as fire and collapsed buildings. Furthermore, users were prompted to describe any medical injuries. Natural language processing techniques were applied to identify key nouns and verbs. Word embeddings were then extracted, compared, and ranked on their priority against the gold-standard Advanced Medical Priority Dispatch System (AMPDS) codes.

This data is then aggregated across all affected regions, categorized with k-means clustering, and ultimately displayed on an interactive web map, providing unprecedented insight into the situation on the ground for emergency responders. Moreover, victims can update their status over time, giving emergency responders dynamic and up-to-date information. With GeoCheck, for the first time ever, emergency responders are able to see past the online noise and chatter and pinpoint exactly where they need to direct and allocated precious medical/food resources and personnel. This saves time for government officials, reduces mortality rate, and ultimately enables cities to get back on their feet quicker.

How we built it

The programmable SMS conversation was built using the Twilio API and a Python Flask back-end for processing and storage. Natural language processing was performed with the NLTK and Gensim packages, and the Google News Slim word2vec embeddings. K-means clustering was done through the Python Sci-Kit Learn module, and the front-end web map was written in JavaScript with the Uber React MapBoxGL JS API.

Challenges we ran into, what we learned

Our first challenge was getting the Twilio API to work – we learned how to setup webhooks through ngrok and Flask that then interfaced with incoming SMS messages. We also learned how to use sessions and counters to keep track of SMS conversations programmatically. In addition, connecting the front-end to the back-end required us to learn how to define clear API endpoints. Also, since the ngrok was rate-limited, we were forced to be conservative with the amount of backend requests during our development phase.

Accomplishments that we're proud of

Building a full-fledged back-end and front-end that successfully integrated machine learning within 36 hours!

What's next for GeoCheck

Real-time notifications of incoming help for victims and ETA times, dynamically styled 3D visualizations, extending to other types of natural disasters, and mobile integration of the map for portable monitoring. We also want to implement repair-cost estimations using real estate APIs, geocoding, and machine learning prediction models and visualize this with the library.

Share this project: