Learning Objectives
After completing this unit, you’ll be able to:
- Add tables to the data model.
- Relate tables.
- Inspect data in a viz.
Connect Your Tableau Public Account
To get started, connect to your Tableau Public account in the Playground window to the right. If you don’t already have a Tableau Public account, sign up for one now, and be sure to activate your account before starting this interactive unit. Find more detailed instructions in the first unit if you need it.
Connect the Data
The first thing to do in any new analysis is to connect to data. Sometimes it comes from a published data source created by others. Sometimes it's your own raw data. Here, you have the five tables of data about the Great British Baking Show you downloaded in the last unit.
Each table is its own .csv file. They could just as easily be tabs in a Microsoft Excel or Google Sheets spreadsheet, or tables in a database.
It's time to bring these files into Tableau as a data source. This is done through the Connect to Data dialog.
- Click the New Data Source icon in the toolbar .
- On the Files tab, click Upload from computer.
- Navigate to where you downloaded the data—likely your Downloads folder or Desktop. There are five files. If you haven't downloaded the files yet, you can click here. (Curious about what fields are in each table? Check out the data dictionary on Tableau Public for more details.)
- Choose Episodes, and select Open. It may take a moment to upload.
When the upload is complete, you’re taken to the Data Source tab in Tableau. The left pane shows the tables (as tables, tabs, or sheets) available to you. To the right is the canvas, where you can build the data model. As you can see, the Episodes table is already on the canvas. At the bottom is the Preview pane, which holds the table details pane and data grid.
- Now it’s time to add more data. Click the + icon next to Connections in the left pane. This brings up the same Connect to Data dialog.
- Upload Seasons.
- From the left pane under Files, Drag Seasons.csv to the canvas. Make sure you're bringing the table from the Sheets area of the left pane.
While you hold down the mouse button and drag, an orange line called the noodle appears between Seasons and Episodes. The noodle represents the relationship and it shows where the new table fits in the data model.
- In the Preview pane to the left below the canvas, confirm that the relationship clause is Season = Season (Seasons.csv).
- If you don’t see the relationship clause information in the Preview pane next to the data grid, make sure the noodle is selected in the canvas area. The noodle should be orange.
- If the field name is cut off on your screen, hover over the field name and a tooltip will show the full text.
- If you don’t see the relationship clause information in the Preview pane next to the data grid, make sure the noodle is selected in the canvas area. The noodle should be orange.
- Click the Episodes.csv box in the data model.
- Then click Update Now in the Preview pane to preview the data.
- Hover at the top of the toolbar in the middle of the screen to bring up the sizing handle if you need to resize the bottom pane.
- Hover at the top of the toolbar in the middle of the screen to bring up the sizing handle if you need to resize the bottom pane.