Skip to main content
HomeTutorialsTableau

Creating Tableau Visualizations Using AirBnB Dataset Tutorial

Learn about different categories of variables in Tableau and how they can be leveraged to analyze data through insightful visualizations.
Updated Mar 2020  · 6 min read

If you would like to learn Tableau, take DataCamp's Introduction to Tableau course.

Connecting to the Dataset

The dataset has been taken from the Airbnb website. We will use the listings.csv file of New York City, NY (2019), which describes the listing activity and its other metrics. All information about hosts, geographical availability, and price has been included to make exciting visualizations.

To connect to your file, go to Connect -> Text file -> Choose file path -> Open

introduction to tableau

A quick glance over the data will look something like this:

learn tableau

What are Measure Names and Measure Values?

As soon as you load the Excel file and open a new worksheet in Tableau, it will automatically categorize all the column headings of your file into one of the below categories (as seen in the Data pane):

  • Dimensions
  • Measures

Notice that Tableau mistakenly classifies Reviews Per Month into Dimensions. Correct this by dragging the field into the Measures pane, as we want to use this field as a continuous numerical variable.

Apart from the column names, the Date pane will always contain a number of fields that do not come from your original data, two of which are Measure Values and Measure Names. Tableau automatically creates these fields so that you can build certain types of views that involve multiple measures. [1]

This article is going to focus on how we can use these multiple measures.

learn tableau

  • The Measure Values field always appears at the bottom of the Measures area in the Data pane and contains all the measures in your data, collected into a single field with continuous values. [2]

  • The Measure Names field always appears at the bottom of the Dimensions area in the Data pane and contains the names of all measures in your data, collected into a single field with discrete values. [3]

[1][2][3] Official Tableau documentation

Tablulating Measure Names and Measure Values

Let's start by first dragging the Measure Names field in the view. Next, drag the Measure Values field directly into the view or under the Text section in the Marks card. You will see a table with variable names against default aggregations applied to the corresponding numerical variables.

You may remove some measures values (which you do not want to be included) by dragging them out of the Measure Values card.

learn tableau

We know that Dimensions are types of categories, and Measures are the numerical values that we want to examine across such categories. So, let's see how we can tabulate multiple dimensions across multiple measures.

We would like to cross-tabulate multiple dimensions with multiple measures. Begin by simply dragging two-dimension fields, say Neighbourhood Group into the Rows tab and Room Type into the Columns tab. You will see a nice 5x3 table containing 5 neighbourhood groups and 3 room types.

learn tableau

Now suppose you want to show both the Price and the Number of Reviews for each Neighbourhood Group and Room Type. First drag Price into the view. Next, when you add Number of Reviews to the text table (by dragging it and dropping it in the view), the measures are combined, and the Measure Values field is added to Marks Text Card. Notice that the Measure Names field is automatically added to the Rows shelf.

It is vital to use Measure Names whenever dealing with more than one measure value.

Aggregate functions

Similar to the aggregate functions (SUM, AVG, MEAN, COUNT) that we have in MySQL, PostgreSQL, etc., Tableau also provides a number of aggregate functions for its Measures. An aggregate function performs a calculation on a set of values and returns a single value.

Here, since we would like to see the average price (and not the total price of all rooms) of each room type in different neighborhoods, we change the (default) aggregate function of Price from SUM() to AVG() using the Measure Values card.

Tabulating Multiple Measure Names and Measure Values

learn tableau

Looks good! But there are too many numbers to comprehend. To get better insights, let's go ahead and make a graphical representation of the same data.

Select the Horizontal Bars graph using the Show Me button on the top right corner of Tableau. You will see a bar for the AVG(PRICE) and SUM(NUMBER OF REVIEWS) for each Neighborhood Group and Room Type.

Make it neater by color-coding the bars according to the Neighborhood Group. Tableau automatically creates and displays a legend for the same. Lastly, swap the rows and columns to make the graph more intuitive and understandable.

The graph now clearly shows the pricing and popularity (number of reviews) trends for every locality and room type.

learn tableau

It is always a good idea to use a geographical map when dealing with places, latitudes and longitudes. Below are the steps on how you can convert your same data into a beautiful geographical visualization.

Visualization using Map

We will again use the Color mark to classify and color each (latitude, longitude) pair into its associated neighborhood group. Similarly, we will use the Size mark to indicate the range of prices of the Airbnb properties. Larger circles denote higher prices, and smaller circles denote lower prices. Both the color and size legends can be found on the right.

learn tableau

Conclusion

In this article, we saw how Tableau automatically segregates your data fields into Dimensions and Measures. In case it misclassifies any column, we can easily drag-and-drop the field to its correct category.

We also cross-tabulated multiple dimensions with multiple measures using different visualizations - Text Table, Bar Graph, and Map.

We explored how we can use the Color and Size options in the Marks card. In addition, we experimented with some aggregate functions like SUM() and AVG() to draw meaningful inferences.

If you would like to learn more about Tableau, take DataCamp's Introduction to Tableau course and check out our Tableau Tutorial for Beginners.

Topics

Tableau Coursess

Course

Introduction to Tableau

6 hr
206K
Start your Tableau journey with our Introduction to Tableau course. Discover Tableau basics such as its features and dashboards.
See DetailsRight Arrow
Start Course
See MoreRight Arrow
Related

6 Tableau Projects to Help Develop Your Skills

Explore our list of Tableau projects for beginner and intermediate learners across different industries and use cases.
Jess Ahmet's photo

Jess Ahmet

6 min

11 Data Visualization Techniques for Every Use-Case with Examples

Discover the most popular analyses, techniques and tools to master the art of data visualization wizard
Javier Canales Luna's photo

Javier Canales Luna

16 min

Tableau Certifications Guide: Certification Levels, Costs & How to Pass

Unlock Tableau certification success! Explore certification levels, costs, and expert strategies to pass. Start your journey to becoming a Tableau pro today.
Adel Nehme's photo

Adel Nehme

15 min

Data Storytelling and Visualization with Lea Pica from Present Beyond Measure

Richie and Lea cover the full picture of data presentation, how to understand your audience, leverage hollywood storytelling and much more.
Richie Cotton's photo

Richie Cotton

71 min

Visualizing Data in Excel

Learn about Excel's various data visualization options that can help you analyze and interpret your data.
Jess Ahmet's photo

Jess Ahmet

12 min

Types of Data Plots and How to Create Them in Python

Explore various types of data plots—from the most common to advanced and unconventional ones—what they show, when to use them, when to avoid them, and how to create and customize them in Python.
Elena Kosourova's photo

Elena Kosourova

21 min

See MoreSee More