Visualization is the best way to explore and communicate insights about data. But many times, we find it is difficult to visualize if we have a lot of data points, the traditional visualization techniques break down. datashader is a tool developed by Continuum Analytics come to rescue. It is extremly easy and fast to use it to plot even billions of data points (see the examples or a video from Scipy 2016).
This week, we will use datashader to plot the global seismicity for earthquakes larger than M2.0. To speed up the process, I downloaded the earthquake locations/times from the ANSS Catalog from 1898 to 2016, and save them as a csv file in the data folder (You can also grab the data directly using the APIs from my previous blog post). All together, we only have 1120244 earthquakes
And with a couple of lines, you can see we get a very nice looking map with the global seismicity. You can find the script and data at Qingkai's Github.
import pandas as pd
import datashader as ds
import datashader.transfer_functions as tf
from functools import partial
from datashader.utils import export_image
from datashader.colors import colormap_select, Greys9, Hot, viridis, inferno
# read in the earthquake data from file, note that I only read
# in 5 columns with Origin time, Latitude, Longitude, Depth, and
# Magnitude of the earthquakes
df_eq = pd.read_csv('./data/catalog.csv', usecols=[0,1,2,3,4])
# now let's plot them using a black background
background = "black"
export = partial(export_image, background = background)
cm = partial(colormap_select, reverse=(background!="black"))
cvs = ds.Canvas(plot_width=1600, plot_height=1000)
agg = cvs.points(df_eq, 'Longitude', 'Latitude')
export(tf.interpolate(agg, cmap = cm(Hot,0.2), how='eq_hist'),"global_seismicity")

Very nice!
ReplyDeleteI was scrolling the internet like every day, there I found this article which is related to my interest. The way you covered the knowledge about the subject and the 4 BHK Duplex in hoshangabad Road was worth to read, it undoubtedly cleared my vision and thoughts towards B 5 BHK Duplex in hoshangabad Road. Your writing skills and the way you portrayed the examples are very impressive. The knowledge about 5 BHK Duplex in hoshangabad Road is well covered. Thank you for putting this highly informative article on the internet which is clearing the vision about top builders in Bhopal and who are making an impact in the real estate sector by building such amazing townships.
ReplyDeleteTo get proper information of construction is very necessary hence this blog is very useful for me. I want to know more about flats in Bhopal because i am planning to start construction in Bhopal.
ReplyDeleteFive weeks ago my boyfriend broke up with me. It all started when i went to summer camp i was trying to contact him but it was not going through. So when I came back from camp I saw him with a young lady kissing in his bed room, I was frustrated and it gave me a sleepless night. I thought he will come back to apologies but he didn't come for almost three week i was really hurt but i thank Dr.Azuka for all he did i met Dr.Azuka during my search at the internet i decided to contact him on his email dr.azukasolutionhome@gmail.com he brought my boyfriend back to me just within 48 hours i am really happy. What’s app contact : +44 7520 636249
ReplyDeletenice post.
ReplyDeleteData Science Online Course
Data Science Training
I WAS CURED OF HERPES SIMPLEX VIRUS BY DR GUBA, THE GREAT HERBALIST.
ReplyDeleteI am so happy to share this testimony with the world because generally there are so many doubts about the cure of HERPES simplex virus. This is real, take it seriously, my name is HENRIETTE AMUNAZO and I am so happy that today I can give this testimony to the world and also help people who have been condemned just as I was. Who will believe that a herb can cure HERPES completely from the body?, i never believed that this will work, i have spend a lot of money getting drugs from the hospital to suppress outbreaks, it got to a time that all i was wanted was death to come because i was broke and i already have strong outbreaks from the herpes virus. One day i was going through the internet asking questions online just to know more about the latest development in the medical sector to see if there is still hope then i stumbled on a post about this great man called DR GUBA, through an online friend who publicly made a testimony on how she was also cured of herpes simplex virus 2 by this herbal doctor who is well known for his strong ancient herbal practice for HERPES, HIV, WARTS and CANCER cure. At first I doubted both the woman and the doctor just as so many that see this post would doubt because medically it has been proven impossible but later I decided to give him a try so I emailed him. I did not believe him that much, I just wanted to give him a try. He replied to my mail and needed some Information about me, then I sent them to him, he prepared herbal medicine (CURE) and sent it through Online Courier Service for delivery. He gave my details to the Courier Office. They told me that 3-5 days I will receive the package and after receiving it, i took the medicine as prescribed by him at the end of 13days that the medicine lasted, he told me to go to the hospital for a test, and i went, surprisingly after the test the doctor confirm me Herpes simplex virus free, i thought it was a joke, i went to other hospitals and was also confirmed herpes free, i will say it was like a miracle. I waited to see if i will get any outbreaks again and it's been 2 months now, i have not experienced any outbreak. Thank you sir for saving my life even if you cannot see this post, I shall never stop testifying the impact you made in my life by restoring back my life when I was being stigmatized and even avoided by family and friends. I promise I will always testify of your good works. if you have herpes simplex virus, HIV patient, Diabetes, human papilloma virus or genital warts, contact him and I am sure you will get cured, contact him via:
email: drgubahealingherbs@gmail.com or WhatsApp: +2347077581439 or website: https://drgubahealingherbs.wixsite.com/guba-healing-herbs,THESE ARE THE THINGS DR WATER IS
SPECIALISED
. HERPES
. HIV/AIDS
. CANCER
. GENITAL WARTS
. KIDNEY STONES
. ULCER
. HEPATITIS B&C
. PORT-RATE DISORDER
. DIABETES
. PROSTATE CANCER
. FIBROID, CYST
. INFERTILITY [HUSBAND OR WIFE