Notes: Setting up my R environment by loading the following packages
library("tidyverse")
library("skimr")
library("janitor")
library("dplyr")
library("ggplot2")
setwd("D:/Google DA/Portfolio Building/090123_Practices/Bookings")
hotel_bookings <- read.csv("hotel_bookings.csv")
ggplot(data = hotel_bookings) +
geom_bar(aes(x = distribution_channel, fill=distribution_channel))
The plot shows that TA/TO channel has the most number of bookings
ggplot(data=hotel_bookings) +
geom_point(aes(x= children, y=lead_time), color="lightblue")+
theme_classic()
This plot shows that the group of guests who typically make early bookings do not have children
ggplot(data = hotel_bookings) +
geom_bar(mapping = aes(x = hotel)) +
facet_wrap(~market_segment)
Online segment generates the largest number of bookings, and these bookings are made for city hotels
onlineta_city_hotels <- filter(hotel_bookings,
(hotel=="City Hotel" &
hotel_bookings$market_segment=="Online TA"))
ggplot(data = onlineta_city_hotels) +
geom_point(aes(x = lead_time, y = children), color="lightblue")+
theme_classic()
This scatterplot shows data for online bookings for city hotels
The plot reveals that bookings with children tend to have a shorter lead time, and bookings with 3 children have a significantly shorter lead time (<200 days)
So, promotions targeting families can be made closer to the valid booking dates