Originally posted on Data Science Central
1 The Tragedy
As most of you guys know, the country of Nepal has been hit with a powerful earthquake killing over 1,800 lives(as of this writing). Thousands are injured. Lives are disrupted. Historic temples, monuments, buildings are leveled.
I plead you to help whatever you can. Money. Time. Good wishes, thoughts, and prayers. Scroll to the end of this post for where you can help. Thank you and enjoy the post.
2 Mapping & Visualzing the Nepal Earthquake
For this analysis, I scrape the data from this website, which has the latest earthquake data worldwide.
Let’s look at the first 5 rows of this dataset. We see that this data set has Dates(down to the hour, minute, and second) that the earthquake occurred, the geo-location(latitude & longitude), Magnitude, country’s location/orgin, and other items. Please kindly note that,as usual, there were some data munging to get the data to usable format since it’s a web html table scrape.
## Date LAT LON Magni DepthKM## 1 26-APR-2015 14:05:31 -19.09 -176.30 4.6 298## 2 26-APR-2015 13:11:15 27.76 85.37 4.5 10
## 3 26-APR-2015 12:55:00 -1.94 100.20 4.8 57
## 4 26-APR-2015 12:12:07 -31.66 -177.54 4.7 41
## 5 26-APR-2015 10:38:04 -11.03 120.67 4.8 35
## Map EventID loc
## 1 FIJI ISLANDS REGION 5111954 -19.09:-176.30
## 2 NEPAL 5111951 27.76:85.37
## 3 SOUTHERN SUMATERA, INDONESIA 5111938 -1.94:100.20
## 4 KERMADEC ISLANDS REGION 5111936 -31.66:-177.54
## 5 SOUTH OF SUMBA, INDONESIA 5111933 -11.03:120.67
But we are only interested in Nepal earthquakes so let’s filter to just Nepal.
## Date LAT LON Magni DepthKM Map EventID loc## 1 2015-04-26 27.76 85.37 4.5 10 NEPAL 5111951 27.76:85.37## 2 2015-04-26 27.84 85.69 4.5 10 NEPAL 5111927 27.84:85.69
## 3 2015-04-26 27.59 85.68 4.6 10 NEPAL 5111926 27.59:85.68
## 4 2015-04-26 27.72 85.93 4.7 10 NEPAL 5111924 27.72:85.93
## 5 2015-04-26 27.71 85.83 5.0 10 NEPAL 5111923 27.71:85.83
This data, while interesting, needs to be visualized in a more easily consumable format. The best way is using a map. Here’s a visualization of all the earthquake spots according to latitude and longitude with the magnitudes of the earthquakes in red tooltip pins.
We see that most of the earthquakes centered around Kathmandu where most of the lives have been lost. Additionally, there were other quakes in more remote regions. This is a good data visualization, but it does NOT tell the entire story. If we want to see how the earthquakes unfolded over time we need a time series graph.
3 Hour by Hour Visualization of Earthquake MagnitudesHere we see the first earthquake happened around 6:11am with a magnitude of 7.8. This is the number that’s been quoted in the press. However, interesting enough, there has been over 30 more aftershocks of varying magnitudes even up to the next day on April 26, 2015. These aftershocks are compounding the lives lost, property destruction, and human misery.
4 How you can help
I like to end this blog with a humanitarian plea. This is the human side of data science. As data scientist, we have lots of fun with data, numbers, visualizations, models, algorithms, machine learning, etc. etc. But we must also have a heart and compassion for our fellow human beings. Especially those who are suffering in such horrific natural disaster.
There are many ways to help. Donate money, time, or just send well wishes, thoughts, and prayers
Here are two fine organizations that are leading the relief efforts:
There are others as well.
I’m sure and positive that Nepal and its people will band together and rebuild. Humans always have. The good human spirit is the strongest force in the universe.