Course 6‐2 - Forestreee/Data-Analytics GitHub Wiki

Google Data Analytics Professional

[Share Data Through the Art of Visualization]

WEEK2 - Creating data visualizations with Tableau

Tableau is a tool that helps data analysts create effective data visualizations. In this part of the course, you’ll learn all about Tableau and explore the importance of creativity and clarity while visualizing your data analysis findings.

Learning Objectives

  • Identify Tableau as a data visualization tool and understand its uses
  • Explain how data visualization can allow for creativity and clarity to appropriately present findings
  • Select appropriate visuals for various presentation situations
  • Identify different types of data visualizations and their uses
  • Use multiple data sources to create a visualization
  • Discuss accessibility issues associated with data visualization

Get started with Tableau

Data visualizations with Tableau

Hello again. We've already discussed how helpful data visualizations can be when we want to fit a lot of knowledge into a small space. Now it's time to explore a powerful tool that can help you create these visualizations and bring your data to life. It's called Tableau, a visual analytics platform that makes it a lot easier to explore and manage data.

You might remember hearing a bit about Tableau in some of our earlier discussions, but you're about to discover even more. Plus, when you get comfortable with Tableau, you'll find it even easier to use similar tools, giving you another skill that will help you stand out in the job hunt.

Coming up, we'll cover some of the features that make Tableau effective for visualizations and why it's used across industries. After that, the fun really starts. We'll jump right in and explore the Tableau interface, identifying and applying the various tools it has to offer. I'll show you how to add data sources, control visual elements, and work with a variety of features that will make your visualization really powerful. Like any software platform, there's some best practices to keep in mind. So I'll show you some examples of the good and the bad when it comes to visualizations.

We'll also get creative using color vision deficiency palettes to make our visualizations more accessible, and we'll show you how multiple data sources can be combined to tell a more comprehensive story. By the time we wrap up here, you'll be able to publish your own visualizations on Tableau. I am so excited to lead you on this Tableau tour. It's another useful tool that you'll be able to turn to as a future data analyst so that you can visualize and published data you care about. After all, data has a story, and this is your chance to share it with others. All right, let's discover what it's all about.

Tableau Public and other online tools

Welcome back. Mastering online tools like Tableau will make it easier for your audience to understand difficult concepts or identify new patterns in your data.

Need to help a news outlet showcase changing real estate prices in regional markets? Check.

Want to help a nonprofit use their data in better ways to streamline operations? Check.

Need to explore what video games sales look like over the past few decades? Double check.

Many different kinds of companies are using Tableau right now to do all of these things and more. This means there's a good chance you'll end up using it at some point. in your career. But I'm getting ahead of myself.

First, let's talk about what Tableau actually is. You might remember learning that Tableau is a business intelligence and analytics platform that you can use online to help people see, understand, and make decisions with data. But it's not all business all the time.

Take this data viz, for example, created by Tableau enthusiast Steve Thomas to record Bigfoot sightings across the US. It's available on Tableau Public, which will be using together in our activities in this course.

Tableau can help you make and easily share interactive dashboards, maps, and graphs with your data. Without any coding, you can connect to data and lots of formats like Excel, CSV, and Google Sheets. You might also find yourself working with a company that uses another option, like Looker or Google Data Studio. for example. Like Tableau, Looker and Google Data Studio help you take raw data and bring it to life visually, but each does this in different ways. For example, while Tableau is offered in a variety of formats like browser and desktop, Looker and Google Data Studio are completely browser-based. But here's the great news. Once you learn the fundamentals of Tableau, you'll find they easily transfer to other visualization tools, Ready to get started using it? Then, without further ado, meet Tableau up next.

Logging in to Tableau Public (Reading)

Key takeaways Accessing Tableau Public and creating a profile will be your first step to learning how to design data visualizations like a data professional.

Resources for more information To help you troubleshoot or to learn more, explore the following links:

Tableau Public not working? Check out these Technical speculations and storage requirements

The Tableau Public Discover page includes ‘Viz of the Day’ and other beautiful vizzes designed on the platform

Tableau resources As you continue to explore Tableau and prepare to make your own dynamic dashboards, here are a few useful links within Tableau Public:

  • Tableau Public Channels: Explore data visualizations created by others across a variety of different topics.

  • Viz of the Day : Tableau Public features a new data viz every day; check back for new visualizations daily or subscribe to receive updates directly to your inbox

  • Google Career Certificates page on Tableau Public : This gallery contains all the visualizations created in the video lessons so you can explore these examples more in-depth.

  • Tableau Public resources page : This links to the resources page, including some how-to videos and sample data.

  • Tableau Accessibility FAQ : Access resources about accessibility in Tableau visualizations using the FAQ; it includes links to blog posts, community forums, and tips for new users.

  • Tableau community forum : Search for answers and connect with other users in the community on the forum page.

  • Data Literacy Course: Build your data literacy skills in order to interpret, explore, and communicate effectively with data.

Meet Tableau

Hello and welcome to the intersection of analytics and art. The place where data analysts like me go to unleash the true potential of data with meaningful visuals and the place where future data analysts like you can also go to learn how to do this.

Welcome to Tableau, one of the many visualization platforms that helps you do more with your data.

When you turn data into a visualization, you get to watch it transform before your eyes into a meaningful story that people can connect to and care about. Visualizations in Tableau are dynamic, not static.

As a quick refresher, dynamic visualizations are interactive or change with time. The interactive nature of these graphics means your audience has some control over what they see and you have incredible flexibility with how you create them. So, let's create our own visualization using a preloaded table on Tableau Public.

It's important to note that there's different ways to create visualizations in Tableau. Tableau has a few different offerings, but for this course we're using Tableau Public in browser, which is free. One cool thing about Tableau Public is the public gallery with data viz examples from across the web.

Gallery is now Discover in the top navigation bar. (Viz of the Day)

For now, you'll be working with one of these examples from the gallery. You'll be copying over data workbooks to your own profile to start creating and publishing visualizations. To get started, sign into your Tableau Public account, you can check out an earlier reading for more details. Then to access the workbook, open the Google Career certificates page on Tableau Public by clicking the link included in this video and the reading from earlier.

You can click the link below to follow along. https://public.tableau.com/profile/grow.with.google#!/ Note: If you're not already logged in to Tableau Public, log in before you click the link. Or, copy the link and paste it into the address bar after you have logged in to Tableau Public. In either case, you will land on the Google Career Certificates page with access to the World Happiness data and workbooks used in this video.

This opens a new tab that is still linked to your account. Here's what the page should look like. There are few workbooks loaded up with different data sets that you can save to your own profile. These are a great starting point for creating your own visualizations. There will also be a resource following this video that goes through how to download Tableau and load your own data. But for now let's use this gallery as a starting point. Now, click to view the workbook titled Just the Data World Happiness. This brings up the data table we use to help create the World Happiness data viz that's in the gallery.

Next, go to the menu in the upper right corner and click make a copy. At this point, Tableau will save a copy of this workbook to your own profile so you can create your own visualizations. Now that you're working in your own copy, create a new worksheet so you can build a data viz from scratch. You'll click on Worksheet in the top menu and then New Worksheet. To start building your data viz, add country as a detail in the marks shelf. You can do this by dragging the country table over to the detail icon. This sets up your viz as a world map to represent the data in the table. Next, add the happiness score to the color on the mark shelf. This applies a color scheme to the viz, in this case shades of blue. This range of colors doesn't offer a lot of contrasts, especially for people with color vision deficiencies. So, to adjust the colors, click the color menu and click edit colors. Then change the color scheme to green, blue, diverging and check the box for stepped colors, which shows a clear difference between the highest and lowest happiness score. Darker blue means a higher happiness score, whereas darker green relates to a lower happiness score. You can see this broken down in the scale in the top right corner. So, with just a couple of steps we have an interesting visualization that shows happiness data in a way that's easy to digest. The countries and colors on the map are readable and offer some great insights.

But let's keep going so we can explore more Tableau features to refine your data viz. Because there are three years of data in the table we're using, you can filter the data to only include 2016.

Using multiple years can also be useful, depending on your objective. Regardless, you have lots of options for filtering.

So, we'll add year to the filter shelf. Then we'll choose to filter by year and we'll select 2016.

Let's focus our visualization on one region, the European region. Use the tools in this toolbar to pan to and zoom in on the European region.

This takes some time and practice. Once you have a pretty good view of Europe and its surrounding areas, use the shape tools in the same tool bar to select as much of Europe as you can.

Since we're practicing, make your best guess if you're not sure which countries to include. If you were working on a visualization that you were going to share with others, you'd want to double-check that it was accurate.

Hover your cursor over one of the countries and it shows you data about that specific country as well as all the countries you've selected in the region. Then, use the lasso selection tool to select just a few countries like this. Keep only, this applies another filter this time to the country you're including in your viz.

You'll notice that the color scheme of these countries is updated. This reflects that the range of colors is now only being applied to these countries. Countries in this region might have been in the same part of the range when compared to the rest of the world, but now they're in different parts because the data being measured is specific to this region. To make your viz even better, add the happiness score as a label in the map. You can now see a happiness score for each country on the map.

This adds an extra layer of detail to the viz to help make a connection to the actual data. There's an option to change the data type of the happiness scores from decimals to whole numbers. But when you do this, you lose the contrast that the values with the decimals offers. So, change it back to show the happiness score as a decimal.

Now, to make it even more interactive, let's add a filter with a slider. This will allow your audience to filter by happiness score so they can focus on fewer countries. But first, let's bring in more of the map we started with. To do this, hover on the map and select the zoom home icon in the toolbar to reveal more countries on the map. Next, we're going to add happiness score to the filter shelf. We'll select all values and click next. Then, for the range of values we'll click OK to accept the default settings. In the filters shelf, click the drop down to open the menu for the happiness score and select Show Filter. If we select the drop down for the menu again, we can confirm that Show Filter has a check mark next to it.

You can toggle the check mark to display or not display the filter. When Show Filter is marked, a slider is displayed to the right of the map. Now, try filtering to show a happiness score of 6.0 or below.

You can see how the filter changes which countries are now highlighted in your viz. And there you have it, our first visualization based on data we brought in from an external source. Pretty powerful, right?

We'll save our viz so we can admire it anytime we want to and maybe even practice using the Tableau tools with it. It's always important to save your work, but make sure not to include any personal information in your file name. All of the data visualizations created in Tableau public are visible to, well, the public.

You can also keep your visualizations hidden by going to your profile page and checking out the eye icon in the upper right corner of the viz. If the icon is selected, you'll see the eye with a slash through it on your viz and the viz will remain hidden. It's up to you, but lots of data viz created by users like you are viewable. In fact, you can easily check them out by searching on Tableau Public. Then you can search for any kind of data viz, including world happiness visualizations.

You'll come across all types of data viz, many with advanced settings. Some of the examples you'll find in the gallery are stronger than others.

Coming up, we'll talk about effective data visualizations and some ways you can make your data viz work even stronger. See you soon.

Visualizations in spreadsheets and Tableau (Reading)

Create a data visualization in Tableau

Hi and welcome back. In this video, we're going to use Tableau to create a data viz, a great way to share insights with others. To begin, you'll need to download the dataset we'll use for this activity. Click the link to create a copy of the dataset and download it. If you don't have a google account, download the dataset directly from the attachment.

Important note This is a companion tutorial. After you follow along with the instructor, you can practice again with the hands-on activity that comes next. (Optional) If you prefer, you may skip this video tutorial and move on to the activity now. Link to activity: Hands-On Activity: Working with Tableau. To follow along with the instructor in Tableau Public, download the matching Excel dataset and link below: CO2 Dataset

As we go through the steps, you can put this video on one side of the screen and follow along in another window. You might notice your screen is slightly different from what you see here. Tableau might have updated its interface but the steps should be pretty much the same. First, log in to Tableau public. If you haven't created an account, go back to the reading about logging into Tableau public.

Okay, now go to the circle in the upper right corner of the window and select my profile. From there, choose Create a Viz. This will open the Tableau public interface. From the connect to data window, go to the files tab and upload the CO2 dataset we downloaded earlier.

Or you can navigate to the data tab at the top of the Tableau public interface. Under the dropdown, click new data source. Then open the CO2 dataset.

All right, let's make a database that demonstrates the amount of CO2 emissions that come from each country.

To do this, choose the sheet 1 tab in the lower left of the display.

On the far left of the screen is a banner with column names above a grey line. In tableau, these are called the dimensions of the data. Below this line are the different measures that you can track for these dimensions.

To create a chart that displays the CO2 emissions per country, we're going to start by double clicking the country name dimension.

The main display will show a map of the countries on the planet with dots indicating which countries are represented in the data.

The dots are all the same size because with no measure selected. Tableau defaults to scale each country equally.

If you want to scale by CO2 emissions, we'll need to include a specific measure. Double click or drag and drop onto the sheet the measures CO2 kilotons. This will change the size of the dots to be proportional to the amount of CO2 emitted.

Tableau has a wide selection of options for depicting the measures for a given dimension. Most of these options are contained in the middle column between the main display and the columns with dimensions and measures. Now, let's customize the look of our chart to better communicate trends in the data. If we drag and drop a measure on one of the marks such as color, size and label, we can change that aspect of the measures visualization on the chart.

For instance, say we want to change the color of the CO2 measure. We would drag the measure CO2 kilotons to the box with the color label. Then we can select this box to pull up a list of color options. Feel free to pause this video and play around with the different options. Get creative, if you ever want to reverse a change that you make to a tableau sheet, just use the back arrow. There it is. We just created our first chart using tableau.

But what if we wanted to change the dimensions or measures? Instead of visualizing the CO2 per country, maybe we want to chart the CO2 per capita per region. To do this, we could double click on the dimension region and then do the same for the measure CO2 per capita. This builds a new chart.

Let's give it the name global CO2 emissions. Or if we wanted to delete a chart, we could select the clear sheet button in the toolbar. This will wipe out the chart and bring us back to an empty sheet. Don't worry if you do this by accident or change your mind. The back button introduced earlier will bring the chart back. To delete a sheet entirely, right click on the sheets tab at the bottom of the screen and select delete. We won't be able to delete a sheet if it's the only sheet in our file, but be careful. Unlike clearing a sheet, deleting a sheet altogether cannot be undone. Make sure to save your progress by clicking the save icon or hovering over the file tab and selecting save.

Congratulations. Now you're ready to start visualizing your data. This is far from the end of the story though. Soon you will explore even more advanced tools in Tableau.

Hands-On Activity: Working with Tableau (Practice Quiz)

Optional: Using Tableau Desktop (Reading)

Practice Qiuz: getting started with Tableau

Creating visualizations in Tableau

Optimize the color palette in data visualization

Hi there. In this video we'll take a closer look at effective and ineffective data visualizations using Tableau. That's right. Even though this platform can help you create some really beautiful visuals, all of those features and functions can lead to something that's just not very useful too. You might remember the five second rule we spoke about earlier. A sign of a good data visualization is that once you show it to an audience, they should understand what you're trying to convey within five seconds. This means it's clear, effective, and most importantly, convincing. If you keep that rule of thumb in mind before you begin any Tableau Viz, you'll be on the right path to creating good visuals. Let's take a look at an example of a good use of a diverging color palette.

Data visualization allows us to share meaningful stories about data, but we can't do it if it's too hard for the audience to understand the data Viz were sharing. Using color pairings that don't fit your audience's expectations could add another layer of unnecessary complexity. Brace yourself because there's another way to make an ineffective data visualization even worse.

Having an interactive visualization can be useful for both your audience and for you as the analyst. But just like anything else, the more power you have, the more responsibility you have. Lose sight on the qualities of a good viz and you can lose control over the story you want the data to tell. Now that you learned how to use visual enhancements to your advantage. Next up, we'll check out ways you can get even more creative with them. Stay tuned.

Question: A diverging palette displays two ranges of values using color intensity to indicate magnitude. Intensity is a color’s brightness or dullness.

Misleading visualizations

Bonus Guide: Additional insights on selecting the right data visualization (Reading)

Self-Reflection: Selecting visuals and charts (Practice Quiz)

Getting creative

Creating effective visualizations (Ungraded Plugin)

Practice Quiz: creating visualizations in Tableau

Optional: Work with multiple data sources

Linking data in Tableau

Hi and welcome back. In this video we're going to use Tableau to link multiple datasets. This lets analysts compare all datasets in the same visualization, visualize comparisons and combinations of data, and share more complex projects. You can put this video on one side of the screen and follow along in another window. You might notice your screen is slightly different from the video. That's okay. Tableau updates his interface from time to time, but the general steps will stay the same. And feel free to pause this video as you work in your own Tableau workspace before continuing to the next step.

To begin, we're going to need to download the four datasets we'll use for this activity, click the link to create a copy of the data sets and download them. If you don't have a google account, download the data sets directly from the attachments.

Important note This is a companion tutorial. After you follow along with the instructor, you can practice again with the hands-on activity that comes next. (Optional) If you prefer, you may skip this video tutorial and move on to the activity now. Link to activity: Hands-On Activity: Practice linking data in Tableau. To follow along with the instructor in Tableau Public, click the links to the spreadsheet templates below and select "Use Template." Links to datasets: CO2, Energy, Population](https://docs.google.com/spreadsheets/d/1wNQzkMZQGL9I0j7PYW1qdt9UoBYv94Yswn1ry8YBFC8/template/preview), and [GDP]https://docs.google.com/spreadsheets/d/17YOeJcActweV5vJc1JjJIyMcy89Qm5AFIP1X26ymMSM/template/preview#gid=1769006840)

Now imagine this scenario you're working as a data analyst for a policy research institute for your current project. You need to create a visualization that shows the CO2 emissions per capita for each country from 2000-2011. You'll also provide information about each country's population GDP and energy use.

All right, let's get started. First log into Tableau public. If you haven't created an account, refer to the earlier reading, logging into Tableau public. Go to the circle in the upper corner of the window, then choose my profile. From there, select Create a Viz. This will open the Tableau Public interface.

The connect to data window will pop up. From here, you can go to the files tab and upload the CO2 dataset. Now go to the data source tab, then the connections column. From here, choose the plus icon to add another dataset.

First add energy, then add GDP total and total population. Now, we'll have four datasets loaded into Tableau. You can proceed to linking them with joins. Tableau has already added energy into the multiple connections area. We can remove it by dragging it back to the connections column.

Now let's create joins. As a reminder, Inner and outer joins are types of relationships that can be used to combine data based on common columns of information.

To set up our first join will select CO2 under connections. Beneath that in the sheets section, click and drag CO2 data cleaned to the multiple connection section. Then double click the box created by the dataset. This opens the physical table and lets us create joins. To set the first join, select the energy dataset under connections and drag the energy sheet beneath it to the right side of the CO2 data clean box.

A pop up window for a join will appear. It will automatically populate with year from CO2 data cleaned and year one from energy. If not, put year on the left side of the chart and year one on the right side.

Then choose add from join clause under year. Select country name from the drop down on the left side and country on the right side. After that, use the X to close the drop down menu.

We can click those number signs and select date instead to change the data type for each column.

Note:

Now join the other datasets choose GDP total under connections. Then under sheets drag the GDP total sheet into the white space underneath the energy box. The pop up window should already be populated with year one. Under data source and year GDP total under GDP total before adding any additional joins the data type for year GDP total needs to be changed. Will make its data type date just like we did with the other year columns.

However, there are some changes we still need to make. Some of the data types need to be converted. Similar to when you change your year columns to date types. You'll need to change the energy use and current GDP columns. Above the energy used column is an ABC icon. This means is a string type. Select it to open a drop down and change it to number decimal current GDP is also a string type but needs to be a whole number instead. Choose the ABC icon to change it to number whole.

All right now we get to make our visualization. To begin choose the sheet one tab. You'll notice a column on the left side of the screen. Under CO2 data cleaned drag country name to the detail square, drag CO2 per capita to the color square, then choose the square and edit colors.

On the far right side of the screen, choose the arrow to the right of year, select single value. Now the areas will be colored only for the values of each year. Select any year between 2000 and 2011 to view that year's CO2 emissions.

Make sure to save your progress by clicking the save icon or hovering over the file tab and selecting Save. If you are asked to create an extract, return to the data source tab and click create extract, then click save again.

Congratulations, you've linked your data and made a comprehensive data viz in tableau. The more visualizations you make, the more you'll be able to share complex analysis and insights.

Hands-On Activity: Practice linking data in Tableau (Practice Quiz)

Tableau resources for combining multiple data sources (Reading)

Module 2 challenge


Course 6 Module 2 Glossary