I was interested to find out how the maps visualization works in Tableau so I decided to give it a try. The first thing I needed was some interesting data that I could download and visualize. I found my data at http://earthquake.usgs.gov/earthquakes/catalogs/. The data was about earthquakes around the globe for a one week period. I began by downloading this data and saving it to an Excel spreadsheet. After connecting to this Excel spreadsheet in Tableau, I began dragging the data into the visualization pane. To my amazement, Tableau immediately recognized that the data I was working with was geocoded data – meaning it contained geographic coordinates (latitude and longitude) – and it chose a map as my visualization without me specifying that’s what I wanted. Pretty cool! But wait a minute, why was there only one mark on my map smack in the middle of Utah?
Looking into this a little closer I noticed that on the columns and rows shelves the latitude and longitude coordinates were being aggregated. This is the default behavior for Tableau. Tableau was showing me the average of all the latitudes and longitudes in my data. I needed to add a lower level of detail to see all of the marks on my map. After dragging the DateTime field to the Level of Detail shelf things began looking better.
Now there were many marks all over the map. Wow! I had no idea this many earthquakes occurred in just a one week period. I was curious to find out just how many earthquakes the marks on my map represented because it appeared that they overlapped and were not all visible. I determined the best way to figure this out would be to look at the data at the detail level using the Text Table visualization. I added a measure called “Count” which I set to a value of 1 for each row of data. I added a “Grand Total” to my Text Table visualization so I could see the total number of earthquakes in my data. While dragging the latitude and longitude to the Text Table visualization I realized that since these fields were numeric, Tableau was treating them as measures and aggregating them. Even though aggregating these coordinates did not cause an issue at this level of detail, I decided it was best to treat them as dimensions since that is what the truly are. In order to make them dimensions I simply dragged them from the Measures pane to the Dimensions pane.
I was shocked to find that the total number of earthquakes during this week long period of time was 865! Certainly they could not all be earthquakes of a high magnitude since you rarely hear about earthquakes in the news. I continued my analysis by analyzing the magnitude and depth of these earthquakes. I went back to my map visualization and added some formatting to help with this.
I dragged and dropped the Depth measure to the Color shelf so that the depth of the earthquakes would determine the shade of color shown on the map. Similarly, I placed the Magnitude measure on the Size shelf so that the earthquakes of higher magnitude would show as larger marks on the map. I also changed the color of my marks from blue to red just because I thought this was more visually appealing.
This was helpful but I still could not see all the earthquakes because the marks on my map were overlapping. I decided to use a technique I learned and mentioned in my blog Local Warming? in which you use the Pages shelf to break down the visualization by a dimension such as date or time so you can view each page one at a time in succession. This provides a historical view of the data. I placed the DateTime field in the Pages shelf to accomplish this. Now I could see all the earthquakes one day at a time as they occurred over the week long period.
Now I could see all the earthquakes but I still was not getting a clear enough picture of the depth and magnitude of the earthquakes. I decided to create a scatter plot diagram which plotted these two measures.
Now I could clearly see where the majority of the earthquakes fell in relation to depth and magnitude. By selecting the large clump of points near the bottom left corner of the scatter plot chart I saw that 786 of the 865 total earthquakes were in this area. This meant these earthquakes all had low depth and magnitude. This is what I would have expected.
I also wondered about the correlation between magnitude and depth. In other words, did high magnitude equal high depth and low magnitude equal low depth? So I created an area chart that plotted magnitude and depth over time. The chart clearly shows that there is a correlation between these two measures. In most or all cases high magnitude was coupled with high depth and low magnitude with low depth. While hovering over the colored area of the chart with my mouse, and moving my mouse from left to right, the points for each measure were visually moving up and down in the same pattern.
After listening to a weekly Tableau learning series put on by Ross Perez in which he spoke about adding actions to a visualization I decided to try it for myself. I created a dashboard which included a few of the visualizations I had previously created.
Now by adding filter actions to each of the visualizations on my dashboard, I could select any item in any visualization and the other visualizations would automatically be filtered as well. This was extremely helpful in isolating certain data points or groups of data points and seeing them in 3 different ways. For instance, by selecting the data point in the top right hand corner of the Graph view, I could immediately see where this earthquake occurred on the map as well as the data associated with this earthquake in the Data view.
Or, by selecting the Alaskan Peninsula region in the Data section of the dashboard, I could automatically see on the map and the scatter plot chart the data associated with this region.
So once again in a relatively short period of time I was able to create some compelling visualizations that helped me better understand the data I was working with. These visualizations can easily be shared with others as well. No matter what type of data you are working with, visualizations such as these are truly powerful and provide further insight and understanding. They help us to answer questions that are important to us and cause us to ask additional questions that can be answered quickly and easily and provide even deeper understanding about the topic we are interested in. They say a picture is worth a thousand words and in this case it is true.
You can view my earthquake visualizations at…
To find out more on Visualization or how LÛCRUM can help your business by making your data meaningful contact us.