library(readxl)
## Warning: package 'readxl' was built under R version 4.5.2
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.5.2
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.5.2
df <- read_excel("Airbnb_DC_25.csv")
room_prices <- df %>%
group_by(room_type) %>%
summarize(avg_price = mean(price, na.rm = TRUE))
room_prices
## # A tibble: 4 × 2
## room_type avg_price
## <chr> <dbl>
## 1 Entire home/apt 181.
## 2 Hotel room 346.
## 3 Private room 103.
## 4 Shared room 1455.
ggplot(room_prices, aes(x = room_type, y = avg_price, fill = room_type)) +
geom_bar(stat = "identity") +
labs(
title = "Average Airbnb Price by Room Type in Washington DC",
x = "Room Type",
y = "Average Price per Night ($)",
caption = "Data Source: Airbnb_DC_25 Dataset"
) +
scale_fill_manual(values = c("blue", "orange", "green", "purple"))

Short Paragraph
- The visualization is a bar chart which shows the average nightly
Airbnb by price by room type in Washington DC. Based on the chart, the
shared rooms have a high mean price about $1455.47 per night, which is
considered higher than the other categories. In comparison, hotel rooms
average about $345.97, but normally entire homes or apartments have a
mean price around about $181.11. Private rooms considerably have the
lowest average price which is around $103.27 per night. There is a
pattern which suggest a variation in prices which has a shared room
category which is an outlier to the rest of the distribution.