library(readr)
df <- read_csv("cinema_hall_ticket_sales.csv")
## Rows: 1440 Columns: 7
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (5): Ticket_ID, Movie_Genre, Seat_Type, Number_of_Person, Purchase_Again
## dbl (2): Age, Ticket_Price
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
df$Number_of_Person <- ifelse(df$Number_of_Person == "Alone", 1, as.numeric(df$Number_of_Person))
## Warning in ifelse(df$Number_of_Person == "Alone", 1,
## as.numeric(df$Number_of_Person)): NAs introduced by coercion
hist(
  df$Ticket_Price,
  main = "Histogram of Ticket Price",
  xlab = "Price in USD",
  col = "lightblue",
  breaks = 200
)

library(ggplot2)
ggplot(df, aes(x = Movie_Genre)) +
  geom_bar(fill = "cornflowerblue") +
  labs(title = "Tickets Sold by Genre", x = "Genre", y = "Count")