Business Intelligence Information Systems · Week 4 · Tableau lab 3 of 5
Where and when?
A 70-minute lab in 7 steps. Two dimensions that every business dataset has and that Tableau treats specially: geography (maps) and time (dates). You will map where the guests come from, follow arrivals and prices over three years, and let Tableau fit a trend and a forecast. Every step ends with a checkpoint; progress is saved in this browser.
1. Start: geography and dates in your data (5 min)
Open Surname_Lab2.twbx (or reconnect to hotel_bookings.csv). Go to the Data Source tab and check two columns:
Country must show a globe icon (geographic role Country/Region). If it shows Abc, click the icon › Geographic Role › Country/Region.
Arrival Date must show a calendar icon (Date). Arrival Year and Arrival Month are plain number and text columns; today we use the real date field, because only a date can be drilled and plotted as a timeline.
WHY IT MATTERSA geographic role lets Tableau generate Latitude and Longitude for each country, so a map is one double-click away. A date type lets Tableau expand Year › Quarter › Month › Day and choose between date parts (all Augusts together) and date values (August 2015, August 2016…).
2. Where do the guests come from? A filled map (12 min)
New worksheet. Double-clickCountry. Tableau puts Longitude on Columns, Latitude on Rows and draws a mark per country.
Change the mark type to Map (or pick the filled map in Show Me). Countries are now coloured shapes.
Booking ID (Count) to Color. Canceled to Filters, keep No.
Portugal is so dark that every other country looks the same. Select Portugal on the map › Exclude. Now Europe becomes readable. This is the “domestic market” decision from Lab 1: state it in the title.
Map › Background Maps: try Light and Dark. Map › Map Layers: switch off layers you do not need (land cover, streets). Less background, more data.
Title: double-click the sheet title and write Guests per country of origin (excl. Portugal, non-cancelled). Rename the sheet Guest origin map.
Checkpoint 1
How many non-cancelled bookings came from Germany?
3. Two measures on a map: revenue and price (10 min)
A filled map carries one measure (colour). A symbol map puts a circle in each country, so size and colour can carry two measures – like the scatter plot of Lab 2, but on geography.
Duplicate Guest origin map, rename the copy Revenue map. Change the mark type to Circle.
Remove the count from Colour. Revenue to Size; ADR (set to Average) to Color, sequential palette.
Keep Canceled = No. Put Portugal back for a moment (remove the exclusion) and look at the circle: it is big (revenue) but pale (low average price). Exclude it again.
Hover the circles of the United Kingdom, France, Spain and Germany: which market brings the most revenue? Which pays the highest average price?
Checkpoint 2
Realised revenue from guests of the United Kingdom?
4. Arrivals over three years: the continuous date (10 min)
New worksheet. Arrival Date to Columns. It appears as YEAR(Arrival Date), blue. Right-click the pill and choose Month from the lower block (“May 2015”). The pill turns green: a continuous timeline.
Booking ID (Count) to Rows; Hotel to Color; Canceled to Filters, keep No. Two lines from July 2015 to August 2017.
Hover the first and the last month of each line. Notice that 2015 starts in July and 2017 ends in August: the data does not cover whole years.
Right-click the date pill again › choose Week (lower block). More detail, more noise. Go back to Month. Granularity is a decision, not a default.
Rename the sheet Arrivals timeline.
Checkpoint 3
In which month did the City Hotel have the most arrivals, and how many? Type the number.
5. Seasonality: the discrete date (8 min)
The timeline answers “how did it evolve?”. To answer “which month is typically busy?” we need the date part: all Mays together, one line per year.
Duplicate Arrivals timeline, rename it Seasonality by year.
Right-click the date pill on Columns › choose Month from the upper block (“May”). The pill turns blue; the axis becomes twelve headers.
Replace Hotel on Colour with Arrival Date: drag Arrival Date onto the Hotel pill on the Marks card, then set it to Year (upper block). One line per year.
Put Hotel on Rows, to the left of the count, so you get one panel per hotel.
Read it: which months repeat as peaks? Where do 2016 and 2017 differ?
Checkpoint 4
Resort Hotel arrivals in May 2017?
6. Price over time: trend line and forecast (12 min)
New worksheet. Continuous Month of Arrival Date on Columns (lower block, green). ADR on Rows, set to Average. Hotel on Color. Canceled = No.
Open the Analytics pane (tab next to Data, top left). Drag Trend Line onto the view › Linear. One trend per hotel.
Hover a trend line: the tooltip shows the equation, R² and the p-value. Which hotel's price rises faster per month?
Drag Forecast from the Analytics pane onto the view. Tableau extends each line by a year, with a shaded prediction band. Right-click the view › Forecast › Forecast Options to see the model (exponential smoothing with seasonality).
Hover the forecast for August 2018 at the Resort Hotel. Compare with August 2016 and 2017 on the real line.
Rename the sheet Price trend and forecast.
Checkpoint 5
Average ADR of the Resort Hotel in August 2017?
Checkpoint 6
Which hotel's average price rises faster according to the linear trend?
7. Dual axis, then before you leave (13 min)
One last chart combines today's two questions: how many arrive, and at what price, per month.
Duplicate Arrivals timeline, rename it Arrivals and price. Remove Hotel from Colour.
Change the mark type to Bar. Then drag ADR (Average) to the right edge of the view until a dashed axis appears, and drop. Tableau creates a dual axis: bars for arrivals, a second mark for price.
On the Marks card there are now two tabs. Set the AVG(ADR) one to Line. Right-click the right axis › Move marks to back if the line hides behind the bars.
Do not synchronise the axes: arrivals (thousands) and price (euro) are different units. Label both axes clearly.
File › Save As › Surname_Lab3.twbx. Export Guest origin map as PNG. Upload both to eClass before you leave.
HOMEWORK (BY NEXT LECTURE, ~15 MIN)
One paragraph in eClass: (1) name the three largest foreign markets by revenue and say which of them pays the highest average price; (2) describe the resort's seasonality in one sentence with numbers (peak month and lowest month, arrivals or price); (3) state one assumption behind the forecast you produced.
Checkpoint 7
How many named sheets does your workbook have now?
Next lecture
Week 5: why, and what if? Calculated fields (cancellation rate, revenue per available room), IF/THEN, parameters and what-if analysis. Bring your .twbx.