Introduction: Titans of the Seas


Welcome Aboard

This interactive storyboard chronicles the remarkable story of ocean liner technology across two centuries.

What We’ll Cover:

The Rise (1800 - 1914)

The Tragedies (1912 - 1915)

The Warfare (1914 - 1945)

The Decline (1945 - 1970)

The Transformation (1970 - 2000)

The Data:

Navigation: Use the arrows or swipe to explore each era. Hover over charts for detailed information.

Let’s begin the journey…


The Dawn: Steam Revolutionizes the Sea (1800-1900)


The Beginning of an Era

The nineteenth century marked the birth of ocean-going steam power and the transformation of maritime engineering.

1820s - 1840s: The First Steamships
- Early transatlantic voyages combined sail and steam.
- Ships averaged under 1,000 tons with wooden hulls.
- Engines were unreliable, and crossings took two to three weeks.

1850s - 1870s: The Iron Revolution
- Iron hulls replaced wood as the construction standard.
- Tonnage increased to between 2,000 and 4,000 tons.
- Improved propulsion reduced travel times to ten to twelve days.

1880s - 1890s: The Steel Era
- Steel construction became the norm for major liners.
- Vessels reached 5,000–8,000 tons with screw propellers replacing paddle wheels.
- Competition for speed and luxury intensified among shipping lines.

Key Innovation
The shift from wood to iron and then to steel transformed ocean liners from experimental vessels into technological marvels. By 1900, the foundation was laid for the “Golden Age” of ocean travel.


The Race for Glory: Speed Becomes Status (1890-1914)


Speed Queens

The Blue Riband emerged as the ultimate symbol of maritime supremacy and technological achievement.

Britain and Germany: A Fierce Rivalry
- The Cunard Line represented British pride with ships such as Lusitania and Mauretania.
- German lines Norddeutscher Lloyd and HAPAG competed for dominance.
- The prize went beyond prestige—it influenced immigration routes, trade contracts, and military readiness.

Speed Milestones
- 1890s: The 20-knot barrier was broken.
- Early 1900s: Speeds reached 25 knots.
- 1907: Lusitania set a new record at over 26 knots, securing Britain’s leadership at sea.

Engineering Breakthroughs
- Introduction of steam turbine engines on Lusitania and Mauretania.
- Adoption of quadruple-screw propulsion systems.
- Streamlined hull designs improved efficiency and stability.
- More powerful boilers enabled sustained high speeds across the Atlantic.

The Cost of Speed
Coal consumption soared as liners burned hundreds of tons daily. Yet in an age defined by empire, migration, and national pride, speed was a matter of identity as much as engineering.

By 1912, ocean liners had become symbols of industrial might. But tragedy loomed…


Tragedy Strikes: The Titanic Disaster (1912)


The “Unsinkable” Ship

RMS Titanic was the largest ship afloat when it struck an iceberg on its maiden voyage, destroying the belief that modern engineering had conquered the sea.

The Disaster
On the night of April 14–15, 1912, Titanic collided with an iceberg in the North Atlantic, about 400 miles south of Newfoundland. The ship, weighing 46,328 tons, sank in just two hours and forty minutes. Out of more than 2,200 passengers and crew, 1,517 people lost their lives, resulting in a mortality rate of approximately 68 percent.

The Class Divide
Survival rates reflected the rigid class structure of the time. Around 63 percent of first-class passengers survived, aided by their proximity to lifeboats and priority access. In second class, 47 percent survived, while in third class only 24 percent lived. Locked gates, distant cabins, and language barriers all contributed to the tragic disparity.

Critical Failures
Several design and procedural flaws contributed to the high death toll. Titanic carried only 20 lifeboats - enough for barely half the people on board. No lifeboat drills were conducted, and multiple ice warnings went unheeded. The crew lacked emergency training, and the “women and children first” policy was applied inconsistently across decks. These failures turned a preventable accident into a catastrophe.

The Legacy
The tragedy led directly to sweeping maritime reforms. The International Convention for the Safety of Life at Sea (SOLAS) was established in 1914, requiring lifeboat capacity for all passengers, 24-hour radio monitoring, and stricter safety inspections. The International Ice Patrol was created to track icebergs in the North Atlantic, and shipbuilding standards were strengthened to improve watertight integrity.

Titanic’s sinking shocked the world. But greater horrors awaited at sea…


Weaponized: U-Boats and the Lusitania (1915)


World-War 1, and the Lusitania Tragedy

On May 7, 1915, RMS Lusitania was torpedoed by the German U-boat U-20 off the Irish coast. The attack sank the ship in just eighteen minutes, killing 1,198 of the 1,959 people on board, including 128 Americans. Though rescue ships were nearby, they arrived too late to save most passengers.

Why It Sank So Quickly
A secondary explosion, likely from ammunition or coal dust, tore through the ship after the torpedo strike. Open portholes and a severe list prevented many lifeboats from being launched. Power failure plunged the lower decks into darkness, trapping hundreds below.

Cruel Fates
Titanic had time but no help - she sank slowly in the middle of the Atlantic, far from rescue. Lusitania had help but no time - she went down within sight of land before any organized evacuation could begin. Survival rates on Lusitania were more even across classes, showing that post-Titanic safety reforms had taken effect.

Global Impact
The sinking provoked outrage, especially in the United States, and “Remember the Lusitania” became a rallying cry that helped draw America into World War I on the side of the Allies. The tragedy ended the notion that civilian ships were safe in wartime and marked the moment when ocean liner technology became a weapon of war.

The age of innocence was over. Seafaring technology had been weaponized…


Underwater Terror: U-Boat Effectiveness in WWI


The U-Boat Menace

German submarines, or U-boats, nearly brought Britain to collapse during World War I by severing vital supply routes across the Atlantic.

The U-Boat Campaign (1914 - 1918)
Between 1914 and 1918, Germany deployed roughly 380 submarines that sank more than 5,000 Allied ships, destroying over 11 million tons of shipping. At the height of the campaign in 1917, Britain faced severe shortages of food and fuel, coming close to starvation.

Tactics and Strategy
Early in the war, U-boats followed “cruiser rules,” surfacing to warn crews and allow evacuation before sinking ships. By 1915, Germany adopted unrestricted submarine warfare, attacking without warning. Coordinated “wolf pack” tactics emerged later, targeting merchant vessels, troop transports, and warships alike.

Why They Were So Effective
The Allies were initially unprepared for underwater warfare. Anti-submarine technology did not exist, and merchant fleets offered easy, undefended targets. Germany’s control of the North Sea and the psychological shock of invisible attacks gave U-boats a major early advantage.

The Allied Response
By 1917, the Allies introduced the convoy system, grouping merchant ships under naval escort, reducing shipping losses by nearly 90 percent. Depth charges, hydrophones, armed decoy ships, and extensive minefields followed, gradually neutralizing the submarine threat.

The Cost of the Campaign
The U-boat war came at a heavy price. Germany lost 178 submarines, while 515 Allied warships were destroyed. Although the blockade failed to force British surrender, it nearly succeeded - and it changed naval warfare forever.

By 1918, counter-measures improved. But the lesson was learned: submarines could decide wars…


WWII: The U-Boat Threat Diminished


Learning from History

During World War II, German U-boats faced a far more prepared enemy. The effectiveness that nearly won Germany the First World War collapsed under the weight of Allied innovation and coordination.

The U-Boat Campaign (1939 - 1945)
Germany deployed around 1,150 submarines during World War II, sinking roughly 3,000 Allied vessels and destroying about 14 million tons of shipping. However, this came at a staggering cost - 783 U-boats were lost, a casualty rate of nearly 68 percent.

Allied Advantages
From the beginning of the war, the Allies implemented the convoy system, denying U-boats easy targets. New Radar and Sonar allowed for early detection of both surfaced and submerged submarines. The breaking of the Enigma code (Ultra intelligence) gave Allied commanders access to U-boat positions in real time. Long-range patrol aircraft and escort carriers closed the “Atlantic Gap”.

German Disadvantages
Germany entered the war with only 57 operational U-boats—far fewer than in 1917. Allied defenses were mature from the outset, and radar exposed submarines long before they could attack. The result was catastrophic loss rates for German crews, nearly four times higher than in World War I.

The Numbers in Perspective
In World War I, U-35 alone sank 226 ships totaling 538,000 tons. In World War II, the most successful submarine, U-48, managed 51 ships totaling 310,000 tons—only about 58 percent as effective. Despite deploying more submarines overall, Germany’s campaign failed.

The Outcome
By 1945, Allied technology and coordination had decisively neutralized the U-boat threat. What had once been the terror of the Atlantic became a costly lesson in how quickly innovation can turn the tide of war.

The war ended. But a new threat to ocean liners emerged, this time from above…


The Final Blow: Rise of the Jet Liner (1950-2000)


The End of an Age

The arrival of jet aircraft dealt the final blow to transatlantic ocean liner travel, ending more than a century of dominance at sea.

The Decline of Ocean Travel
In 1952, the de Havilland Comet became the first commercial jet airliner, and by 1958 the Boeing 707 had made ocean crossings obsolete. The 1969 launch of the Boeing 747, capable of carrying more than 400 passengers, sealed the liners’ fate. Air travel offered six-to-eight-hour crossings compared to five days by ship, with growing affordability and unmatched convenience.

Falling Shipbuilding Rates
The 1950s saw around 15 to 20 new liners built each year, but by the 1960s that number had fallen to fewer than a dozen. During the 1970s, only a handful of new liners were launched annually, and by the 1980s the great transatlantic liners were nearly extinct.

The Numbers Tell the Story
Air passenger numbers exploded worldwide - from 310 million in 1970 to 750 million by 1980, and over 1.6 billion by 2000, a 440 percent increase in just three decades. The sky had decisively replaced the sea as the pathway between continents.

Fate of the Giants
The legendary liners met varied ends. RMS Queen Mary (1936) retired in 1967 and now serves as a museum in Long Beach, California. RMS Queen Elizabeth (1940) was sold in 1968 and burned in 1972. The QE2 (1969), the last great transatlantic liner, was retired in 2008 after decades of service.

Transformation and Legacy
As ocean travel for transport vanished, the industry reinvented itself around leisure. Speed gave way to luxury, and function to entertainment. Cruise ships replaced liners as floating resorts, catering to tourism rather than transit. Only the Queen Mary 2 continues to offer true transatlantic liner service - more homage than necessity.

The golden age of ocean liners ended not with war, but with progress.


Epilogue: From Rough Seas to Calm Bays


From Transportation to Tourism

The legacy of ocean liner technology lives on in today’s cruise ships, which have transformed sea travel from necessity to leisure.

The Transformation
For over a century, ocean liners served a practical purpose—moving people and mail across the globe. Their focus was on speed, reliability, and endurance. Routes linked major ports across the Atlantic and Pacific, and passengers ranged from immigrants seeking new lives to wealthy travelers chasing prestige.

By contrast, modern cruise ships exist purely for recreation. The destination is now the ship itself. Since the 1970s, cruises have focused on entertainment, comfort, and luxury, offering experiences to the Caribbean, Mediterranean, and Alaska.

Size and Scale
Technological evolution has made ships vastly larger and more capable. The SS Great Western (1838) weighed just 1,340 tons. The RMS Queen Mary (1936) was 81,237 tons - around sixty times larger. By 2009, Oasis of the Seas reached 225,282 tons, 168 times the size of the first great steamer.

Modern Marvels
Contemporary cruise ships are feats of engineering and hospitality. They feature theaters, shopping promenades, ice rinks, climbing walls, and water parks. Crews of over 2,000 serve more than 6,000 passengers on some ships. These vessels are safer, cleaner, and more stable than any ocean liner in history, powered by advanced navigation and environmental systems.

What Endures
Despite the shift in purpose, much of the ocean liner spirit survives. The same engineering precision, safety innovations inspired by the Titanic, and traditions of luxury service remain central to the cruise experience. The romance of ocean travel endures - just in a new form.

The technology evolved. The purpose changed. But the dream of crossing oceans in style never died - it just transformed.


References & Data Sources


Data Sources and References

Note: Ocean liner tonnage data were web-scraped from the Wikipedia pages individually and compiled into a custom dataset for visualization purposes.


---
title: "Titans of the Sea"
subtitle: "The Rise, Tragedy, and Twilight of Ocean Liner Technology"
author: "Mihir Katkar - S4146079"
date: "`r format(Sys.Date(), '%B %d, %Y')`"
output:
  flexdashboard::flex_dashboard:
    storyboard: true
    theme: cosmo
    social: menu
    source_code: embed
---

```{r setup, include=FALSE}
library(flexdashboard)
library(ggplot2)
library(plotly)
library(dplyr)
library(tidyr)
library(scales)
library(stringr)

ocean_blue <- "#2E86AB"
danger_red <- "#E63946"
warning_orange <- "#F77F00"
success_green <- "#06A77D"
dark_text <- "#1A1A1A"
luxury_gold <- "#DAA520"

liners <- read.csv("ocean_liners_tonnage_trimmed_2.csv", stringsAsFactors = FALSE)
titanic <- read.csv("Titanic-Dataset.csv", stringsAsFactors = FALSE)
lusitania <- read.csv("LusitaniaManifest.csv", stringsAsFactors = FALSE)
uboat_ww1 <- read.csv("uboat_stats_ww1.csv", stringsAsFactors = FALSE)
uboat_ww2 <- read.csv("uboat_stats_ww2.csv", stringsAsFactors = FALSE)
br_east <- read.csv("BR_Eastbound.csv", stringsAsFactors = FALSE)
br_west <- read.csv("BR_Westbound.csv", stringsAsFactors = FALSE)
air_data <- read.csv("Air data.csv", stringsAsFactors = FALSE, skip = 4)

liners$Year <- as.numeric(liners$Year)
liners$Tonnage <- as.numeric(gsub(",", "", liners$Tonnage))
liners <- liners %>% filter(!is.na(Year) & !is.na(Tonnage) & Year >= 1800 & Year <= 2000)

liners_summary <- liners %>%
  group_by(Year) %>%
  summarise(
    Avg_Tonnage = mean(Tonnage, na.rm = TRUE),
    Ships_Built = n(),
    Total_Tonnage = sum(Tonnage, na.rm = TRUE),
    Max_Tonnage = max(Tonnage, na.rm = TRUE)
  ) %>%
  ungroup()

br_east$Year <- as.numeric(br_east$Year)
br_west$Year <- as.numeric(br_west$Year)
```

### Introduction: Titans of the Seas {data-commentary-width=400}


```{r intro}
timeline_overview <- data.frame(
  Era = c("Steam Era\n(1800-1900)", "Golden Age\n(1900-1945)", 
          "Warfare\n(1914-1945)", "Jet Age Decline\n(1945-1970)", 
          "Cruise Era\n(1970-2000)"),
  Start = c(1800, 1900, 1914, 1945, 1970),
  End = c(1900, 1945, 1945, 1970, 2000),
  Importance = c(3, 5, 4, 2, 3),
  Color = c("#95A5A6", "#DAA520", "#E63946", "#2E86AB", "#06A77D"),
  Y_Position = c(1, 2, 1.5, 1.25, 1)
)

p_intro <- ggplot(timeline_overview, aes(xmin = Start, xmax = End, 
                                          ymin = Y_Position - 0.3, 
                                          ymax = Y_Position + 0.3, 
                                          fill = Color)) +
  geom_rect(alpha = 0.8, color = "white", linewidth = 2) +
  
  geom_text(aes(x = (Start + End)/2, y = Y_Position, label = Era),
            size = 3.5, fontface = "bold", color = "white", lineheight = 0.9) +
  
  geom_segment(aes(x = 1800, xend = 2000, y = 0.3, yend = 0.3),
               color = "gray30", linewidth = 1, arrow = arrow(length = unit(0.3, "cm"))) +
  
  geom_point(data = data.frame(x = seq(1800, 2000, 20), y = 0.3),
             aes(x = x, y = y), inherit.aes = FALSE,
             size = 3, color = "gray30") +
  
  scale_fill_identity() +
  scale_x_continuous(breaks = seq(1800, 2000, 20), limits = c(1790, 2010)) +
  scale_y_continuous(limits = c(0, 2.5)) +
  
  labs(
    title = "Titans of the Sea: A Journey Through Time",
    subtitle = "From wooden paddle steamers to steel giants to floating cities",
    x = "Year",
    caption = "This storyboard explores technology, tragedy, warfare, and transformation across 200 years"
  ) +
  
  theme_minimal(base_size = 14) +
  theme(
    plot.title = element_text(face = "bold", size = 18, color = dark_text, hjust = 0.5),
    plot.subtitle = element_text(size = 12, hjust = 0.5, margin = margin(b = 15)),
    plot.caption = element_text(size = 10, color = "gray40", face = "italic", hjust = 0.5),
    axis.title.y = element_blank(),
    axis.text.y = element_blank(),
    axis.ticks.y = element_blank(),
    panel.grid = element_blank()
  )

ggplotly(p_intro) %>%
  layout(
    showlegend = FALSE,
    margin = list(l = 50, r = 50, b = 80, t = 120)
  ) %>%
  config(displaylogo = FALSE)
```

***

**Welcome Aboard**

This interactive storyboard chronicles the remarkable story of ocean liner technology across two centuries.

**What We'll Cover:**

**The Rise (1800 - 1914)**

- Steam power replaces sail and revolutionizes ocean travel.  
- Competition for speed and luxury drives innovation.  
- The “Blue Riband” symbolizes Atlantic dominance.


**The Tragedies (1912 - 1915)**

- The Titanic exposes class inequality and safety failures.  
- The Lusitania shows how civilian ships become wartime targets.  
- These disasters lead to global maritime safety reforms.

**The Warfare (1914 - 1945)**

- U-boats threaten Allied trade in both world wars.  
- Sonar, radar, and convoy tactics emerge in response.  
- Submarine warfare transforms naval strategy.


**The Decline (1945 - 1970)**

- Jet aircraft replace ocean liners as the main mode of travel.  
- Passenger shipbuilding collapses as aviation rises.

**The Transformation (1970 - 2000)**

- Cruise ships inherit liner technology for leisure and tourism.  
- Modern mega-ships grow larger and more advanced than ever.

**The Data:**

- Seven datasets cover 200 years of maritime history.  
- Interactive visuals connect key events with measurable change.

**Navigation:** Use the arrows or swipe to explore each era. Hover over charts for detailed information.

*Let's begin the journey...*

---


### The Dawn: Steam Revolutionizes the Sea (1800-1900) {data-commentary-width=400}

```{r slide2}
early_era <- liners_summary %>% filter(Year >= 1800, Year <= 1900)

p1 <- ggplot() +
  annotate("rect", xmin = 1800, xmax = 1850, ymin = 0, ymax = Inf, 
           fill = "#ECF0F1", alpha = 0.3) +
  annotate("rect", xmin = 1850, xmax = 1900, ymin = 0, ymax = Inf, 
           fill = "#E8F6F3", alpha = 0.3) +
  
  annotate("text", x = 1825, y = 11000, label = "Paddle\nSteamers", 
           size = 3.5, color = "#7F8C8D", fontface = "italic", lineheight = 0.9) +
  annotate("text", x = 1875, y = 11000, label = "Iron & Steel\nRevolution", 
           size = 3.5, color = "#7F8C8D", fontface = "italic", lineheight = 0.9) +
  
  geom_area(data = early_era, aes(x = Year, y = Avg_Tonnage), 
            fill = ocean_blue, alpha = 0.15) +
  geom_line(data = early_era, aes(x = Year, y = Avg_Tonnage),
            color = ocean_blue, linewidth = 2) +
  geom_point(data = early_era,
             aes(x = Year, y = Avg_Tonnage, size = Ships_Built,
                 text = paste0("<b>", Year, "</b><br>",
                               "Average tonnage: ", format(round(Avg_Tonnage), big.mark = ","), " tons<br>",
                               "Ships built: ", Ships_Built, "<br>",
                               "Largest ship: ", format(round(Max_Tonnage), big.mark = ","), " tons")),
             color = "#2C3E50", alpha = 0.6) +
  
  scale_size_continuous(range = c(2, 10), name = "Ships Built") +
  scale_y_continuous(labels = comma, limits = c(0, 12000)) +
  scale_x_continuous(breaks = seq(1800, 1900, 10)) +
  
  labs(
    title = "The Steam Revolution: From Wood to Iron to Steel",
    subtitle = "Average ocean liner tonnage gradually increases as technology matures",
    x = "Year",
    y = "Average Tonnage (GRT)"
  ) +
  
  theme_minimal(base_size = 13) +
  theme(
    plot.title = element_text(face = "bold", size = 16, color = dark_text),
    plot.subtitle = element_text(size = 11, color = "#4A4A4A", margin = margin(b = 10)),
    axis.title = element_text(face = "bold", size = 11),
    panel.grid.minor = element_blank(),
    legend.position = "right"
  )

ggplotly(p1, tooltip = "text") %>%
  layout(
    hoverlabel = list(bgcolor = "white", font = list(size = 11)),
    margin = list(l = 65, r = 80, b = 60, t = 100)
  ) %>%
  config(displaylogo = FALSE, modeBarButtonsToRemove = c("lasso2d", "select2d"))
```

***

**The Beginning of an Era**

The nineteenth century marked the birth of ocean-going steam power and the transformation of maritime engineering.

**1820s - 1840s: The First Steamships**  
- Early transatlantic voyages combined sail and steam.  
- Ships averaged under 1,000 tons with wooden hulls.  
- Engines were unreliable, and crossings took two to three weeks.

**1850s - 1870s: The Iron Revolution**  
- Iron hulls replaced wood as the construction standard.  
- Tonnage increased to between 2,000 and 4,000 tons.  
- Improved propulsion reduced travel times to ten to twelve days.

**1880s - 1890s: The Steel Era**  
- Steel construction became the norm for major liners.  
- Vessels reached 5,000–8,000 tons with screw propellers replacing paddle wheels.  
- Competition for speed and luxury intensified among shipping lines.

**Key Innovation**  
The shift from wood to iron and then to steel transformed ocean liners from experimental vessels into technological marvels. By 1900, the foundation was laid for the “Golden Age” of ocean travel.

---

### The Race for Glory: Speed Becomes Status (1890-1914) {data-commentary-width=400}

```{r slide3}
br_combined <- bind_rows(
  br_east %>% mutate(Direction = "Eastbound") %>% select(Year, Ship, Speed, Direction),
  br_west %>% mutate(Direction = "Westbound") %>% select(Year, Ship, Speed, Direction)
) %>%
  filter(Year >= 1890 & Year <= 1914) %>%
  arrange(Year)

p2 <- ggplot(br_combined, aes(x = Year, y = Speed, color = Direction)) +
  geom_line(linewidth = 1.5, alpha = 0.7) +
  geom_point(aes(text = paste0("<b>", Ship, "</b><br>",
                                "Year: ", Year, "<br>",
                                "Speed: ", Speed, " knots<br>",
                                "Direction: ", Direction)),
             size = 3.5, alpha = 0.8) +
  
  geom_hline(yintercept = 20, linetype = "dashed", color = "gray60", alpha = 0.5) +
  geom_hline(yintercept = 25, linetype = "dashed", color = "gray60", alpha = 0.5) +
  
  annotate("text", x = 1892, y = 20.5, label = "20 knots", 
           size = 3, color = "gray40", fontface = "italic") +
  annotate("text", x = 1892, y = 25.5, label = "25 knots", 
           size = 3, color = "gray40", fontface = "italic") +
  
  scale_color_manual(values = c("Eastbound" = "#2E86AB", "Westbound" = "#E63946"),
                     name = "Atlantic Crossing") +
  scale_y_continuous(breaks = seq(18, 28, 2), limits = c(18, 28)) +
  scale_x_continuous(breaks = seq(1890, 1914, 2)) +
  
  labs(
    title = "The Blue Riband: Racing Across the Atlantic",
    subtitle = "National pride drives competition for the fastest Atlantic crossing",
    x = "Year",
    y = "Speed (knots)",
    caption = "Blue Riband: Unofficial award for fastest transatlantic passenger ship"
  ) +
  
  theme_minimal(base_size = 13) +
  theme(
    plot.title = element_text(face = "bold", size = 16, color = dark_text),
    plot.subtitle = element_text(size = 11, margin = margin(b = 8)),
    plot.caption = element_text(size = 9, color = "gray40", face = "italic"),
    axis.title = element_text(face = "bold", size = 11),
    legend.position = "top",
    panel.grid.minor = element_blank()
  )

ggplotly(p2, tooltip = "text") %>%
  layout(
    showlegend = TRUE,
    margin = list(l = 65, r = 50, b = 80, t = 100)
  ) %>%
  config(displaylogo = FALSE)
```

***

**Speed Queens**

The Blue Riband emerged as the ultimate symbol of maritime supremacy and technological achievement.

**Britain and Germany: A Fierce Rivalry**  
- The Cunard Line represented British pride with ships such as *Lusitania* and *Mauretania*.  
- German lines Norddeutscher Lloyd and HAPAG competed for dominance.  
- The prize went beyond prestige—it influenced immigration routes, trade contracts, and military readiness.

**Speed Milestones**  
- 1890s: The 20-knot barrier was broken.  
- Early 1900s: Speeds reached 25 knots.  
- 1907: *Lusitania* set a new record at over 26 knots, securing Britain’s leadership at sea.

**Engineering Breakthroughs**  
- Introduction of steam turbine engines on *Lusitania* and *Mauretania*.  
- Adoption of quadruple-screw propulsion systems.  
- Streamlined hull designs improved efficiency and stability.  
- More powerful boilers enabled sustained high speeds across the Atlantic.

**The Cost of Speed**  
Coal consumption soared as liners burned hundreds of tons daily. Yet in an age defined by empire, migration, and national pride, speed was a matter of identity as much as engineering.

*By 1912, ocean liners had become symbols of industrial might. But tragedy loomed...*

---

### Tragedy Strikes: The Titanic Disaster (1912) {data-commentary-width=400}

```{r slide4}
titanic_summary <- titanic %>%
  filter(!is.na(Pclass) & !is.na(Survived)) %>%
  group_by(Pclass) %>%
  summarise(
    Total = n(),
    Survived = sum(Survived),
    Died = Total - Survived,
    Survival_Rate = Survived / Total * 100
  ) %>%
  mutate(Class = case_when(
    Pclass == 1 ~ "First Class",
    Pclass == 2 ~ "Second Class",
    Pclass == 3 ~ "Third Class"
  ))

titanic_long <- titanic_summary %>%
  select(Class, Survived, Died) %>%
  pivot_longer(cols = c(Survived, Died), names_to = "Outcome", values_to = "Count")

p3 <- ggplot(titanic_long, aes(x = Class, y = Count, fill = Outcome)) +
  geom_col(position = "stack", width = 0.7, alpha = 0.9) +
  
  geom_text(data = titanic_summary,
            aes(x = Class, y = Total + 20, label = paste0(round(Survival_Rate, 1), "%\nsurvived"),
                fill = NULL),
            size = 3, fontface = "bold", color = dark_text, lineheight = 1) +
  
  geom_text(data = titanic_summary,
            aes(x = Class, y = -15, label = paste0("n=", Total),
                fill = NULL),
            size = 3.5, color = "gray40") +  
  
  scale_fill_manual(
    values = c("Survived" = "#06A77D", "Died" = "#E63946"), 
    name = "Outcome",
    labels = c("Died", "Survived")
  ) +
  
  scale_y_continuous(expand = expansion(mult = c(0.05, 0.1))) +
  
  labs(
    title = "Titanic: Class Determined Survival",
    subtitle = "Stark inequality in the 'unsinkable' ship's final hours — April 15, 1912",
    x = NULL,
    y = "Number of Passengers",
    caption = "Data: Titanic passenger manifest | First class passengers had 3x better survival odds than third class"
  ) +
  
  theme_minimal(base_size = 13) +
  theme(
    plot.title = element_text(face = "bold", size = 16, color = dark_text),
    plot.subtitle = element_text(size = 11, margin = margin(b = 10)),
    plot.caption = element_text(size = 9, color = "gray40", face = "italic", hjust = 0, margin = margin(t = 10)),  
    axis.title = element_text(face = "bold", size = 11),
    axis.text.x = element_text(size = 12, face = "bold"),
    legend.position = "top",
    panel.grid.major.x = element_blank(),
    panel.grid.minor = element_blank()
  )

ggplotly(p3) %>%
  layout(
    showlegend = TRUE,  
    margin = list(l = 65, r = 50, b = 90, t = 100)
  ) %>%
  config(displaylogo = FALSE)
```

***

**The "Unsinkable" Ship**

RMS *Titanic* was the largest ship afloat when it struck an iceberg on its maiden voyage, destroying the belief that modern engineering had conquered the sea. 

**The Disaster**  
On the night of April 14–15, 1912, Titanic collided with an iceberg in the North Atlantic, about 400 miles south of Newfoundland. The ship, weighing 46,328 tons, sank in just two hours and forty minutes. Out of more than 2,200 passengers and crew, 1,517 people lost their lives, resulting in a mortality rate of approximately 68 percent.

**The Class Divide**  
Survival rates reflected the rigid class structure of the time. Around 63 percent of first-class passengers survived, aided by their proximity to lifeboats and priority access. In second class, 47 percent survived, while in third class only 24 percent lived. Locked gates, distant cabins, and language barriers all contributed to the tragic disparity.

**Critical Failures**  
Several design and procedural flaws contributed to the high death toll. Titanic carried only 20 lifeboats - enough for barely half the people on board. No lifeboat drills were conducted, and multiple ice warnings went unheeded. The crew lacked emergency training, and the “women and children first” policy was applied inconsistently across decks. These failures turned a preventable accident into a catastrophe.

**The Legacy**  
The tragedy led directly to sweeping maritime reforms. The International Convention for the Safety of Life at Sea (SOLAS) was established in 1914, requiring lifeboat capacity for all passengers, 24-hour radio monitoring, and stricter safety inspections. The International Ice Patrol was created to track icebergs in the North Atlantic, and shipbuilding standards were strengthened to improve watertight integrity.


*Titanic's sinking shocked the world. But greater horrors awaited at sea...*

---

### Weaponized: U-Boats and the Lusitania (1915) {data-commentary-width=400}

```{r slide5}
titanic_class <- titanic %>%
  filter(!is.na(Pclass) & !is.na(Survived)) %>%
  group_by(Pclass) %>%
  summarise(
    Total = n(),
    Survived = sum(Survived == 1),
    Died = sum(Survived == 0),
    Survival_Rate = (Survived / Total) * 100
  ) %>%
  mutate(
    Ship = "RMS Titanic",
    Class = case_when(
      Pclass == 1 ~ "First Class",
      Pclass == 2 ~ "Second Class",
      Pclass == 3 ~ "Third Class"
    )
  )

lusitania_class <- lusitania %>%
  filter(!is.na(Class) & !is.na(Fate)) %>%
  group_by(Class) %>%
  summarise(
    Total = n(),
    Survived = sum(Fate == "Saved"),
    Died = sum(Fate == "Lost"),
    Survival_Rate = (Survived / Total) * 100
  ) %>%
  mutate(Ship = "RMS Lusitania") %>%
  mutate(Class = case_when(
    Class == "Saloon" ~ "First Class",
    Class == "Second" ~ "Second Class",
    Class == "Third" ~ "Third Class",
    TRUE ~ NA_character_
  )) %>%
  filter(!is.na(Class))

both_disasters <- bind_rows(titanic_class, lusitania_class) %>%
  select(Ship, Class, Total, Survived, Died, Survival_Rate)

p4_class <- ggplot(both_disasters, aes(x = Class, y = Survival_Rate, fill = Ship)) +
  geom_col(position = "dodge", width = 0.7, alpha = 0.9) +
  
  geom_text(aes(label = paste0(round(Survival_Rate, 1), "%")),
            position = position_dodge(width = 0.7),
            vjust = 0.3, size = 4, fontface = "bold", color = "gray20") +
  
  geom_text(aes(y = Survival_Rate - 5, label = paste0("n=", Total)),
            position = position_dodge(width = 0.7),
            size = 3.5, color = "white", fontface = "bold") +
  
  scale_fill_manual(
    values = c("RMS Titanic" = "#E63946", "RMS Lusitania" = "#2E86AB"),
    name = NULL
  ) +
  
  scale_y_continuous(
    limits = c(0, 75),
    breaks = seq(0, 75, 15),
    labels = function(x) paste0(x, "%"),
    expand = expansion(mult = c(0, 0.1))
  ) +
  
  labs(
    title = "Survival Rate by Class in Two Maritime Disasters",
    subtitle = "Survival rates by passenger class — wealth determined fate in both tragedies",
    x = NULL,
    y = "Survival Rate",
    caption = "Both disasters show clear class-based survival disparities, though Lusitania's rapid sinking (18 min) left less time for evacuation"
  ) +
  
  theme_minimal(base_size = 13) +
  theme(
    plot.title = element_text(face = "bold", size = 16, color = dark_text),
    plot.subtitle = element_text(size = 11, margin = margin(b = 10)),
    plot.caption = element_text(size = 9, color = "gray40", face = "italic", 
                                hjust = 0, margin = margin(t = 10)),
    axis.title = element_text(face = "bold", size = 11),
    axis.text.x = element_text(size = 12, face = "bold"),
    legend.position = "top",
    panel.grid.major.x = element_blank(),
    panel.grid.minor = element_blank()
  )

ggplotly(p4_class) %>%
  layout(
    showlegend = TRUE,
    margin = list(l = 65, r = 50, b = 100, t = 100)
  ) %>%
  config(displaylogo = FALSE)
```

***

**World-War 1, and the Lusitania Tragedy**


On May 7, 1915, RMS *Lusitania* was torpedoed by the German U-boat U-20 off the Irish coast. The attack sank the ship in just eighteen minutes, killing 1,198 of the 1,959 people on board, including 128 Americans. Though rescue ships were nearby, they arrived too late to save most passengers.

**Why It Sank So Quickly**  
A secondary explosion, likely from ammunition or coal dust, tore through the ship after the torpedo strike. Open portholes and a severe list prevented many lifeboats from being launched. Power failure plunged the lower decks into darkness, trapping hundreds below.

**Cruel Fates**  
*Titanic* had time but no help - she sank slowly in the middle of the Atlantic, far from rescue. *Lusitania* had help but no time - she went down within sight of land before any organized evacuation could begin. Survival rates on *Lusitania* were more even across classes, showing that post-*Titanic* safety reforms had taken effect.

**Global Impact**  
The sinking provoked outrage, especially in the United States, and “Remember the Lusitania” became a rallying cry that helped draw America into World War I on the side of the Allies. The tragedy ended the notion that civilian ships were safe in wartime and marked the moment when ocean liner technology became a weapon of war.


*The age of innocence was over. Seafaring technology had been weaponized...*

---

### Underwater Terror: U-Boat Effectiveness in WWI {data-commentary-width=400}

```{r slide6}
top_uboats_ww1 <- uboat_ww1 %>%
  arrange(desc(Tonnage_Sunk)) %>%
  head(15) %>%
  mutate(U_Boat = factor(U_Boat, levels = rev(U_Boat)))

p5 <- ggplot(top_uboats_ww1, aes(x = Tonnage_Sunk/1000, y = U_Boat)) +
  geom_col(fill = danger_red, alpha = 0.8, width = 0.7) +
  
  geom_text(aes(label = paste0(format(round(Tonnage_Sunk/1000), big.mark = ","), "k")),
            hjust = -0.05, size = 3.5, fontface = "bold", color = "gray20") +
  
  geom_text(aes(x = Tonnage_Sunk/1000 - 45, label = paste0(Ships_Sunk, " ships")),
            hjust = 0, size = 3, color = "white", fontface = "bold") +
  
  geom_col(data = top_uboats_ww1 %>% filter(U_Boat == "U-20"),
           fill = warning_orange, alpha = 0.95, width = 0.7) +
  
  annotate("segment", x = 205, xend = 345, y = "U-20", yend = 7, 
           color = warning_orange, linewidth = 1, arrow = arrow(length = unit(0.3, "cm"))) +
  annotate("text", x = 405, y = 7, label = "Sank Lusitania", 
           size = 3.5, color = warning_orange, fontface = "bold", vjust = 0) +
  
  scale_x_continuous(
    labels = function(x) paste0(x, "k"),
    expand = expansion(mult = c(0, 0.15))
  ) +
  
  labs(
    title = "WWI: U-Boats Wreak Havoc on Allied Shipping",
    subtitle = "Top 15 most destructive submarines — unrestricted warfare devastates merchant fleets",
    x = "Tonnage Sunk (thousands of tons)",
    y = NULL,
    caption = "U-35 alone sank 226 ships totaling 538,500 tons | U-20 (orange) sank Lusitania among 37 ships"
  ) +
  
  theme_minimal(base_size = 13) +
  theme(
    plot.title = element_text(face = "bold", size = 16, color = dark_text),
    plot.subtitle = element_text(size = 11, margin = margin(b = 10)),
    plot.caption = element_text(size = 9, color = "gray40", face = "italic", 
                                hjust = 0, margin = margin(t = 10)),
    axis.title.x = element_text(face = "bold", size = 11, margin = margin(t = 10)),
    axis.text.y = element_text(size = 11, face = "bold"),
    panel.grid.major.y = element_blank(),
    panel.grid.minor = element_blank()
  )

ggplotly(p5) %>%
  layout(margin = list(l = 80, r = 80, b = 90, t = 100)) %>%
  config(displaylogo = FALSE)
```

***

**The U-Boat Menace**

German submarines, or U-boats, nearly brought Britain to collapse during World War I by severing vital supply routes across the Atlantic.

**The U-Boat Campaign (1914 - 1918)**  
Between 1914 and 1918, Germany deployed roughly 380 submarines that sank more than 5,000 Allied ships, destroying over 11 million tons of shipping. At the height of the campaign in 1917, Britain faced severe shortages of food and fuel, coming close to starvation.

**Tactics and Strategy**  
Early in the war, U-boats followed “cruiser rules,” surfacing to warn crews and allow evacuation before sinking ships. By 1915, Germany adopted unrestricted submarine warfare, attacking without warning. Coordinated “wolf pack” tactics emerged later, targeting merchant vessels, troop transports, and warships alike.

**Why They Were So Effective**  
The Allies were initially unprepared for underwater warfare. Anti-submarine technology did not exist, and merchant fleets offered easy, undefended targets. Germany’s control of the North Sea and the psychological shock of invisible attacks gave U-boats a major early advantage.

**The Allied Response**  
By 1917, the Allies introduced the convoy system, grouping merchant ships under naval escort, reducing shipping losses by nearly 90 percent. Depth charges, hydrophones, armed decoy ships, and extensive minefields followed, gradually neutralizing the submarine threat.

**The Cost of the Campaign**  
The U-boat war came at a heavy price. Germany lost 178 submarines, while 515 Allied warships were destroyed. Although the blockade failed to force British surrender, it nearly succeeded - and it changed naval warfare forever.


*By 1918, counter-measures improved. But the lesson was learned: submarines could decide wars...*

---

### WWII: The U-Boat Threat Diminished {data-commentary-width=400}

```{r slide7}
ww1_comparison <- uboat_ww1 %>%
  arrange(desc(Tonnage_Sunk)) %>%
  head(10) %>%
  mutate(War = "WWI", Rank = row_number())

ww2_comparison <- uboat_ww2 %>%
  arrange(desc(Tonnage_Sunk)) %>%
  head(10) %>%
  mutate(War = "WWII", Rank = row_number())

uboat_comparison <- bind_rows(ww1_comparison, ww2_comparison)

p6 <- ggplot(uboat_comparison, aes(x = Rank, y = Tonnage_Sunk/1000, color = War, group = War)) +
  geom_line(linewidth = 2, alpha = 0.8) +
  geom_point(aes(text = paste0("<b>", U_Boat, "</b><br>",
                                "War: ", War, "<br>",
                                "Rank: #", Rank, "<br>",
                                "Tonnage sunk: ", format(round(Tonnage_Sunk), big.mark = ","), " tons<br>",
                                "Ships sunk: ", Ships_Sunk)),
             size = 4, alpha = 0.9) +
  
  annotate("text", x = 4, y = 450, 
           label = "WWI U-boats were\nFAR more effective", 
           size = 4.5, color = danger_red, fontface = "bold", lineheight = 0.9) +
  
  annotate("text", x = 4, y = 150, 
           label = "Better Allied defenses\nin WWII limited damage", 
           size = 4, color = ocean_blue, fontface = "bold.italic", lineheight = 0.9) +
  
  scale_color_manual(
    values = c("WWI" = danger_red, "WWII" = ocean_blue),
    name = "Conflict"
  ) +
  scale_y_continuous(labels = function(x) paste0(x, "k")) +
  scale_x_continuous(breaks = 1:10) +
  
  labs(
    title = "Diminishing Returns: U-Boat Effectiveness Across Two World Wars",
    subtitle = "Top 10 submarines compared — Allied counter-measures dramatically reduced WWII U-boat impact",
    x = "Rank (Most to Least Destructive)",
    y = "Tonnage Sunk (thousands of tons)",
    caption = "WWI's deadliest U-boat (U-35) sank 3x more tonnage than WWII's deadliest (U-48)"
  ) +
  
  theme_minimal(base_size = 13) +
  theme(
    plot.title = element_text(face = "bold", size = 12, color = dark_text),
    plot.subtitle = element_text(size = 8, color = dark_text, margin = margin(b = 10)),
    plot.caption = element_text(size = 9, color = "#666", face = "italic", margin = margin(t = 10)),
    axis.title = element_text(face = "bold", size = 11),
    legend.position = "top",
    panel.grid.minor = element_blank()
  )

ggplotly(p6, tooltip = "text") %>%
  layout(
    legend = list(x = 0.85, y = 0.98),
    margin = list(l = 65, r = 50, b = 90, t = 100)
  ) %>%
  config(displaylogo = FALSE)
```

***

**Learning from History**

During World War II, German U-boats faced a far more prepared enemy. The effectiveness that nearly won Germany the First World War collapsed under the weight of Allied innovation and coordination.

**The U-Boat Campaign (1939 - 1945)**  
Germany deployed around 1,150 submarines during World War II, sinking roughly 3,000 Allied vessels and destroying about 14 million tons of shipping. However, this came at a staggering cost - 783 U-boats were lost, a casualty rate of nearly 68 percent.

**Allied Advantages**  
From the beginning of the war, the Allies implemented the convoy system, denying U-boats easy targets. New Radar and Sonar allowed for early detection of both surfaced and submerged submarines. The breaking of the Enigma code (Ultra intelligence) gave Allied commanders access to U-boat positions in real time. Long-range patrol aircraft and escort carriers closed the “Atlantic Gap”.

**German Disadvantages**  
Germany entered the war with only 57 operational U-boats—far fewer than in 1917. Allied defenses were mature from the outset, and radar exposed submarines long before they could attack. The result was catastrophic loss rates for German crews, nearly four times higher than in World War I.

**The Numbers in Perspective**  
In World War I, U-35 alone sank 226 ships totaling 538,000 tons. In World War II, the most successful submarine, U-48, managed 51 ships totaling 310,000 tons—only about 58 percent as effective. Despite deploying more submarines overall, Germany’s campaign failed.

**The Outcome**  
By 1945, Allied technology and coordination had decisively neutralized the U-boat threat. What had once been the terror of the Atlantic became a costly lesson in how quickly innovation can turn the tide of war.

*The war ended. But a new threat to ocean liners emerged, this time from above...*

---

### The Final Blow: Rise of the Jet Liner (1950-2000) {data-commentary-width=400}

```{r slide8}
air_world <- air_data %>%
  filter(Country.Name == "World") %>%
  select(starts_with("X")) %>%
  pivot_longer(everything(), names_to = "Year", values_to = "Passengers") %>%
  mutate(
    Year = as.numeric(gsub("X", "", Year)),
    Passengers = as.numeric(Passengers)
  ) %>%
  filter(!is.na(Passengers) & Year >= 1950 & Year <= 2000)

liner_decline <- liners_summary %>%
  filter(Year >= 1950 & Year <= 2000)

p7 <- ggplot() +
  geom_col(data = air_world, 
           aes(x = Year, y = Passengers/1000000, 
               text = paste0("<b>", Year, "</b><br>",
                             "Air passengers: ", format(round(Passengers/1000000), big.mark = ","), "M")),
           fill = ocean_blue, alpha = 0.6, width = 0.8) +
  
  geom_line(data = liner_decline,
            aes(x = Year, y = Ships_Built * 20,
                text = paste0("<b>", Year, "</b><br>",
                              "Ocean liners built: ", Ships_Built)),
            color = danger_red, linewidth = 2) +
  geom_point(data = liner_decline,
             aes(x = Year, y = Ships_Built * 20),
             color = danger_red, size = 2, alpha = 0.7) +
  
  annotate("text", x = 1980, y = 1000, 
           label = "Air travel\nEXPLODES", 
           size = 4, color = ocean_blue, fontface = "bold", lineheight = 0.9) +
  annotate("curve", x = 1965, y = 1350, xend = 1970, yend = 1000,
           arrow = arrow(length = unit(0.3, "cm")), 
           color = ocean_blue, curvature = -0.3, linewidth = 1) +
  
  annotate("text", x = 1960, y = 550, 
           label = "Ocean liner\nconstruction\nCOLLAPSES", 
           size = 4, color = danger_red, fontface = "bold", lineheight = 0.9) +
  annotate("curve", x = 1982, y = 280, xend = 1975, yend = 180,
           arrow = arrow(length = unit(0.3, "cm")), 
           color = danger_red, curvature = 0.3, linewidth = 1) +
  
  scale_y_continuous(
    name = "Air Passengers (millions)",
    labels = comma,
    sec.axis = sec_axis(~./20, name = "Ocean Liners Built per Year")
  ) +
  scale_x_continuous(breaks = seq(1950, 2000, 10)) +
  
  labs(
    title = "The Death of an Era: Air Travel Replaces Ocean Liners",
    subtitle = "As jet aircraft carrying capacity soars, ocean liner construction collapses",
    x = "Year",
    caption = "Blue: Global air passengers (millions) | Red: Ocean liners built per year"
  ) +
  
  theme_minimal(base_size = 13) +
  theme(
    plot.title = element_text(face = "bold", size = 16, color = dark_text),
    plot.subtitle = element_text(size = 11, margin = margin(b = 10)),
    plot.caption = element_text(size = 9, color = "#666", face = "italic", margin = margin(t = 10)),
    axis.title = element_text(face = "bold", size = 11),
    axis.title.y = element_text(color = ocean_blue),
    axis.title.y.right = element_text(color = danger_red),
    axis.text.y = element_text(color = ocean_blue),
    axis.text.y.right = element_text(color = danger_red),
    panel.grid.minor = element_blank()
  )

ggplotly(p7, tooltip = "text") %>%
  layout(margin = list(l = 70, r = 80, b = 90, t = 100)) %>%
  config(displaylogo = FALSE)
```

***

**The End of an Age**

The arrival of jet aircraft dealt the final blow to transatlantic ocean liner travel, ending more than a century of dominance at sea.

**The Decline of Ocean Travel**  
In 1952, the de Havilland Comet became the first commercial jet airliner, and by 1958 the Boeing 707 had made ocean crossings obsolete. The 1969 launch of the Boeing 747, capable of carrying more than 400 passengers, sealed the liners’ fate. Air travel offered six-to-eight-hour crossings compared to five days by ship, with growing affordability and unmatched convenience.

**Falling Shipbuilding Rates**  
The 1950s saw around 15 to 20 new liners built each year, but by the 1960s that number had fallen to fewer than a dozen. During the 1970s, only a handful of new liners were launched annually, and by the 1980s the great transatlantic liners were nearly extinct.

**The Numbers Tell the Story**  
Air passenger numbers exploded worldwide - from 310 million in 1970 to 750 million by 1980, and over 1.6 billion by 2000, a 440 percent increase in just three decades. The sky had decisively replaced the sea as the pathway between continents.

**Fate of the Giants**  
The legendary liners met varied ends. RMS *Queen Mary* (1936) retired in 1967 and now serves as a museum in Long Beach, California. RMS *Queen Elizabeth* (1940) was sold in 1968 and burned in 1972. The QE2 (1969), the last great transatlantic liner, was retired in 2008 after decades of service.  

**Transformation and Legacy**  
As ocean travel for transport vanished, the industry reinvented itself around leisure. Speed gave way to luxury, and function to entertainment. Cruise ships replaced liners as floating resorts, catering to tourism rather than transit. Only the Queen Mary 2 continues to offer true transatlantic liner service - more homage than necessity.


*The golden age of ocean liners ended not with war, but with progress.*

---

### Epilogue: From Rough Seas to Calm Bays {data-commentary-width=400}

```{r slide9}
key_milestones <- data.frame(
  Ship = c("SS Great Western", "SS Great Eastern", "RMS Titanic", 
           "RMS Queen Mary", "SS France", "Sovereign of the Seas", 
           "Voyager of the Seas", "Oasis of the Seas"),
  Year = c(1838, 1858, 1911, 1936, 1962, 1988, 1999, 2009),
  Tonnage = c(1340, 18915, 45324, 81237, 66348, 73192, 137276, 225282),
  Type = c("Paddle Steamer", "Iron Ship", "Ocean Liner", "Ocean Liner", 
           "Ocean Liner", "Cruise Ship", "Cruise Ship", "Mega Cruise Ship"),
  Era = c("Steam Era", "Iron Age", "Golden Age", "Golden Age", 
          "Jet Age Transition", "Cruise Era", "Cruise Era", "Cruise Era")
)

p8 <- ggplot(key_milestones, aes(x = Year, y = Tonnage/1000, color = Era)) +
  annotate("rect", xmin = 1800, xmax = 1890, ymin = 0, ymax = Inf,
           fill = "#ECF0F1", alpha = 0.2) +
  annotate("rect", xmin = 1890, xmax = 1950, ymin = 0, ymax = Inf,
           fill = "#E8F6F3", alpha = 0.2) +
  annotate("rect", xmin = 1950, xmax = 2010, ymin = 0, ymax = Inf,
           fill = "#FEF9E7", alpha = 0.2) +
  
  geom_line(color = "gray60", linewidth = 0.5, linetype = "dashed") +
  
  geom_point(aes(size = Tonnage,
                 text = paste0("<b>", Ship, "</b><br>",
                               "Year: ", Year, "<br>",
                               "Type: ", Type, "<br>",
                               "Tonnage: ", format(Tonnage, big.mark = ","), " tons")),
             alpha = 0.8) +
  
  geom_text(aes(label = Ship), 
            vjust = -1.3, hjust = 0.5, size = 3, color = "gray40",
            fontface = "bold", lineheight = 0.85, check_overlap = FALSE,
            show.legend = FALSE) +
  
  scale_size_continuous(range = c(4, 18), guide = "none") +
  scale_color_manual(
    values = c("Steam Era" = "#95A5A6", "Iron Age" = "#7F8C8D", 
               "Golden Age" = "#DAA520", "Jet Age Transition" = "#2E86AB",
               "Cruise Era" = "#06A77D"),
    name = "Era"
  ) +
  scale_y_continuous(labels = function(x) paste0(x, "k")) +
  scale_x_continuous(breaks = seq(1840, 2010, 20), limits = c(1830, 2015)) +
  
  labs(
    title = "170 Years of Evolution: From Steam to Mega-Ships",
    subtitle = "Each milestone represents a technological leap — modern cruise ships dwarf ocean liners",
    x = "Year",
    y = "Tonnage (thousands of tons)",
    caption = "Modern cruise ships are 3x larger than the greatest ocean liners, but serve tourism not transportation"
  ) +
  
  theme_minimal(base_size = 13) +
  theme(
    plot.title = element_text(face = "bold", size = 16, color = dark_text),
    plot.subtitle = element_text(size = 11, margin = margin(b = 10)),
    plot.caption = element_text(size = 9, color = "gray40", face = "italic", margin = margin(t = 10)),
    axis.title = element_text(face = "bold", size = 11),
    legend.position = "top",
    panel.grid.minor = element_blank()
  )

ggplotly(p8, tooltip = "text") %>%
  layout(
    showlegend = TRUE,
    margin = list(l = 65, r = 50, b = 90, t = 100)
  ) %>%
  config(displaylogo = FALSE)
```

***

**From Transportation to Tourism**

The legacy of ocean liner technology lives on in today’s cruise ships, which have transformed sea travel from necessity to leisure.

**The Transformation**  
For over a century, ocean liners served a practical purpose—moving people and mail across the globe. Their focus was on speed, reliability, and endurance. Routes linked major ports across the Atlantic and Pacific, and passengers ranged from immigrants seeking new lives to wealthy travelers chasing prestige.  

By contrast, modern cruise ships exist purely for recreation. The destination is now the ship itself. Since the 1970s, cruises have focused on entertainment, comfort, and luxury, offering experiences to the Caribbean, Mediterranean, and Alaska.

**Size and Scale**  
Technological evolution has made ships vastly larger and more capable. The *SS Great Western* (1838) weighed just 1,340 tons. The *RMS Queen Mary* (1936) was 81,237 tons - around sixty times larger. By 2009, *Oasis of the Seas* reached 225,282 tons, 168 times the size of the first great steamer.

**Modern Marvels**  
Contemporary cruise ships are feats of engineering and hospitality. They feature theaters, shopping promenades, ice rinks, climbing walls, and water parks. Crews of over 2,000 serve more than 6,000 passengers on some ships. These vessels are safer, cleaner, and more stable than any ocean liner in history, powered by advanced navigation and environmental systems.

**What Endures**  
Despite the shift in purpose, much of the ocean liner spirit survives. The same engineering precision, safety innovations inspired by the *Titanic*, and traditions of luxury service remain central to the cruise experience. The romance of ocean travel endures - just in a new form.



*The technology evolved. The purpose changed. But the dream of crossing oceans in style never died - it just transformed.*

---

### References & Data Sources {data-commentary-width=400}

```{r slide10}
summary_stats <- data.frame(
  Category = c("Ocean Liners\nTracked", "Years\nCovered", "WWI U-Boats\nAnalyzed", 
               "WWII U-Boats\nAnalyzed", "Titanic\nPassengers", "Lusitania\nManifest"),
  Count = c(nrow(liners), 200, nrow(uboat_ww1), nrow(uboat_ww2), 
            nrow(titanic), nrow(lusitania)),
  Color = c(ocean_blue, ocean_blue, danger_red, danger_red, "#1A1A1A", "#1A1A1A")
)

p10 <- ggplot(summary_stats, aes(x = reorder(Category, -Count), y = Count, fill = Color)) +
  geom_col(alpha = 0.8, width = 0.7, show.legend = FALSE) +
  geom_text(aes(label = format(Count, big.mark = ",")), 
            vjust = -0.5, size = 5, fontface = "bold") +
  scale_fill_identity() +
  scale_y_continuous(labels = comma, expand = expansion(mult = c(0, 0.15))) +
  labs(
    title = "Dataset Overview: Comprehensive Historical Analysis",
    subtitle = "Multiple data sources combined to tell a complete story",
    x = NULL,
    y = "Number of Records"
  ) +
  theme_minimal(base_size = 13) +
  theme(
    plot.title = element_text(face = "bold", size = 16, color = dark_text),
    plot.subtitle = element_text(size = 11, margin = margin(b = 15)),
    axis.title.y = element_text(face = "bold", size = 11),
    axis.text.x = element_text(size = 10, face = "bold", lineheight = 0.9),
    panel.grid.major.x = element_blank(),
    panel.grid.minor = element_blank()
  )

ggplotly(p10) %>%
  layout(showlegend = FALSE, margin = list(l = 65, r = 50, b = 80, t = 100)) %>%
  config(displaylogo = FALSE)
```

***

**Data Sources and References**



- World Bank. (2025, July 10). *Air transport, passengers carried (IS.AIR.PSGR)* [Data set]. World Development Indicators. https://data.worldbank.org/indicator/IS.AIR.PSGR  

- Wikipedia contributors. (n.d.). *List of ocean liners*. *Wikipedia, The Free Encyclopedia.* Retrieved October 29, 2025, from https://en.wikipedia.org/wiki/List_of_ocean_liners  

- Wikipedia contributors. (n.d.). *Blue Riband*. *Wikipedia, The Free Encyclopedia.* Retrieved October 29, 2025, from https://en.wikipedia.org/wiki/Blue_Riband  

- Uboat.net. (n.d.). *WWI U-boats and their campaigns*. Retrieved October 29, 2025, from https://uboat.net/wwi/  

- Uboat.net. (n.d.). *U-boat database: individual boats*. Retrieved October 29, 2025, from https://uboat.net/boats/  

- RKKaggle2. (n.d.). *RMS Lusitania complete passenger manifest* [Data set]. *Kaggle.* Retrieved October 29, 2025, from https://www.kaggle.com/datasets/rkkaggle2/rms-lusitania-complete-passenger-manifest  

- Yasserh. (n.d.). *Titanic dataset* [Data set]. *Kaggle.* Retrieved October 29, 2025, from https://www.kaggle.com/datasets/yasserh/titanic-dataset  

*Note: Ocean liner tonnage data were web-scraped from the Wikipedia pages individually and compiled into a custom dataset for visualization purposes.*


---
```{r}
```