Chart explanation, below code.
pacman::p_load(pacman,tidyverse,gridExtra,zoo)
# Read the data
ebay_data <- read_csv("eBay.csv", col_types = cols(
Year = col_character(),
`Billion USD` = col_double()
))
# Convert Year to a date format for easier plotting
ebay_data <- ebay_data %>%
separate(Year, into = c("Year", "Quarter"), sep = " ") %>%
mutate(Quarter = case_when(
Quarter == "Q1" ~ "01",
Quarter == "Q2" ~ "04",
Quarter == "Q3" ~ "07",
Quarter == "Q4" ~ "10"
),
Date = as.Date(paste(Year, Quarter, "01", sep = "-"))
) %>%
select(Date, `Billion USD`)
# Line chart with a smoothed line
line_plot <- ggplot(ebay_data, aes(x = Date, y = `Billion USD`)) +
geom_line(color = "blue") +
geom_smooth(method = "loess", color = "red") +
labs(title = "eBay Sales Revenue Over Time", x = "Year", y = "Billion USD") +
theme_minimal()
# Bar chart
bar_plot <- ggplot(ebay_data, aes(x = Date, y = `Billion USD`)) +
geom_bar(stat = "identity", fill = "lightblue") +
labs(title = "Quarterly eBay Sales Revenue", x = "Year", y = "Billion USD") +
theme_minimal()
# Boxplot to show distribution by year
box_plot <- ggplot(ebay_data, aes(x = factor(year(Date)), y = `Billion USD`)) +
geom_boxplot(fill = "orange") +
labs(title = "Distribution of eBay Sales Revenue by Year", x = "Year", y = "Billion USD") +
theme_minimal()
# Check for seasonality by aggregating the average sales per quarter
seasonality_data <- ebay_data %>%
mutate(Quarter = quarters(Date)) %>%
group_by(Quarter) %>%
summarise(Average_Sales = mean(`Billion USD`))
# Plot the seasonality data
seasonality_plot <- ggplot(seasonality_data, aes(x = Quarter, y = Average_Sales)) +
geom_bar(stat = "identity", fill = "lightgreen") +
labs(title = "Average eBay Sales by Quarter", x = "Quarter", y = "Average Sales (Billion USD)") +
theme_minimal()
# Combine all plots into a single display
grid.arrange(line_plot, bar_plot, box_plot, seasonality_plot, ncol = 1)
## `geom_smooth()` using formula = 'y ~ x'

eBay Sales Revenue Over Time:
This line graph displays eBay’s quarterly sales revenue from 2013 to
2024. The blue line represents the actual quarterly revenue. It shows a
period of growth until around 2014, followed by a period of relative
stability and a decline. The red line is a trendline, smoothing out the
quarterly fluctuations to emphasise the general trend. Notably, the
trendline suggests a decline during 2013 with a peak around 2018
followed by a slight downward trend. The shaded gray area represents the
range of sales figures, highlighting the variability of quarterly
revenue.
Quarterly eBay Sales Revenue:
This bar chart presents the quarterly sales revenue for each quarter
from 2013 to 2024. The height of each bar signifies the revenue for that
specific quarter. The chart visually reinforces the trends observed in
the line graph. Early years show growth in quarterly revenue, followed
by a period of more stable performance. Fluctuations in bar heights
highlight some seasonality, but there is no consistent pattern of a
particular quarter outperforming others.
Distribution of eBay Sales Revenue by Year:
This boxplot offers a different perspective on eBay’s annual sales
revenue from 2013 to 2023. Each box represents the distribution of
quarterly sales within a year. The line within the box indicates the
median revenue, the box itself illustrates the interquartile range
(middle 50% of the data), and the whiskers extend to the minimum and
maximum values (excluding outliers). The black dots represent outliers,
denoting exceptionally high or low quarterly sales for a specific year.
The chart reveals a relatively stable median revenue over the years,
with some fluctuations but no clear upward or downward trend. The range
of quarterly sales also appears fairly consistent, suggesting that
eBay’s revenue has been relatively stable over time.
Average eBay Sales by Quarter:
This bar chart displays the average sales for each quarter (Q1, Q2,
Q3, Q4) across all years. The bars show that eBay’s sales are fairly
evenly distributed across the quarters, with Q2 and Q4 just edging
ahead.
In Summary:
eBay experienced a period of growth in its early years, followed by
a plateau and a slight decline in more recent years.
There is no single dominant quarter for eBay, with sales relatively
evenly distributed across the year.
The range of quarterly sales has remained fairly consistent over
time, suggesting relative stability in revenue.
While there are fluctuations within each year, the median annual
revenue has remained relatively stable over the analysed period.