Tableau Network Graph

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys today we're going to see how to leverage tableau to do relationship and correlation analysis using a basic network graph visual this is good because we get all the drag-and-drop tableau functionality for size color tooltips labeling and all that kind of stuff on both the data nodes as well as the lines so I'm Jim qanitin' burg and let's go a little bit deeper the public data we're going to be using is from data World Bank org specifically were using the CSV files of the WTI data it looks like this there's a lot of columns that we aren't showing both for this example the two columns we're going to choose for source and target our income group and the short name of the country we'll also do some coloring just to show how to add low functionality carries over using the region the only thing we need to do to this file that's not original to the source data is to create an index column so once we have that we're pretty much good to go the Python code is pretty simple what it does is we read in the source file which is WD I country dot CSV and we're going to be creating a coordinates file as well as a bridge file so these are in combination the three files that are going to go into tableau the other thing we'll do once we have the files open in tableau assuming that we're interested in doing this is to have one line of code with a calculated variable that allows us to see source and target Python developers could write code to put this into the files themselves but I wanted to keep the Python code short and simple so with the source target variable we'll be able to see the source are in blue and the targets are in orange and then our goal for the end state is that we're going to build a graph that looks something like this so we'll color the data points by region and will color the lines by income group to kind of see what's going on with the data so we have two files we have wdi country which like I said has all the columns we're interested in and we have a create graph coordinates file running this in Python we see we now have two additional files so we have the graph coordinates file is created which looks like this it has a node name and it has the X&Y data points for the graph and the bridge file has a source target column even is sources odd rows are targets we have the node name to link to and we have the index column as well this will link to the index column that we created ourselves in the source data file and we called it just index so let's go ahead and open it and see what we get we'll start with the bridge file to the bridge file will add the graph coordinates and we want to left join and we see that it already knows that it needs to link node name to node name between the two files we see that we have 526 rows which is double the original number of rows and that's what we want to see so then we'll add in the source data that has all the details and we'll link the index columns together now we're good to go so let's go ahead and switch into the visualization sheet and the index the source target column X Y and index those are all actually dimensions not majors the X and the y need to be converted to continuous variables and the number sign will turn green when we do that so let's build it we'll put two pills on the rows for y and set these as dual axis X goes on columns and will synchronize the right-hand axis with the left-hand axis all right so let's make the first one the first y aligned to make the second Y a circle and back in the line let's put the index in detail so now we have our graph our basic graph I'm going to change the size of the lines just a little bit so we can see better all right this is good now what we want to do is to be able to make sure that we understand where the sources and targets are so I'm going to copy a line of code that I have in my Python code actually tableau code and we will create a variable I like to put equal signs in front of my calculated variables that helps me recognize the ones I created versus the ones that are just native to the data and now if we put this new created variable on color for the data points we'll see that blue is what we get for our source and the orange ones are target's so it's looking good now let's go ahead and put region on color to kind of get a sense of what's going on so now we see something different we see that the ones that don't really have the relationship we're over here on the Left where the region is now these are all now showing colors for the region and over here we see that this particular one has a lot of pink in it and so there's a lot of sub-saharan Africa and this particular one so what's going on here well let's look at income as a color on the line and we see that it's it's all red so this is the red group which is low-income green is upper middle this one is lower middle and then up at the top we have high-income so now we build our graphs we can start to get a sense of how income relates to the region which relates to the countries and so on and so forth we can continue to build with the size and the color tool tips and so forth just like any other chart in tableau we can also adjust our formatting to make it look good but this is basically how to quickly build a network graph in tableau alright thanks and have a great day you
Info
Channel: Jim Knippenberg
Views: 28,729
Rating: 4.89011 out of 5
Keywords: Tableau, Network Graph
Id: mV-AgEmBNss
Channel Id: undefined
Length: 8min 15sec (495 seconds)
Published: Sun Jul 09 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.