Tableau Crash Course Build & Share a Covid 19 Dashboard

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi welcome to my masterclass on tableau i am so excited that you have chosen my tableau course you are going to learn a lot in this class including how to create a dashboard which outlines the trends and patterns of the current coronavirus outbreak and you're also going to publish this online for everybody to see tableau is a visual analytics engine and it makes it very easy for you to create visual reports and dashboards for stakeholders of any business to see tableau makes it really easy to ingest data and see trends and the main benefit of tableau is that it provides insight to drive business action and tableau is great for non-technical users as it requires very little code and has a very easy user interface so how will tableau benefit your career tableau has been gaining popularity in companies big and small it appears in a lot of the job postings especially related to data data science is essential nowadays and tableau really helps to analyze your data models thank you so much for joining me on this journey of creating beautiful data visualizations i'll see you in the next lesson bye hi and welcome to this listen so this is just a little clip so we can install tableau and get it up and running so open your web browser and type the link www dot tableau dot com slash products slash trial so that's tableau dot com slash products slash trial right and this is actually tableau desktop it is the 14-day trial and it's free so it is the tableau with the full capabilities so what you're going to do is enter your email address you can use any email it doesn't have to be a business email and click download free trial now just to note if you are a student or teacher you can get a one-year free license if that applies to you as well but i'm not a student or well technically not a teacher so i'm just going to click download free trial and we're good to go okay and as you see it shows up in your downloads it's around 472 megabytes and once the download is done you can just double click on it and follow the instructions to get tableau up and running so that's it i hope everything is set up for you and in our next lesson we'll learn a bit more on how to connect a data source to tableau so see you then hi welcome back to this lesson and we're going to be learning about connecting to data on tableau so we need a data source and i wanted to build a dashboard relating to the current corona virus outbreak so to do that we're actually going to use an official data source and to find the link it is available on the project brief document as well as in the class description so if you have the project brief document around just open it and we going to navigate to this link so this is actually the official tableau covert 19 google sheet that tableau updates every day so i do recommend using this if it's available if at the time you watching this it's not available there is a static version of the sheet that i've uploaded that you can use and it's this link here but we're going to use the first link because this is tableau's official data source that gets updated daily so i do want our dashboards to also get updated daily so let's just click on it and have a look okay so as you can see initially this excel sheet was just one sheet with the confirmed cases and the depths for the coronavirus outbreak but tableau has actually recently changed the format so now there's two sheets let's click on covert 19 confirmed okay great so as you can see the data is set up in a nice way and we have case types so these are just confirmed cases this looks like the number of cases i'm guessing this is the difference per day um between the number of cases you have the date and like i said they do update every day you have the country and region so this just looks like country you have a province or state so you can see some of them are not applicable for certain countries it looks like maybe just the u.s have states on them you have admin 2 it's a weird name it looks like city but we can review later you have if ips which i'm not sure what that is and you have latitude and longitude so those are geographical coordinates so that's a covert 19 cases let's look at the other sheet so now we enter the covert 19 debts so you have case type and this time it's gets you the number of cases the difference the date the country the state and again admin and if ips and the latitude and longitude so this actually looks a lot like the previous sheet other than case type is different that's quite important to know when we take it into tableau cool so what i want you to do is just copy a link let's just copy this covered 19 cases so let's just copy this link here so just select it and command c or control c and now what we're going to do is open up tableau okay so when you open up tableau this is the pane that you'll see and just to go over this a bit so on your left is the different types of data sources that you can connect to enter blow there's quite a number of data sources that you can connect to tableau server which is tableau's on server if you have data sources running off there you can also connect to different files so microsoft excel text files json files or even pdf files and you can connect to servers so your aws such as redshift or even aurora mysql google sheets is here and the interesting part of it is when you're learning tableau does have these saved data sources called superstore so it's just a dummy data set about a retail store in america it's quite nice to actually have a look at it and play around with it they also have sample workbooks as you can see that you can click and have a play around so i do recommend doing that when you have some spare time and just on the right usually tableau does have some training for you to get started on and to learn a bit more and resources as well okay so now that that's sorted we know our data source is google sheets so we're going to go ahead and connect to it this option of google sheets is present for me but it may not be for you so all you have to do is go to more click and you can search for it so let's just type in google sheets great and let's double click that and as you can see it takes me back to my web browser it wants me to verify tableau so make sure you are signed in um or you can create an account with google if you don't have one i already do and i know tableau is legit so you can just click here all right and you need to authorize tableau desktop so basically you just want to have a look at all your google sheets so i'm going to click allow okay and you can see tableau created this window to authenticate it is now safe to close it so you're welcome to close it and let's go back to tableau okay so now you see a different window you can see you signed in as your gmail account which is the last neutron for me and you can choose the data source that you want so i am going to choose covent 19 cases by jeremy laney that is from tableau or if nothing is showing up for you here we can just paste the link we copied earlier and if you search it shows up okay and this is what we're going to connect on and then just give it a few moments to run the query okay and now we're at a different pane which is often called the data source pane if you look at your bottom left and basically this just covers the data sources that we brought in okay so we know from a google sheet that they were three sheets covert 19 cases which didn't have information there covert 19 confirmed which had confirmed cases on there and then covered 19 deaths so that was similar to the confirmed cases but it just covered depths so and the cool part here is that you can view the data as is if you just click on this table icon and this is just how the data looks so you can see this is a sheet that doesn't have much data on it so we're not going to bring it in let's have a look at this covert 19 confirmed okay this is the same structure we've seen on google sheets so all's good here let me close this and covert 19 gets again similar structure to what we've seen on google sheets so everything is looking good so far now because these two are quite similar in structure we can actually lay them on top of each other and tableau calls it a union and it's quite easy to do so all you have to do is bring in a data source so i'm going to bring in this covert 19 confirmed click and drag it into this pane so as you can see and let it go right so now things look a bit different it shows me what table i just dragged in and the fields and what i want to do is actually append this depths table to the bottom of the confirm table just to make it all one data source because they're very similar the only thing that's different is the case type so what you do is you click this and drag and where it says drag table to union just drop it there so it turns orange okay so now this looks a bit different when we've done the union so what tableau did is basically append the death's data to the confirmed data so it's one table and what it did is add a sheet name and a table name so you know what table is being referred to okay so let's have a look at the fields like i said they all look very similar to the google sheet and you can notice that each field has a little icon so if you click on this icon what it does is that it tells you the type of field it is so cases would be a number that's a whole which makes sense because cases can't be a decimal you can't get 20.2 cases difference also a number the date field technically it should be a date which it is and country region you can see it has like um you can see it has a globe sign so it's a string so it's a bunch of characters or words but it should have a geographic role assigned to it and you can see it does it has country and region so like this you can't change it but usually tableau is pretty good at assigning fields correctly again province and state it's a string that's correct the geographic role is state of province latitude and longitude is also present they also have geographic roles let's take a look at them so just click it's a number that makes sense geographic role is latitude and similar to longitude let's click it it's a number geographic role is longitude okay the other thing you can do is you can rename fields so if you hover over a field you see this little arrow pop up on the top right if you click on it you can rename it which i'm not gonna do at the moment but that is a possibility okay and before we touch on the connection pane here let's just look at filters so filters on your data source pane on this pane here are quite interesting to use and you will only use this if you want to leave out certain data so let's just say you want to analyze a specific country only you can do that with using a filter here let's click on add this brings up the edit data source filters window let's click on add and here is all the fields you can filter on so let's just say i only want to see us data so us is a country so let's go to country let's click on ok and here you can see all the countries that show up so let's search so i think us is just the us so let's search us it shows up here so i'm gonna click it and you can see it changes to 1 out of 180 countries have been selected so that makes sense we're going to click ok you can see over here the data source changes where the photo is now country region and it only keeps countries that are us and now my data will only show me data for the country us okay so an important note that you won't be able to analyze data from other countries if you have a filter at your data source level so i want to analyze the whole world and not just the us i'm going to remove this filter so it's very easy to do you just click on edit okay click on the filter in question which is country region remove and click ok now we back to normal and the last thing that i wanted to touch is this connection pane here so as you can see you have two options live or extract so live just means as it is you will build dashboards with live data which isn't best for performance so if you do have a big data set it's really going to slow down your dashboard boarding and also if you publish it online it's very buggy usually and also because we're going to publish it to tableau public we'd need an extract so it can update every day when the data source updates so an extract is good because it keeps a copy of your data on your local computer so the performance of the dashboard is a lot more faster you don't have to wait for queries to load so i do recommend always selecting extract unless your data set is really small maybe just um a hundred or so rows and a small size table you can use live but otherwise choose extract okay great so we're going to create the extract so once you're done with this data source pane everything looks good you can go to your worksheet so click on this sheet one which is the orange bar and now as you can see a new window has popped up and it says save extract so it's just looking for a place where you want your extract saved you can rename it so i'm going to rename it to covert 19 data and just navigate to where you need it saved and click save you may have to wait a few moments depending on the size of your data and we're good and this is your tableau pane and this is where we'll do the dashboard building all right so i'm going to end it here i think we should save our workbook first so let's go to file and save and then navigate to a place where you'd like to save your workbooks i'm going to call it covered 19 dashboard april okay you are going to save it as a tableau workbook and click save and there we go so now the next step would be just preparing our data and make sure it's ready for analyzing and we'll cover that in the next lesson thank you so much hi welcome back so in this section we're going to be covering preparing your data to make it ready for you to analyze and i'm just going to pick up from where we left off in the last lesson [Music] so this is your tableau pane and this is where the magic happens so this is where we're going to be building charts and dashboards so the interface is quite simple it's very user friendly and it mainly involves dragging and dropping fields into the section here so let me give you a little tour this left pane is probably your most important pane and as you can see on the top left this is your data and where it's coming from so this is actually the extract that we created in the last lesson so if we right click here you can see you have a chance to edit data source so if you click that as you can see this takes you back to your data source pane in case you want to do some editing here but we're going to go back so click sheet 1 and if you right click the data pane again you can do things like rename your data source you can view your data again you can duplicate it you can also close it so closing it technically means deleting it from tableau so i don't recommend doing that and a bunch of other functions you can do now your dimensions pane as you can see the fields here are basically the fields that were on google sheet okay and again you can see the type is here so for instance case type is a string you can still change it if you want to here as well you can even rename it if you click on the little arrow to the right and click rename you can rename it country region province state is still here i'll explain what this is now but country and region again type would be string geographical role is selected here so tableau brings in exactly the same as what we saw on our data source panel so this little hierarchy is what tableau calls it is basically a grouping of similar fields so country and region and province and state country would be level one province would be level two it also works for things like category sub-category or things like executive manager employee so you're looking at hierarchical fields that can get grouped up and tableau does this automatically but you can create your own and sheet and table name were the two new fields you brought in when we created that union and as you can see these fields are all under dimensions and they're all blue so what dimensions are are fields that are categorical in nature which means that you can't perform mathematical operations on them because they essentially text characters strings dates etc measure names is a tableau automatically generated field and it represents the actual names of your measures and you do use it in certain circumstances but we won't be using it in this exercise opposite two dimensions is measures and you can see measures is in green and you can also notice that a lot of the measures are numbers or geographical fields and measures are basically measurable metrics you can perform mathematical operations on these fields okay so you can multiply cases etc and tableau automatically decides which is a measure and a dimension but you can also class it if one of your fields get classed as a dimension by mistake and it should be a measure all you have to do is look for that tiny arrow on the right click on it and go down to where it says convert to measure and then that field will move down and i just want to point out the other auto-generated fields that tableau creates usually if a geographical region like country city state is mentioned in your data tableau will look up a corresponding longitude and latitude and bring it into your data set automatically so this is tableau's own geocodes and this latitude and longitude here are the geocodes that were present in our own dataset it also creates a number of records and this just represents the number of rows in your data set so now let's have a look at some of the data that i was really unsure about and the first one is admin 2. so to do this and if you want to view your data on tableau you click on the field and you drag it and let's drag it to rows now because there's a lot of rows in admin 2 tableau just asks you if you're sure to bring this into the pane so i'm just going to say yes add all members so this looks like a city so it should be renamed so let's do that so let's click on this little arrow and go to rename backspace and city enter great and now this i would say is a geographical role so i think we should change it so let's click on abc it is still a string but we're going to be changing the geographical role and let's move to change it to city great now i want to actually add this to the hierarchy because it makes sense the hierarchy goes from country to state so city should be next well that's very easy to do click on city hold and drag it and you can see it now appears in your hierarchy and it should be your lowest level there we go okay so let's just remove city from the main pane under rows so how to remove a field you simply just drag it out so i'm going to click on city and just drag it out and just to show you the benefit of hierarchy let's bring in country into rows and now click on this plus sign as you can see just by one click we now have the province and state for countries which had it assigned to them so canada and then we can take it one more further because remember in our hierarchy we added city so let's click the plus sign again and now this city so i think city is mainly present in the us yep okay and you can also contract it by selecting the minus sign so if we select minus on province and state we now only have country and province and then if we select minus on country and region we now only have countries showing let's look at sheet right and what we can do is we can drag it into rows or a shortcut would also be let's just remove that a shortcut would be if you double click on the field it brings it into the rows so the sheet would just be the sheet name of the excel sheets that we initially unioned or appended onto each other is it really important no remember we do have case type which distinguishes if the case is a death or just a normal confirmed case so we don't really need this similar we don't need table name let's double click on it it's the same thing we don't need it so how do we get rid of these two well again we click on the little arrow and we say hide and we click on table name and we say hide okay measures so cases we know that represents number of cases let's just double click it so this is different because it's a measure it's now moved into more of a bar chart it's interesting that it's saying 16 million 16m is 16 million if you hover over it it will give you the exact number so 15.4 million cases which is wrong so something is happening here that's a bit suspicious but we do need number of cases and let's just remove that difference we're going to keep fip is it looked like post of quotes but we won't need it in this analysis so let's hide this field as well right click on the arrow click hide latitude longitudes we need and just to note you can't remove tableau auto-generated fields so if we click on latitude generated we can't hide it okay okay so i think our data source is ready we've prepared it as much as we could and the next step would be making sure we understand it and analyzing it so i'll see you in the next lesson where we are going to cover that thank you hey welcome back thank you for joining me again now in this lesson we're going to cover understanding of data now if you remember last lesson we picked up the fact that 14 million covert 19 cases doesn't really make sense and i just want to dive into that a bit because that data is obviously coming out wrong so we're going to try and fix it so let's double click on cases to bring it in two rows there we go 15.49 million cases which is wrong because at the time i am forming this i think the world just hit over a million coronavirus cases definitely not 15 million so now what we're going to do is we're going to do a little audit which is very important in data analysis and building dashboards so i know that the usa has around maybe 300 000 cases currently so what i'm going to do is filter this data just for usa so in order to filter data all you do is decide what you unfolded so in this case i want country to be filtered and i only want to use a data so i'm going to click on it and drag it into your folders pane great and our filter pane opens and now it's basically telling me what country i want voted so i'm going to search and i'm going to search for us and i'm going to click it great selected one of 180 values that makes sense let's click ok ok so now what is it saying 2.1 million cases that's still wrong so what i'm going to do is let's create a table that shows the number of cases per day so to change this from a bar graph to a table all you have to do is navigate to the right where it says show me and click it and this is the type of graphs that you can build and the cool thing about tableau is that it highlights what you need so for instance a heat map you need one or more dimensions and one or two measures a bar chart you'd need no dimensions but you need one measure so i want to create a table which is the first one here and select it and now it's on table form okay so the next thing i want to do is bring in date so select date and drag it to rows because remember because remember i want to know how many cases they are per day now as you can see when i brought in date to rows it changed and what tableau does is that whenever you work on dates it usually summarizes it into a specific grouping so in this case it's showing me here but i don't want to see here i actually want to see the day month and year so all you do is click on this little arrow okay and here is where you can change how the date looks on your worksheet so if you just move down you can see a year is selected i don't want that i want day month year so what we're going to do is we're going to go down to this section and i want to select it here because it tells me how it comes out and i want this format if i had to select day here it will just give me the day nothing else but i want day month year so that's why i'm going to select this so just select a and there we go now it's still looking a bit weird i want a table so what you can do is you can change this so the minute i selected day it changed from a dimension to continuous because it wants to do a graph but i actually want to do a table and table is a dimension for your date so there's two ways of doing that you can go to show me and click on text table and this should actually be a row so let's move that and now it's a table showing the date and the number of cases the other way what you can do is changing the poll so let's go back so to go back on tableau the top left there's a little arrow and you can go back and forward as often as you want okay so what you can do here to change it also would be clicking on this arrow and you can see it's continuous which is a measure let's make it discrete and now you get what you want so there's two types of ways of doing that so what is this data telling us well it looks like the cases are cumulative total so for instance in the united states as of the 7th of february there were 11 cases so let's go right down to the most recent date okay so it says the 4th of april which was yesterday there was 317 000 cases that makes a lot more sense so what do we know well if we take yesterday's date it will give us the total count of cases so what should we do we should filter on your day equals yesterday and we should make sure we always do that since it's a cumulative total okay so let's filter date equals yesterday how do we do that we bring in dates so let's click on date let's drag it to the filters pane and drop it great there's two different ways you can filter date the first way is pretty simple and it's when you want to filter a specific month a year a specific date and you can do this by selecting one so let's select month year and then click next and now you can filter your date on a specific month so let's just filter it for march 2020 so make sure that's checked one selected value out of four click ok and now this only shows me march 2020. but i want to filter it on yesterday because i want the total count of coronavirus cases as of yesterday so let's remove this recent date filter so click on it and just remove it out let's bring in date again so click drag to filters drop and let's select relative date so click on relative date and next now this filters the date relative to a specific date so if you just want to show today's data you click on today and you click ok if you just want to show yesterday's data you click on yesterday and you click on ok okay if we move two weeks you can show the previous week you can show the last three weeks you can show this week up to today and months is the same thing as well quarters and years so like i said we want to filter on yesterday so that will be days and click yesterday and click ok great since today is the fifth of april yesterday would have been the fourth and this is definitely more correct so as of the 4th of april for country the u.s we have had 317 000 cases okay what's interesting is that you can take out day now from this pane because if you have it on the filter it doesn't do anything okay so now we know that in order to make sure our data is correct we need to falter on day equals yesterday if we remove country from filter it should give us the worldwide case numbers so let's do that click on country and drag it away okay so worldwide we have 1.2 million cases that makes sense okay so let's put a title to the sheet so this is a sheet title it's currently sheet 1. but to change it you can double click okay and let us backspace this and let's call it audit i'm just going to write a note here so we know why we're filtering on date so i'm going to say filter on date equals yesterday since the totals are running totals and select okay great and let's rename the sheet to call it audit so on sheet1 you can double click and type in audit and enter great okay so now our data is set we know that any worksheet we need to create we have to filter on date equals yesterday to get the proper total otherwise we're good to go in the next lesson we're going to finally create some charts to analyze the coronavirus outbreak i'll see you then bye hi thank you for joining me again in this lesson we're finally going to be covering how to build charts in order to create our coronavirus dashboard so what we're going to do is create a new sheet and you do that by going to the bottom left and selecting the first icon now i think one of the first charts we need to build is a world map and i definitely want a world map which shows the number of cases per country so to do that the first step we need to do is remember our audit the audit that we did yesterday we basically decided that in order for the cases to represent a correct number we need to filter the date on yesterday so that's what we're gonna do so let's select date bring it into filters pane drop it and remember it's a relative date because we're comparing it so select relative date next and yesterday click ok ok so for a world map we need to bring in longitude and latitude and it's quite easy to do in tableau so let's move to latitude generated and let's double click that and longitude generated and let's double click that and because i wanted to do the number of cases per country that would mean i need to bring in country to tell tableau that i want this by country so click on country and drag it into the marks pane under detail so drag it right on top great so now we can see that each point in the map represents a country and i want it sized by a number of cases and what i mean is countries with the larger number of cases would have a larger size dots so again on tableau it's very easy to do we're bringing in cases and drag it to size great so now this shows me that the larger dots are countries but the larger number of cases i just want to increase the size a bit more so to do that you can select size and just increase that however big you want it it's too big yeah i think that's fine and also i wanted colored again i wanted colored where the countries would the most cases get a more deeper clear color and the countries with the least cases get a more paler color again we drag in cases to color and drop it great and you can change this color if you don't want blue i do not want blue so let's select color under the marks pane and it says edit colors so we're going to do that select it and then to select a color you can do it two ways and to do that you can select palette and you can select any option here so i'm going to go for it okay or the other way you can do it is if you have a specific color in mind you can double click this and change it into a color that you want you can also use a hex color but we're not going to do that i'm happy with this red so i'm just going to cancel and select ok the next thing i want to do is i want to actually display the actual number of cases on your map again very easy click on cases and we're going to drag it into label great so now we can tell the approximate number of cases per country it's looking good now you can change the underlying format of the map to do this go to the map bar on the top click it and there are some options click on background maps you can change the mode of it so now it's selected as light can change to normal okay okay or you can go back to map background maps and change your dark so i like it dark i'm going to keep it there but you are welcome to play with other formats under this map bar if you want to add a specific background image you can as well and you can also import custom geocoding and now if you select map layers it gives you some more options so here you can again change the style on the left you can play with the opacity as well and there's a few other map layers so if you want to add additional terrain or a coastline you can so i'm just not going to select that it doesn't have much of a difference but i think it looks good otherwise i don't think i'm going to do anything further you're welcome to play around with this the only things i'm going to do i'll work on tooltips which i'll explain now and tooltips are basically the pain that shows up when you hover on a point and i just want to edit it to make it look a bit better and to do that is pretty simple again you click on tooltip under the mock card and it comes up like this so what we're gonna do is we're just gonna make it look a bit better so i'm gonna just remove that and this as well and let's move this up so i'm gonna cut it so command x or control x for windows i'm gonna paste it here and i'm gonna go space in space okay and let's make cases bigger and bolder so let's change the font to tableau bold so click on this blue arrow go one up to tableau bold and let's make the font bigger so let's go to 16 let's change the color to red this red would do great in i'm going to leave in as how it is now and country let's make it a little bit bigger so let's do 12 and i think that's fine okay so you can preview it here so click preview so one case in afghanistan looks good enough and select okay so now if you hover it just looks a bit better you can obviously format it how you want to okay now one last thing is the pains here so here you can search for a specific country you can zoom in and out with the plus and minus signs this sort of centralizes your map when you click on the pin so if you click on this arrow there's various options this is just a zoom area if you want to look at a specific place as you can see and this is a hand tool to just move the map around and these three tools are just basically selection tools so let's select the circle so if you click and drag you can select a certain radius and with that you can see the amount of cases within that selection which is pretty cool and you can also just keep it and now your map only has that selection to get rid of that it's technically a filter of countries so you can click and remove it and you're back to normal okay i think that's it in terms of the world map so let's name it double click on sheet2 and let's backspace sheet name and call it world map cases by country select okay great now let's just rename the sheet so go to where it says sheet2 double click change it to world map okay i'm going to leave it there in the next lesson we're going to cover bar charts and creating sets which is quite interesting so i'll see you then hi thank you for joining me again and in this lesson we are going to cover creating bar charts as well as sets so let's get to it let's create a new sheet so next to world map select that icon and again before we start we need to make sure we have to filter on date equals yesterday so let's do that select date click and drag and drop to filter it's going to be a relative date click next and make sure it's on days and select yesterday select okay great now i want to just show cases per country so let's bring in country so select country click and drag to rows and now i want to show cases so select cases double click great now i'm going to change this to bar chart so to do this you're going to move to the top right on show me click it and this time we can select bar chart now there are other charts that you can use so for instance if you want a pie chart if you select it so this shows the number of cases per country as a pie chart definitely looks a bit messy so let's do bar chart and click on show me again to remove it now i actually want this sorted in descending order so countries with the largest cases on top and then smallest towards the bottom and to do that tableau has these two sorting icons on the top middle so let's click on this one here which is descending okay that's looking good now there are a lot of countries here and we won't be able to display all of them on our dashboard so i want to create a bar chart that just shows me the top 10 cases per country and top 10 is sort of a rule that we need to follow and to do this we are going to create a set in tableau and a set is a calculation or logic that a part of your data set needs to follow so our logic is that we want the top 10 countries in relation to the number of cases so what is our main field well our main field is going to be countries to create a set so on the left pane click on country and click on this arrow move down to create and click on set okay so let's name the set it's backspace okay and then the name would be the top 10 countries by cases and where it says general condition or top select top and here our logic needs to be top 10 by total cases so select field and this is pretty much done for us so top 10 cases using the sum so that makes sense and click ok before we move on i just want you to create a duplicate of the set so on sheet3 right click and duplicate and now let's bring in set to filter so drag set and place it on filters okay so now it filtered the data according to top 10 countries but does this make sense so now everything looks normal but i know for a fact that south korea shouldn't actually be the 10th country as of yesterday so tableau is doing something wrong here and essentially this is because how tableau filters data so tableau doesn't know what filters to do first so what it's actually doing is filtering the set first before the date so if we go back to the sheet we just duplicate it so sheet three click on it and i want you to remove this date filter tableau is calculating the set first so it's doing a top 10 of data just like this which is incorrect and you can see the top 10 if we count here so 1 2 3 4 5 6 7 8 9 10. so these countries are exactly the same as the next sheet so click on sheet 3 duplicate 2 as this because it is not actually filtering the date as of yesterday first it's filtering your set first and then it's watering the date so basically it's working with the original data set which is this no filters calculating the top 10 from here and then applying a filter on the date equals yesterday so let's go back to sheet 3 duplicate 2. so technically in this chart we want the top 10 cases as per yesterday's results so we need a way to force tableau to perform the filters or the date filter before the set and it does have a feature like that so if you right click on date and go add to context and now what add to context does is forces tableau to filter date first and then perform the set operation which is what we want and now you can see this changed and it looks a bit better and more accurate okay everything's looking good let's start formatting this chart so what we can do is maybe let's remove the sheet three at the bottom so right click and delete and now you should be left with just sheet three duplicate two let us double click on it and rename it backspace and let's call it let's call it cases by country enter okay let's remove this header we don't need it we know that this is all countries so right click and say right at the bottom hide field labels for rows okay i want this spaced out a bit better so where it says scan it on the top if you click on it you can change how it's spaced out so if you want the graph to fit width for its height or just the entire view so i'm going to change it to entire view okay now let's add i actually want a case count here so i can have a clear view so bring in cases on the left under measures into label so click once on cases drag and drop it under label okay that looks good so there's some weird grid lines here which i don't actually like and i want them removed so we need to format this chart so to do that you right click go down to format and here are the formatting options that you can do so the first one is just your default font which will deal with just now this is your alignment so whether you want it centralized right aligned or left aligned this is your full which you'll work now that's what color your sheet is these are just if there's any borders around your graph which it doesn't look like there's any and finally lines so these lines look like column lines because they're going vertically down so let's click on columns and here there is a very faint grid line so let's click once on that and change it to none click out okay there we go they've disappeared so i like all this font a size bigger and i wanted all white font because i want the background to match our world map which is dark let's go to font which is the first icon in the format pane and you can see it's selected on columns but let's select sheet because i want this applied across the whole sheet and where it says worksheet click on it once and let's change the font size from 9 to 10 and you can see it's changing already let's make it bold and let's change it all to white okay looking good now i want to change this color because obviously i can't see my font so let's go to the full bucket and where it says worksheet color click on it and i want to do it this sort of gray which is the third the third one from black or the second one from black so click on that okay and let's give this a name so title is here we just can't see it because it's a dark background so double click here let's change our font to white so just select everything go to color click on it and change to white okay backspace and this would be cases by country let's make it bold so select everything and maybe change the font to tableau bold so click and change it to fonts up tableau bold and centralize it okay and let's change this color i just wanted to match our current format which is sort of red black and gray so let's do this gray so go to color and let's do it maybe this color here yeah and then before i continue let's change this title to say top 10 countries by cases i think that makes more sense okay and now i want to do a similar graph but it's going to be top 10 countries by number of depths so we're going to duplicate this so right click on where it says cases by country the sheet name and say duplicate so let's change this title top 10 countries by depths so let's double click on title and let's rename that top 10 countries by deaths select ok let's rename the worksheet so double click it backspace and depths by country okay to calculate jets we bring in case type as a filter so click on case type and drag it in to filter drop it and now we just want to see deaths okay and i want to add this to context because tableau needs to calculate the date and just include debts only and then it can calculate the set so let's right click here where it says case type gets add to context okay so now this shows me the top 10 countries by depths and i think here i just want to change the color to red so click on color and change it to to red okay so i think that looks good we have our two bar charts one by cases one by depths and now what i want to do is create headline cards and these headline cards are sort of summaries that just represent your data so i want us to create a new sheet so click on the chart icon at the bottom and remember i ordered so we need to filter by date equals yesterday so let's click on date bring it into filter click on relative date click next and click on yesterday click okay great and let's just bring in the number of cases okay so 1.2 million cases let's change this a bit so where it says standard at the top change it to entire view okay now let's click on text in the mock cards because i just want to edit that font so click on it um let's change alignment to middle and click on these three dots next to some cases okay so let's make this a lot bigger so let's highlight some cases um let's choose font as tableau bold so just one up from tableau book and let's make it 28 okay great and then press enter and let's type in total cases and let's make this a bit smaller so highlight total cases and change the font size to 16. okay apply that looks a bit good and remember our theme is black so this font needs to be white so let's select everything change the font color to white okay and now let's change the color of our background so right click format and on the top left we're going to click the full bucket and change the worksheet color to that black so it's the third one down okay looking good and the header again is a bit hidden so let's just click on it and just call it total cases i think everything is dark now let me just change the font color to white okay now i'm going to do a similar one for total depths so let's rename the sheet to total cases and let's duplicate it okay so let's rename the sheet to total dates so double click okay and let's just rename the title as well so double click on the title and backspace cases replace it with dates click ok now we need to add a folder to our data because we just want to show depths and not the total number of cases so click on case type drag it into filters and select it so 1964 000 yes worldwide so let's change this label to total deaths so click on the text field in your marks pane click once click on the three dots here and where it says total cases just rename that to depths okay so before we move on i think there is a slight error in the data um to do with case type so to explain i'm just going to create a new sheet and just double click on case type and what is happening is that depths is already included in confirm cases so we need to use this as a filter for all our graphs that don't relate to decks just because death's already counted so we are double counting it so i think that just applies to the world map so let's bring in case type in filters and let's select just confirmed cases because confirmed cases has debts included okay great and i think it's just case by country as well so click on case by country bring in this filter and confirmed cases only so click on that click ok great remember to add this to context so right click add to context and then i think it just applies to this card as well so click case type bring it on filters and just confirmed cases we're doing that because debts is counted in confirmed cases so we don't want to include debts already because then it would be double counting it okay so now that everything is looking right i just want to do one more card and this is the mortality rate and mortality rate would be the percentage of cases that end up in depths essentially it would be your total death number divided by your total case number and to do this we need to create a calculation so let's just create a new sheet and we'll bring in case type so just double click that and let's do our date equals yesterday folder so click on date bring in filters click on relative date click on next select yesterday and okay and now let's double click on cases okay so essentially our mortality rate should be sixty four thousand six hundred and three divided by one million a hundred and ninety seven thousand and two hundred and forty eight if you do this on a calculator where debts over confirmed cases it should be around 5.4 percent mortality rate so i'm just going to write it as a note on our title header so double click here and backspace so i'm just going to say mortality rate equals 5.4 okay so now we need to create a calculation in order to calculate mortality rate and to create a calculation you just click on this arrow on the right of the dimensions title and create calculated field let's select that okay in order to create mortality rate we technically need two fields one field that just counts dates and one field that counts the total confirmed cases so let's create that so let's rename calculation one as dits okay and essentially how this calculation is going to run is through this logic so if the case type is deaths then we need to count the case if it's not then we don't need to count the case and there's a function for that calculation in tableau and it's called the aptly named if i if now before we write on this pane if you move to the right you'll see a little help function if you can't see it it's probably contracted so click on this arrow and it should expand and when it says enter search text you can enter whatever function tableau has and gives you an explanation of it see so let's search if and click on if there okay so it has a format example of how you're going to use the if statement and what it does is it tests a series of expressions returning the then value for the first true expression so essentially the format of it is something like this if and square brackets scenario 1 then answer one else answer two end okay so in a nutshell that's the format of an if statement it's quite a logical calculation on on tableau so what i'm saying here is if a specific scenario happens that's true then give me an answer but if something else happens then give me a different answer so what is our scenario so scenario is so let's just backspace this so if our case type and you can see as soon as you type in case it populates fields which are called case so if case type so let's click that is equal to and quotations deaths okay because we're reading off here so if case type is equal to deaths and since it's a string we need to have it in inverted commas then what then we count cases so let's just say cases okay so again if our case type is equal to deaths then we're going to count cases but what if it doesn't equal debts then we're not going to count cases so replace answer two with a zero end and that's essentially it again a logical statement usually has if some sort of scenario happens then output something if another scenario happens then after something else okay so if case type equals deaths then count the number of cases and if it doesn't equal debts then don't count anything at all click ok and let's just bring it in so let's just double check this if we bring it into the work pane it should give us the same answer as debts okay there you go it does and the good thing is is that it's a separate field so we won't need case type right so if we remove case type our depth field is still correct it's still giving us 64 000 deaths perfect okay so now let's do a similar one just with confirmed cases so i want you to actually pause the video and try and do it yourself okay so we're going to create a calculation for confirm cases so click on the arrow create calculated field and let's call it confirmed cases okay and it's going to be an if function as well so it's going to be if and it's going to be case type equals confirmed then count the cases and if it isn't confirmed so else don't count anything end again so if the scenario would be your case type is confirmed then actually count the cases for me and if it's not confirmed then bring back zero end okay so let's bring it in and here it is exactly the same so now we don't need case type and we don't need sum of cases and we have cases and deaths as two separate fields okay so now we're going to create the mortality rate calculation so click on arrow click on create calculated field and let's rename this to mortality rate it will be a percentage so put in the percentage sign and it would equal the sum of your debts over the sum of your confirmed cases the sum of debts over some of confirmed cases oops and click on ok so now let's double click it let's bring it in and see if it makes sense it's a zero so the reason why it's a zero is because it's actually a percentage and now it's stored as a number so let's just change this to percentage to do that so you're going to right click on the field go to default properties number format and click on it and change it to percentage okay and now you can see our mortality rate 5.4 percent is actually matching the mortality rate when i calculated it on a calculator so it's looking correct so now let's create a card just for mortality rate so click on the total debt sheet and duplicate it so right click duplicate let's rename this title as mortality rate click on ok and let's just rename the sheet before you forget mortality rate so double click and instead of some cases we're going to bring in mortality rate so if you look on the filters it says case type equals gets um we're going to remove that because for mortality rate we don't need a filter okay and now let's bring in mortality rate so let's click on it i'm going to drag it on top of where they some cases okay so 5.4 percent it's looking good let's just change this so click on text click on the three dots and where it says total dips let's replace that with mortality rate okay let's do one more graph and i just want to see a simple line graph of the total number of cases per day just so we can track the culvert 19 growth so let's create a new sheet you can get rid of this sheet we used for the calculations if you want to if you want to keep it to reference it then by all means but we won't use it in the dashboard so i'm going to delete it okay so let's bring in date so i'm just going to double click i'm going to change this today so click on this arrow and remember i don't want just the number i want day month year so i'm going to use this day okay and let's just bring in confirmed cases that's pretty good i want labels on each day which is pretty easy let's just bring in confirmed cases and add it to label if it's too much which i think it is i just want a label on the most recent point so you can click on label again and let's do most recent okay that looks better i want to make the line a bit bigger so let's just do a size and make it a bit bigger and let's change the color to gray okay now let's format this like how we formatted the rest so right click format let's change the worksheet font to white because remember the background will be black click on it let's make it bold and white okay let us change the color so click on the full bucket click on worksheet third one down right and let's get rid of the grid lines so click here and it would be row grid lines so click on rows and none okay i think that looks pretty good okay and let's just rename this so change the font to white and change the font type to tableau bold okay so let's call it confirmed cases per day centralize it and okay okay let's rename the sheet confirm cases by day okay so i think we're pretty good to go on our dashboard we have enough charts and we should actually begin building it soon so i'll leave it here for now and i'll see you in the next lesson where we're going to start building our dashboard see you then bye hi welcome back so we're finally here we're finally ready to build our dashboard so let's get to it okay so instead of creating a new sheet which is this icon with the bar chart we're actually going to select the next icon which looks like a window so click on it and this is where you build your dashboard so on the left over here let's change the size so where it says desktop browser a thousand by eight hundred i want you to click it and let's change it to 1 300 with by 900 height okay great and as you can see all the sheets that you've built in the previous lessons they come up here where you can drag it onto your dashboard pane but before we do let's change the color to make it black so go to dashboard format and where it says default let's change it to our popular grayish black color okay great so how we're going to do it is using floating containers and containers are just basically containers that you can use on your dashboard to make the sizing a bit more fixed and neater so this is your container section and where it says tiled i just want you to click floating okay so we're going to do a cards first and the layout must be horizontal so let's bring in a horizontal container just drag it and drop it here okay so to bring in a sheet in your dashboard select the sheet you want and drag it in so let's select total cases right so select it and drag it and while you're dragging it i want you to hold shift and you can see it fixes it into the container that you just put on so while you're holding shift and your container is highlighted let it go great now let's hide this title because i don't want it so right click hide title okay let's use the next card which is total deaths so click on total dates drag it and hold shift and once you hold shift you can see it's sort of moving to a position on your container that you wanted if you see the whole screen highlighted that means that you're fixing it to the sheet and not the container we just created so make sure your container is highlighted and i want it next to total cases so here okay and let it go great so let's hide this title again okay and let's do mortality rate so click on mortality rate drag and hold shift and i want it next to total debts okay and let's hide this title right click high title okay so now let's click on this arrow and let's select the container let's make it a bit bigger and just fix it so it just looks better and it's floating for now so you can just place it anywhere okay now let's create another container because i want cases by country and deaths by country to be one top of each other so bring in a vertical container and you can see how it's going to be stacked i want these two graphs to be stacked one on top of another so that's why i'm bringing in a vertical container so bring it in your dashboard you can make it a bit bigger you can adjust as your dashboard is being built let's bring in cases by country so this is the same process so you're going to click on cases by country drag and as soon as it's on the top of your container hold shift and let go perfect and let's do the same for dits by country so click drag and hold shift and i want it right below okay now i actually don't see the need of having these axes here i feel like the labels already give us a sense of numbers so you can hide them and that's what i'm going to do so click on the axis right click and deselect show header and do the same here okay that looks great and now what we can do is actually move this container on top of this so click on total cases click on this arrow and select container and pick it up here so you can pick it up and move but hold shift and drag it on top of this okay while you're holding shift and let go great and let's just adjust it you can adjust it here okay so let's select this container again and do it once more because i'm going to select the whole thing and let's just move it up a little bit so we can chop and change this as we go on okay and let's bring in cumulative cases by day here and a world map here so again i'd say another vertical stack i'll just make it a bit bigger and okay so confirm cases by day so select this drag it in and as soon as it's on top of your container hold shift drop right and do the same for world map okay make sure it's positioned at the bottom and looks pretty good now you notice for world map this sort of container came with it and it's just basically a legend that we don't need and click on this arrow go select container vertical and just get rid of it so this is brought in because the world map we had them as filters and legends but we don't need them so you're gonna delete the containers okay now this looks like there's a title but we're gonna hide it so just right click and hide title and it looks like there's a border here which i don't like so let's get rid of it so click on it go format and borders are here so click on this window looking icon and which is row divider click on none and do the same for columns so columns where it says column divider click on none okay great all right so now we nearly at the end we just have about four more operations to do i want to give our dashboard a little name here with a picture so if you can't find a corona virus picture you can look for one you can pause the video and look for one download the image as either png or jpeg and save it somewhere okay so now we're gonna create another container i want a picture here and a title so let's create a horizontal container so click it drag it in hold shift because i do want it like at the top here okay just resize it and let's bring in text so where it says text click it drag hold shift and i want it right there let's name it covered 19 dashboard and maybe put your name in as well okay so let's select this i would say tableau bold centralize it let's make this title bigger maybe a 26 and white and your name also okay and let's bring an image so select this image icon and i want it right next to cobit 19 and you notice the image pane pop up so this is where you choose an image so if you downloaded a picture of covert you can use that otherwise you can just not put an image at all so i downloaded a picture from the internet and i am going to do a foot and a center image okay that looks a bit better it looks like there's a random container that appeared so i'm just going to delete it okay so essentially your dashboard should have two main containers and you can see the layout of your containers if you select layout and this is your containers by hierarchy so there's one main container here which consists of confirmed cases and world map and another main container here which consists of your title pane and your cards and your cases and your deaths by country and essentially we want to all group this up into one container so i just want to make this a bit smaller and do the same for this container as well and we're going to bring in our final container and our final container would just be putting this container here and this container together so let's bring in a horizontal container and let's just go back to layout and let's select this container here and let's bring it in our horizontal container so as soon as it's on top hold shift and drop and let's do the same for that so let's select this container and we can drag it around and as soon as it's on top shift and make sure it's here great now we have one container that has a whole dashboard and to fix it you do one last move where you right click this arrow and you deselect floating and that's it and now you can sort of chop and change but everything does actually stay in a nice position for you to do that so let's rename our dashboard teen and it is ready to publish so i'll see you in the next lesson our final one where we're going to publish our dashboard bye hi welcome back so in this lesson we're going to learn how to publish our dashboard to tableau public so what you're going to do is you're going to need a free tableau public account so navigate to the site which is public.tableau.com and i want you to sign up for an account so click on sign up and you're just going to fill in your name an email address and a password once you're done make sure you have verified your account via your email okay okay so let's go back to tableau okay so let's go back to tableau okay so now that we're ready to publish our lovely dashboard we are going to go to server and where it says tableau public we're going to say save to tableau public okay so here it's okay so here it asks you to sign in so the account that you just created you use the same login details and sign in okay so just use any login details and click sign in and just wait a moment for it to access the server and here we go it is published and here we go it is published and ready for the world to see so now you can tweak the title and maybe add some details on it and you can also share the link you can show it to your friends and your family and maybe even included in your resume this data should actually get updated as a tableau this data will also get updated as the google sheet updates which is pretty cool as well and lastly the other thing you can do is also export your dashboard so if you go to dashboard you can export the image itself to a word or pdf document and that's it i hope you had a lot of fun as i did building this together and that's it i really hope you had a lot of fun as i did building this and managed to see the benefit in tableau and how you can create beautiful dashboards for everybody to see and that's it i hope you enjoyed this as much as i did and i hope that you and that's it thank you so much for joining me in this lesson it was super fun to build and i hope you had a great time too don't forget to do your project as well don't forget okay there is a similar exercise on your project brief for you to get more practice and i hope that and and there we go we're done i hope you enjoyed this as much as i did thank you so much for going along with me tableau is super fun and a very useful tool as you can see thank you so much and let me know if you have any questions i am available all the time bye
Info
Channel: Data Ranger
Views: 1,598
Rating: 5 out of 5
Keywords: tableau training for beginners 2020, Tableau Crush Course about Dashoard, Covid 19 Dashboard, covid 19 dashboard using tableau
Id: BbTo06kWHb0
Channel Id: undefined
Length: 102min 22sec (6142 seconds)
Published: Sun May 10 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.