Tableau for Beginners (session 1)

Tableau
beginner
Published

September 26, 2024

Warning

This is currently a draft version of the materials for this training session, and so may contain minor errors and inaccuracies.

Session materials
  • dataset for this session .xlsx

No feedback found for this session

Session outline

  • introducing Tableau Public
    • what is it for?
    • how does it work?
  • doing things with Tableau Public
    • loading data
    • manipulating data
    • visualising data

Two words of warning…

  1. This course uses Tableau Public. Most of the skills here are transferable to other versions of Tableau, but you’ll need Tableau Public to follow the examples step-by-step
  2. Licencing and publication can be complicated in Tableau. We don’t discuss that much here, but it’s important to understand the implications if you’re planning to use it in practice. The KIND Network is a good resource for those kinds of questions.

What is Tableau for?

How does it work

  • Tableau Public is (as the name suggests) a version of Tableau designed for public use
  • everything you do in Tableau Public will be visible to the wider internet
Optional caption (warning)
  • Tableau Public is totally unsuitable for any real data projects in health and social care
  • If in doubt, seek expert guidance from Information Governance/Caldicott/Information Security colleagues in your organisation

Session files

Hospital occupancy data

Task
  1. open data/s01_data.xlsx in Excel
  2. have a look at the two sheets
  3. find the names of the tables in the sheets (hint: F5)
  4. close the Excel file

Open Tableau Public

Task
  1. go to https://public.tableau.com/app/
  2. select Web Authoring from the Create menu
    Web Authoring

Loading data

Task
  1. from the Data menu, select New Data Source
    Select `New Data Source
  2. drag and drop (or use the upload button) to add the s01_data.xlsx file

Hospital occupancy data

Task
  1. you should now see the two worksheets from the Excel workbook in the left-hand bar
    Excel worksheets appear in the left-hand bar
  2. drag occupancy_sh into the main pane to extract the data it contains into Tableau
    Drag occupancy_sh into the main pane
    and click Create Extract
  3. finally, click Publish As and give your workbook a suitable name Publish As

Hello world!

  • let’s make a time-series graph from our data
Task
  1. from the left-hand Data menu, drag the Date table into the Columns shelf, and Occupied Beds into the Rows shelf Add Date to Columns, and Occupied Beds to Rows
  2. you’ll see that Tableau has aggregated our data in a slightly unhelpful way
    Unhelpful aggregation into annual totals
  3. you can change the way data is aggregated from the dropdown menu each data item has on its shelf Aggregation controls in the dropdown
  4. change the Date to Exact date to produce a time-series graph Change Date to Exact date

Making our chart more useful

Task
  1. now try dragging the WardName table onto the Colour area of the Marks menu Drag the WardName table onto the Colour area
  2. that should split the data into different series, one per ward Data now shows one series per ward

Changing the data

Task
  1. open data/s01_data.xlsx in Excel (again)
  2. change some of the values
  3. close the file in Excel (essential) and return to Tableau
  4. now Edit Data Source Edit Data Source, then Edit Connection... Edit Connection… and re-upload the file
  5. navigate back to Sheet 1 Navigate back to Sheet 1 and you should see your (ruined) graph See the altered data
  6. finally, go back to Excel, fix your data, and re-upload to fix your graph

Some minor fixes

Task
  • our wards are in an odd order
    Our wards are in an odd order
  • so navigate to the Ward Name table, and select Default Properties >> Sort from the dropdown menu
    Chooise Sort from the dropdown menu where you can then switch them to alphabetical order (or whatever else you like):
    Change to alphabetical ordering
  • give your worksheet a descriptive title (something like “Bed occupancy”) by double-clicking in the tab at the bottom edge of the window
    Add a descriptive worksheet title
  • you should see that the graph title updates to suit
    Graph title follows worksheet title

Calculated Field

  • we can calculate fields, then visualize them
  • we could calculate something simple for each ward - how about the number of non-closed beds available?
Task
  • add a new worksheet
    Add a new worksheet
  • then, from the Data menu, select Create >> Calculated Field... from one of your tables
    Create a calculated field
  • then enter the following formula: [Bed Comp] - ([Occupied Beds] + [Closed Bed])
    Add a formula to your calculated field

Showing off our work

Task
  • select New Dashboard from the tab at the bottom edge of the window Add new dashboard
  • drag your Bed occupancy worksheet onto the dashboard
    Add worksheet to dashboard{height=“300px”)}
  • and click PublishPublish button

Homework tasks

  1. Try using the filters pane to play with your dashboard. How do filters change your visualization?
  2. Can you plot the Available Beds table as a time series on a new worksheet?
  3. Could you find a neat way of visualizing how often a ward becomes overcrowded?