The Story Behind Our Project


Meet the Team


***Interested in data consultation services? Contact us on LinkedIn!***

Project Theme

Motivated by the recent magnitude 5.1 earthquake which struck North Carolina on August 9th, 2020, we decided to take a look back in history and explore the frequency, magnitudes, and locations of these natural events.

U.S. Department of Commerce, National Oceanic and Atmospheric Administration available through Kaggle. To view the dataset we utilized for this project, click here.

Earthquake Magnitude Scale

Magnitude Earthquake Class Earthquake Effects
8 or more Great Can totally destroy communities near the epicenter.
7 to 7.9 Major Serious damage.
6 to 6.9 Strong May cause a lot of damage in very populated areas.
5 to 5.9 Moderate Slight damage to buildings and other structures.
4 to 4.9 Light Often felt, but only causes minor damage.
3 to 3.9 Minor May feel like a passing truck.

See below for the steps we took to build the Earthquake Dashboard.


Steps

Step 1: Data Preparation & Cleanup

The data set consisted of key elements to allow us to dig deeper in to global earthquake trends dating back to 1600 though it was noted that the level of detail was limited prior to 1930. In an effort to better analyze the data, we modified the “Name” column which provides earthquake location information using Python and decided to only keep the location name prior to the “:” which most often is the country in this dataset, although in some instances it refers to the state.

Step 2: Database & Server Setup

Python Flask powered RESTful API, HTML/CSS, Javascript, and MongoDB were utilized for the visualization. In our first python file (datacleanup.py), preparation of data occurred including: cleansing of the data, renaming a column and exporting the CSV file into a JSON file to be utilized by MongoDB. Within the second Python file (app.py), one route pulls all of the data from MongoDB to send to Javascript upon the call to the route and the second route applies filters to the data based on user selections. When a user selects one or more filters on the HTML page, Javascript pulls those values and sends them in a request to Python. In Python, using MongoDB the filters are applied and the filtered data is then returned to Javascript. Regardless if the user selects one or multiple filters, the logic can pull the data and send the filtered data set to Javascript.

Step 3: HTML & CSS

While the logic.js file helps us pull the information filtered by the user, our HTML file renders it on the web. The CSS file, in addition to Bootstrap, helps with the styling of the website and dashboard.

Step 4: FINAL TOUCHES

We created 4 different types of visualizations (heatmap, scatter plot, histogram, and stacked bar chart) to better showcase earthquake occurrences and magnitudes from 1600 - 2020 around the world.