---
title: "Untitled"
author: "Keith VanderLinden"
date: "2/10/2022"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

```{r warning = FALSE, message = FALSE}
library(tidyverse)
```

```{r warning = FALSE, message = FALSE}
hotels_original <- read_csv("data/hotels.csv")

glimpse(hotels_original)
```

Here's an ill-fated attempt to correlate children with cancellations in the hotel data.

We&rsquo;ve used this pipeline to explore the possibility that cancellations are in some way related to the number of children in the party.

```{r}
hotels %>%
  select(hotel, is_canceled, adults, children, babies) %>%
  mutate(little_ones = children + babies) %>%
  count(little_ones, is_canceled) %>%
  ggplot() +
  aes(x=little_ones, 
      y=n, 
      fill=is_canceled) +
  geom_col(position = "fill") +
  coord_flip() +
  xlim(NA, 3.5) +
  labs(title = "Cancelation Percentage per Child",
       x = "Number of Children",
       y = "Percentage Canceled",
       fill = "Cancelation") +
  scale_fill_discrete(
    labels = c("Not Canceled", "Canceled")
  )
```

Given these results, it doesn&rsquo;t appear that number of children has any effect on the likelihood of a cancellation.
