melsyd_economy <- ansett |>
filter(Airports == "MEL-SYD", Class == "Economy") |>
mutate(Passengers = Passengers / 1000) |>
as_tsibble(index = Week)
autoplot(melsyd_economy, Passengers) +
labs(
title = "Ansett Airlines Economy Class",
subtitle = "Weekly Passenger Load (Melbourne-Sydney)",
y = "Passengers ('000)") +
theme_minimal()
a10 <- PBS %>%
filter(ATC2 == "A10") |>
summarise(Cost = sum(Cost)) |>
as_tsibble(index = Month)
autoplot(a10, Cost) +
labs(y = "$ (millions)",
title = "Australian antidiabetic drug sales")
## Observation Observations from the Time Plots Plotting the data allows
us to see important trends and patterns:
MEL-SYD Passenger Volume:
decline in 1989 as a result of a labor dispute.
reduction as a result of a business-class experiment in 1992.
significant declines at the beginning of the year as a result of the holiday.
long-term variations in demand for airlines.
Sales of Antidiabetic Drugs:
strong increase in the sales of drugs.
seasonal trend in which sales decline at the start of the year (impact of government subsidies).
As the amount of sales increases over time, the variation increases.