How To: Create Eclipse Path Map in Tableau

8/02/2017 Matt Chambers 0 Comments


I recently saw a visualization on Reddit that showed Google search result interest for the word "eclipse" plotted with the path of the 2017 eclipse.  Since I will be right in the heart of the eclipse's path, this event has been very fascinating to me, and I wanted to see if I could build the same visualization in Tableau.

Building the visualization in Tableau is very simple with most of the work occurring in QGIS.  Here's everything you will need to get started:

1. Download and install the appropriate version of QGIS
2. Download and install the MMQGIS plugin
3. Download the shapefile for the United States.  I used the file from Data.gov.
4. Download the eclipse shapefile from the Cannon of Solar Eclipses Database

Now that you have QGIS setup and the necessary files, we can start to create the shapefile for Tableau.  I'm not an expert in QGIS, so there could be easier ways to do this, but I wanted to give a big thanks to Adam Crahen for helping me through a few issues.

1. Click Layer, Add Layer, Add Vector Layer in QGIS


2. Choose the Eclipse shape file


3. Do the same again, but this time choose the state shape file


4. Now you will see both shape files overlaid.


5. Click the MMQGIS plugin and choose Merge Layers.  This will create a merged shapefile.


6.  Choose the layers to merge and select an output file


7. Open Tableau, connect to a new data source, and choose Spatial file


8. Tableau makes this really easy.  Simple double click the Geometry measure.


9. Tableau will generate the latitude and longitude and render your states with eclipse path


Now you can join or blend additional data sets to the state field.  In this case, I used the Google Trends results for the word "eclipse" and blended the data.

Feel free to download the workbook if there are any issues and comment with any questions.

0 comments:

Note: Only a member of this blog may post a comment.