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.
Mar 10, 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
218.7K
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

tutorial

Data Visualization with Tableau

In this tutorial, you will learn how to analyze and display data using Tableau and make better, more data-driven decisions.
Parul Pandey's photo

Parul Pandey

31 min

tutorial

Tableau Tutorial for Beginners

Learn to build dynamic dashboards and create compelling stories in Tableau using real-world datasets in this step-by-step tutorial for beginners.
Eugenia Anello's photo

Eugenia Anello

13 min

tutorial

Visualizing Data with Python and Tableau Tutorial

Learn how you can use Python to extend Tableau's data visualization capabilities.
Abid Ali Awan's photo

Abid Ali Awan

15 min

tutorial

Spreadsheets with Tableau

In this tutorial, you will learn how to analyze and display spreadsheet data using Tableau and make more data-driven decisions.
Parul Pandey's photo

Parul Pandey

14 min

tutorial

Creating Stories in Tableau

Find out everything you need to know about creating stories in Tableau with this step-by-step tutorial.
Chloe Lubin's photo

Chloe Lubin

7 min

tutorial

Cluster Analysis in Tableau

Learn how to easily cluster your data in Tableau with its built-in clustering tool.
Parul Pandey's photo

Parul Pandey

10 min

See MoreSee More