top of page
Search
byztpz

NETWORK ANALYSIS WITH TABLEAU



This blog post, written to introduce Tableau software to you, is the second of my network analysis article series. Chris Stolte, Pat Hanrahan, and Christian Chabot founded Tableau in 2003 as an output of a computer science project at Standford University. It is an interactive data visualization tool that you can create charts, graphs, maps, and further visuals to analyze and represent your data effectively. It enables plotting latitude and longitude coordinates for further spatial connections. You can blend your data from various sources and collaborate with other users.


Let’s look at Tableau closely!


The company has different products such as Tableau Public, Tableau Online, Tableau Desktop, Tableau Server, and Tableau Prep. In this blog post, I will introduce you Tableau Desktop with 14-day free trial. You should go to https://www.tableau.com/ to download Tableau Desktop to your local computer.


After registration, you can download, install, and fill out trial registration form to use Tableau Desktop.


Now, you can use Tableau Desktop!

Before opening it, however, you need to have a data set. I had created an Excel file for the data collected from the book of David Abulafia, The Great Sea: A Human History of the Mediterranean. The main topic of the book is the mobility of humans for economic, cultural, and political reasons. The Great Sea was written in a chronological order by starting from 22.000 BC to 2010. It is consisted of five chapters and each chapter has its own subtitles again in a chronological order. For the sample visualization project of The Great Sea, I choose only the third path of the third chapter, which has eight chronological subtitles that covers the years of Byzantine rule.


After I collected the data and categorized them, the result comprised mobility of goods and merchants, military actors including warriors, attackers, kings, and warlords and finally others including migrants and religious groups. You can see my sample data sheet below.


The first column is consisted of only port cities that are given in the map of the third path of the third chapter. The location must have been an exact point as a requirement of Tableau; otherwise, we could not locate the place in our base map. If the location is given as a region like the Black Sea in the book while mentioning a mobility network, it was replaced by Caffa, which is the only port city near the Black Sea through the sub-chapter, for example. If the city, which is stated in the text, is not shown on the map of the related sub-chapter, then I scanned other maps of the rest seven sub-chapters to find the closest port city to the mentioned region. On the other hand, if the location is given as a country name rather than a city, I picked up the city of this country from the map of related sub-chapter. As a result, Sicily replaced by Palermo, Sardinia by Castello/Cagliari, Champagne by Montpellier and Marseilles, and finally Morocco by Ceuta. Then, I found the coordinates of the locations. The column D indicates the time range of the third sub-chapter. The column E represents the departure and destination points of the related mobility. Path ID column is a requirement of Tableau to draw routes, however, as I will show later, you can also create path data on Tableau without a prior dedicated column on your Excel sheet. Mobility Definition column lists the actors of the mobility.


If your Excel is also ready, then please open Tableau. Now, you will see the Start Page that consisted of three panes: Connect, Open, and Discover. You can connect to data, open the recently used workbooks, and discover workbooks created Tableau community. To connect to a data source, there are two ways: Connect To a File and To a Server. Under To a File, you can access data stored in Microsoft Excel files, Text files, JSON Files, PDF files, spatial files, and statistical files, such as SAS, SPSS, and R. Under To a Server, you connect to data stored in various databases based on which servers you connect more often. I will connect a Microsoft Excel file from by computer. For this, click Microsoft Excel under To a File.


Then you will see your data on Tableau worksheet.


If you have data saved in two different sheets on the same Excel file, you can also relate them on Tableau. For example, you can list the coordinates in another sheet. Then you will see your sheets one under the other. Then you can drag them to relate.


Before sampling, it would be a good idea to be familiar with the Tableau Desktop interface. Please take a glance at the marked areas below.


When you click Sheet 1 left bottom to start processing the data. If you do not have Path column in your Excel, you can easily create it. For this, click the marked drop-down icon and select Create Calculated Field.


You can create your path from the pop-up window below and control its validity. Then your Path will immediately appear on the data pane located left side.


Now, we will pinpoint all locations on a base map, arrange the sizes of location icons based on the frequency of Path ID, then add links to connect them each other as departure and destination points. It is also applicable to edit colors, shapes, icons, and so on. To show the locations on the base map, please double click Latitude and Longitude or drag them to Rows and Columns respectively. When Tableau recognizes your location data successfully and automatically assigns geographic roles to your fields and there will be a globe icon next to them in the data pane. Then your base map will occur immediately, but you will see only one point on the map.


To show all the locations on the map, please drag Path ID to the Details under Marks Card.


Now, you can see all the points located on the map.


You can also connect your places on the map. For this, firstly choose Line from the drop-down list marked on the following image.


Then drag the Place again to the Details under Marks Card. Here, you can connect your places and paths on a base map.


In Tableau, you can also create layered maps one another with two layers of marks. I would like to edit my base map to indicate places as circles and paths as lines. Therefore, drag Latitude to Rows.


You can change the icon shapes from the Marks Card.


If you would like to show the frequency of routes with the different sizes of location icons on the map, drag Path ID to Size. Then, right-click the second Latitude (generated) field and select Dual Axis.


Finally, you have a layered map. Then, you can modify your map from the Color Mark.


We can also add details on the map to be shown interactively. For instance, drag Mobility Definition to the Detailsbesides Path ID and Place.


Now, when you hold the mouse pointer to Italy, for example, the details will be shown like below.


To demonstrate on the map what are the subjects of the mobility, drag Mobility Definition to the Label or simply change the mark card type of it from Details to Label.


Now, the mobility definitions will appear on the map.


I would like to modify my visualization a little more informative by specifying on the map departure points. To edit Label, click Mobility Definition Label on the Marks Card and then click the icon right of the Text. You can also edit label font and alignments from there. You can modify your label from the pop-up window.


You can Preview the label before applying it on the map. If everything is ok, then click Apply, bottom-right corner.


Then your visualization will appear on the view section.


However, there are some missing labels on the map above. Tableau automatically hides some labels to prevent overlapping. To demonstrate all labels, you need to allow labels to overlap other marks from the Edit Label window shown above.


Tableau also allows us to edit map layers and styles. Click Map on the Menu Bar and then select Background Layers.


Afterwards, you can select background layers from the left side.


You can also create tables and graphs to analyze your data. For example, when I drag Place to Columns; Time Rangeand Departure-Destination to Rows, Tableau creates a table that shows how many times a place recorded as a departure point. You can arrange the table or turn it into a graph or a visual from the Show Me, right side of the view panel.





To save your visualizations on your local computer, click File from the Menu Bar and select Save As. Please keep it mind that, you cannot save your project locally if you use Tableau Public.

Further sophisticated features of Tableau that are not touched in this blog post are waiting for you to be discovered!


Beyza TOPUZ DEMİR

University of Antwerp PhD Candidate





Comments


bottom of page