We wanted to make a tool to allow users to assess risk of natural disasters. We chose earthquakes because we found data that we thought we could make a convenient user to allow users to determine their distance from recent earthquakes and to visualize earthquake locations on a map.
What it does
The project a dashboard application to allow users to assess the risk of earthquakes in their area. The application is run as a docker image, allowing it to be easily installed across multiple systems or servers. The dashboard can be accessed using a browser, making it easy to use for a wide audience.
The dashboard currently accesses an earthquake geographical database for Canada. It allows users to assess the locations of earthquakes on an interactive map. Users can configure the time range to view earthquakes with a slider.
Users are also able to enter their coordinates to identify the closest earthquakes to their location. The dashboard table shows the closest earthquakes (the number of displayed earthquakes is configurable), including their location, the date of the earthquake, their magnitude, and the distance from the earthquake to the user's location in Km.
How I built it
We used a template dash app and docker image we had previously created as a starting point. Once we found data sources, we investigating how to create python dash applications to display maps, tables, and inputs, and built our application based on the knowledge gleaned.
Challenges I ran into
We found a library for retrieving coordinates from city names (geopy). The library worked very well in the Jupyter notebook, however we had some difficulty getting it to work for the docker image. Fortunately, it started working properly once we recorded the video demo, allowing us to show how a user could look up earthquakes relative to their city.
Accomplishments that we're proud of
We got the geographical lookup working that creates an interesting visual where changing the location quickly updates a table with new earthquake data.
What I learned
We gained more familiarity with the dash applications, and with various python libraries for retrieving geographical coordinates from useful user information. We also learned more about docker commads.
What's next for Earthquake Dashboard
The next steps would be to give users greater control over the time ranges they can view (instead of being limited to 2019) as well as the number of countries with supported earthquake data. Machine learning algorithms could be used to assess a users risk of an earthquake, taking into account features such as distance and likely damage from a potential earthquake. This could be used to provide data on what steps should be taken by the user to mitigate their risk.