Lab 05-A Introduction to Tableau
RE 519 Data Analytics and Visualization | Autumn 2025
In this lab, we are going to use Tableau, a business intelligence and analytics platform that allows users to create interactive visualizations and dashboards to understand data. It provides free access to students. Please try to download Tableau for Students in advance.
The due day for each lab can be found on the course wesbite. The submission should include Rmd, html, and any other files required to rerun the codes. For Tableau, submit your Tableau packaged workbook (.tbwx) This will include any excel files that you attach so that when you share the file anyone with Tableau can open it!
From Lab 4, the use of any generative AI tool (ChatGPT, Copilot, etc.) is allowed. But, I still encourage you to write codes by yourself and use AI tools as a way to debug and explore new knowledge. More information about Academic Integrity and the Use of AI.
Lab 05-A: Introduction to Tableau
In this lab, we will use Seattle Airbnb listing data published by Inside Airbnb. Inside Airbnb is a mission driven project that provides data and advocacy about Airbnb’s impact on residential communities. They published a report on Platform Failures: How Short-Term Rental Platforms like Airbnb fail to cooperate with cities and the need for strong regulations to protect housing which may be interesting to you.
The data we will use was published on 21 June, 2025 and you can explore the data using their visualization tool. Please check the data dictionary below.
Click to view the full data dictionary
- id (integer) — Airbnb’s unique identifier
for the listing.
- name (string) — Name of the listing as
shown on Airbnb.
- host_id (integer) — Unique identifier for
the host.
- host_name (string) — Name of the
host.
- neighbourhood_group (text) — The
neighbourhood group as geocoded using latitude and longitude against
neighborhoods as defined by open or public digital shapefiles.
- neighbourhood (text) - The neighbourhood
as geocoded using latitude and longitude against neighborhoods as
defined by open or public digital shapefiles.
- latitude (numeric) — Uses the World
Geodetic System (WGS84) projection for latitude and longitude.
- longitude (numeric) — Uses the World
Geodetic System (WGS84) projection for latitude and longitude.
- room_type (string) — The type of room
(entire home/apt, private room, shared room, hotel room).
- price (currency) — Daily price in local
currency (may use
$sign regardless of locale).
- minimum_nights (integer) — Minimum number
of nights required to stay for the listing (calendar rules may
differ).
- number_of_reviews (integer) — Total number
of reviews the listing has received.
- last_review (date) — Date of the most
recent review.
- calculated_host_listings_count (integer) —
The number of listings the host has in the current scrape, within the
city/region.
- availability_365 (integer) - Number of
days the listing is available within the next 365 days. May include
blocked or booked days.
- number_of_reviews_ltm (integer) - Number
of reviews received in the last 12 months.
- license (string) — Business license or permit number associated with the listing.
We are going to build an interactive dashboard that visualizes key insights from our dataset. The goal is not only to display information but also to enable users to explore, filter, and compare different variables dynamically. After that, we will publish online through Tableau Public as well as your GitHub page. Also, we will continue working on dashboard in next lab, so do not worry if some functions you want do not show in this lab. The final results will be like this:
The Tableau Workspace
- A. Workbook name. A workbook contains sheets. A sheet can be a worksheet, a dashboard, or a story. For more information, see Workbooks and Sheets.
- B. Cards and shelves - Drag fields to the cards and shelves in the workspace to add data to your view.
- C. Toolbar - Use the toolbar to access commands and analysis and navigation tools.
- D. View - This is the canvas in the workspace where you create a visualization (also referred to as a “viz”).
- E. Click this icon to go to the Start page, where you can connect to data. For more information, see Start Page.
- F. Side Bar - In a worksheet, the side bar area contains the Data pane and the Analytics pane.
- G. Click this tab to go to the Data Source page and view your data. For more information, see the Data Source Page.
- H. Status bar - Displays information about the current view.
- I. Sheet tabs - Tabs represent each sheet in your workbook. This can include worksheets, dashboards, and stories. For more information, see Workbooks and Sheets.
Key Steps
Connect to Data
- In the Connect pane, click the file type (e.g., Text File).
- In the Open dialog box, select your dataset (e.g., listings.csv) and click Open.
- Change the data type in data source page.
- (Optional) Change column labels for readability (this won’t rename your local file).
- Concepts: Dimensions and Measures
- Dimensions contain qualitative values (such as names, dates, or geographical data).
- Measures contain numeric, quantitative values that you can measure.
- You can re-categorize a dimension as a measure or vice versa.
Global Formatting
- Adjust global font, font size, alignment, etc., under Format → Workbook.
Maps
- Drag Latitude → Rows, and Longitude → Columns.
- Customize map background: Map → Map Layers → Style.
- Add Tooltip: drag relevant fields (e.g., Name, Room Type, Price) to Marks → Tooltip.
- Rename the worksheet to Map.
Average Price
- Drag Price → Columns → right-click → Measure → Average.
- Add Mark Labels to show values.
- Hide the X-axis (right-click → Show Header off).
- Formatting numbers to currency in default properties.
- Rename to Average Price.
Number of Room by Type
- Drag Room Type → Rows.
- Drag Name → Columns → Count (right-click → Measure → Count).
- Hide the X-axis and label each bar.
- Rename worksheet and add short descriptive text in text box.
Licenses
- Create a Group for license categories (e.g., Licensed / Unlicensed / Exempt).
- Drag License Categories → Rows and Name → Columns → Count.
- Drag Room Type → Color in the Marks card.
- Customize the color palette.
- Rename worksheet and add notes.
Top Hosts
- Drag Host Name → Rows.
- Drag Host ID → Columns → Count.
- Sort descending by count.
- Add mark labels and rename the worksheet.
Dashboard
- Click New Dashboard (+).
- Set min and max dashboard size.
- Drag your worksheets into the layout.
- Use Text Box to add title, description, and data source citation.
- Apply consistent background color and font.
Interactivity
- Right-click filters (e.g., Neighbourhood Group) → Show Filter.
- Change filter type to dropdown or slider as needed.
- Make filters affect all worksheets (Apply to Worksheets → All Using This Data Source).
- Test interactivity — selecting a neighborhood should update all charts.
Publish
- Save to Tableau Public
- Click File → Save to Tableau Public
- Log in with your Tableau Public account (create one if needed).
- Wait for the upload to finish — Tableau will open your dashboard in the browser.
- Embed to your webpage
- On your Tableau Public page, click Share (top right).
- Copy the Embed Code.
- Paste it into your website’s HTML or Markdown.
- Save as Packaged Workbook (.twbx)
- Go to File → Export Packaged Workbook
- Name your file (e.g., Seattle_Airbnb_Dashboard.twbx).
- Click Save.
Hierarchy
- Drag neighbourhood group and neighbourhood to Rows — order matters (group first, then neighborhood).
- Drag Name to Columns → right-click → Measure → Count.
- Sort descending if needed.
Worksheet, Dashboard, Story
- A worksheet contains a single view along with shelves, cards, legends, and the Data and Analytics panes in its sidebar. For details on the worksheet workspace, see The Tableau Workspace.
- A dashboard is a collection of views from multiple worksheets. The
Dashboard and Layout panes are available in its sidebar. For more
details about creating dashboards, see Dashboards.
- What is changed in the dashboard will affect the worksheet
- A story contains a sequence of worksheets or dashboards that work
together to convey information. The Story and Layout panes are available
in its side bar. For more details about creating stories, see Stories
- What’s changed in the story will not affect the worksheet or dashboard
📚 TODO: Tableau
14 points
Create visualizations, at least 5 worksheets, using 2022 5-year
estimate data from American Community Survey (ACS). The dataset is about
housing affordability in King County, WA. You can download
the data here. The geojson (What is it?) data also include geospatial
column (geometry).You can check the data dictionary below.
If you have a strong interest in using other datasets for this assignment, you are free to do that.
Calculation field. You can build your own variables using existing variables, such as defining a affordability index. This page may be helpful to you.
Arrange these sheets into a dashboard. Make sure that any filters that you apply on your dashboard work on all (relevant) sheets. If you want, play around with creating multiple story points.
Submit your Tableau packaged workbook (.tbwx) This will include any data files that you attach so that when you share the file anyone with Tableau can open it!
Raw ACS Variables Dictionary
| Variable | ACS Code | Description |
|---|---|---|
| med_income | B19013_001 | Median household income (past 12 months) |
| gini | B19083_001 | Gini Index of Income Inequality |
| med_rent | B25064_001 | Median gross rent (monthly) |
| med_home_value | B25077_001 | Median home value (owner-occupied units) |
| total_pop | B01003_001 | Total population |
| poverty_rate | B17001_002 | Individuals below poverty line (numerator) |
| total_poverty | B17001_001 | Total population used for poverty calculation |
| bachelors | B15003_022 | Population with a bachelor’s degree |
| graduate | B15003_023 | Population with a master’s degree or higher |
| total_edu | B15003_001 | Total education population (age ≥25) |
| white | B03002_003 | White alone |
| black | B03002_004 | Black or African American alone |
| asian | B03002_006 | Asian alone |
| hispanic | B03002_012 | Hispanic or Latino (any race) |
| total_race | B03002_001 | Total population by race |
| unemployed | B23025_005 | Unemployed population (age 16+) |
| labor_force | B23025_003 | Civilian labor force (age 16+) |
Derived Indicator Dictionary
| Derived Variable | Formula | Interpretation |
|---|---|---|
| poverty_pct | poverty_rate / total_poverty | Share of population below poverty line |
| college_pct | (bachelors + graduate) / total_edu | Share of population with ≥ bachelor’s degree |
| white_pct | white / total_race | White population share |
| black_pct | black / total_race | Black or African American share |
| asian_pct | asian / total_race | Asian population share |
| hispanic_pct | hispanic / total_race | Hispanic or Latino share |
| unemployment_rate | unemployed / labor_force | Civilian unemployment rate |
Acknowledgement
The materials are developed by Haoyu Yue based materials from Dr. Feiyang Sun at UC San Diego, Siman Ning and Christian Phillips at University of Washington, Dr. Charles Lanfear at University of Cambridge.