Top 20 ports - gross weight of goods handled in each port, by type of cargo (main ports)

Data - Eurostat

Info

LAST_DOWNLOAD

Code
tibble(LAST_DOWNLOAD = as.Date(file.info("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/eurostat/mar_mg_am_pwhc.RData")$mtime)) %>%
  print_table_conditional()
LAST_DOWNLOAD
2024-10-08

LAST_COMPILE

LAST_COMPILE
2024-11-05

Last

Code
mar_mg_am_pwhc %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(time)) %>%
  head(1) %>%
  print_table_conditional()
time Nobs
2022 414

cargo

Code
mar_mg_am_pwhc %>%
  left_join(cargo, by = "cargo") %>%
  group_by(cargo, Cargo) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
cargo Cargo Nobs
DBK Dry bulk goods 1138
OTH Other cargo not elsewhere specified 1138
TOTAL Total 1138
LBK Liquid bulk goods 1136
LCNT Large containers 1114
RO_MSP Ro-Ro - mobile self-propelled units 1034
RO_MNSP Ro-Ro - mobile non-self-propelled units 868
UNK Unknown 42

unit

Code
mar_mg_am_pwhc %>%
  left_join(unit, by = "unit") %>%
  group_by(unit, Unit) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
unit Unit Nobs
PC_TOT Percentage of total 3804
THS_T Thousand tonnes 3804

rep_mar

Code
mar_mg_am_pwhc %>%
  left_join(rep_mar, by = "rep_mar") %>%
  group_by(rep_mar, Rep_mar) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()

time

Code
mar_mg_am_pwhc %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Top 20 Ports

Ports of the Europe by annual cargo tonnage

Code
i_g("bib/industrie/top-20-ports.png")

Conteneurs

2019

Code
mar_mg_am_pwhc %>%
  filter(unit == "THS_T",
         time == "2019",
         cargo == "TOTAL") %>%
  left_join(rep_mar, by = "rep_mar") %>%
  select(rep_mar, Rep_mar, values) %>%
  arrange(-values) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

2020

Code
mar_mg_am_pwhc %>%
  filter(unit == "THS_T",
         time == "2020",
         cargo == "TOTAL") %>%
  left_join(rep_mar, by = "rep_mar") %>%
  select(rep_mar, Rep_mar, values) %>%
  arrange(-values) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Marseille, Antwerpen, Hamburg, Rotterdam

Code
mar_mg_am_pwhc %>%
  left_join(rep_mar, by = "rep_mar") %>%
  filter(cargo == "TOTAL",
         unit == "THS_T",
         Rep_mar %in% c("Rotterdam", "Antwerpen", "Hamburg", "Marseille")) %>%
  year_to_date %>%
  ggplot + geom_line(aes(x = date, y = values, color = Rep_mar)) +
     theme_minimal() + xlab("") + ylab("Volumes des conteneurs (Millions EVP)") +
  
  theme(legend.position = c(0.3, 0.85),
        legend.title = element_blank()) +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 20, 1))

FR_2FRMRS

Antwerpen, Hamburg, Rotterdam

Code
mar_mg_am_pwhc %>%
  left_join(rep_mar, by = "rep_mar") %>%
  filter(cargo == "TOTAL",
         unit == "THS_T",
         Rep_mar %in% c("Rotterdam", "Antwerpen", "Hamburg")) %>%
  year_to_date %>%
  mutate(values = values / 10^3) %>%
  ggplot + geom_line(aes(x = date, y = values, color = Rep_mar)) +
     theme_minimal() + xlab("") + ylab("Volumes des conteneurs (Millions EVP)") +
  
  theme(legend.position = c(0.3, 0.85),
        legend.title = element_blank()) +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 20, 1))

Peiraias, Valencia, Algeciras

Code
mar_mg_am_pwhc %>%
  left_join(rep_mar, by = "rep_mar") %>%
  filter(cargo == "TOTAL",
         unit == "THS_T",
         Rep_mar %in% c("Peiraias", "Valencia", "Algeciras")) %>%
  year_to_date %>%
  mutate(values = values / 10^3) %>%
  ggplot + geom_line(aes(x = date, y = values, color = Rep_mar)) +
     theme_minimal() + xlab("") + ylab("Volumes des conteneurs (Millions EVP)") +
  
  theme(legend.position = c(0.3, 0.85),
        legend.title = element_blank()) +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 20, 1))

Bremerhaven, Felixstowe, Barcelona

Code
mar_mg_am_pwhc %>%
  left_join(rep_mar, by = "rep_mar") %>%
  filter(cargo == "TOTAL",
         unit == "THS_T",
         Rep_mar %in% c("Bremerhaven", "Felixstowe", "Barcelona")) %>%
  year_to_date %>%
  mutate(values = values / 10^3) %>%
  ggplot + geom_line(aes(x = date, y = values, color = Rep_mar)) +
     theme_minimal() + xlab("") + ylab("Volumes des conteneurs (Millions EVP)") +
  
  theme(legend.position = c(0.1, 0.85),
        legend.title = element_blank()) +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 20, 1))

Ambarli, Gioia Tauro, Le Havre

Code
mar_mg_am_pwhc %>%
  left_join(rep_mar, by = "rep_mar") %>%
  filter(cargo == "TOTAL",
         unit == "THS_T",
         Rep_mar %in% c("Ambarli", "Gioia Tauro", "Le Havre")) %>%
  year_to_date %>%
  mutate(values = values / 10^3) %>%
  ggplot + geom_line(aes(x = date, y = values, color = Rep_mar)) +
     theme_minimal() + xlab("") + ylab("Volumes des conteneurs (Millions EVP)") +
  
  theme(legend.position = c(0.1, 0.85),
        legend.title = element_blank()) +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 20, .5))

All ports

Linear

Code
mar_mg_am_pwhc %>%
  left_join(rep_mar, by = "rep_mar") %>%
  filter(cargo == "TOTAL",
         unit == "THS_T") %>%
  year_to_date %>%
  mutate(values = values / 10^3) %>%
  group_by(Rep_mar) %>%
  arrange(date) %>%
  mutate(values = 100*values/values[1]) %>%
  ggplot + geom_line(aes(x = date, y = values, color = Rep_mar)) +
  theme_minimal() + xlab("") + ylab("Volumes des conteneurs (Millions EVP)") +
  #scale_color_manual(values = viridis(13)[1:12]) +
  theme(legend.title = element_blank()) +
  scale_x_date(breaks = seq(1940, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(10, 300, 10))

Largest

Code
mar_mg_am_pwhc %>%
  left_join(rep_mar, by = "rep_mar") %>%
  filter(cargo == "TOTAL",
         unit == "THS_T") %>%
  year_to_date %>%
  mutate(values = values / 10^3) %>%
  group_by(Rep_mar) %>%
  filter(n() == 18) %>%
  arrange(date) %>%
  filter(values[date == as.Date("2022-01-01")] > 40) %>%
  mutate(values = 100*values/values[1]) %>%
  ggplot + geom_line(aes(x = date, y = values, color = Rep_mar)) +
  theme_minimal() + xlab("") + ylab("Gross weight of goods handled in each port vs. 2005") +
  #scale_color_manual(values = viridis(13)[1:12]) +
  theme(legend.title = element_blank()) +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(10, 300, 10),
                labels = percent(0.01*seq(10, 300, 10)-1, 2)) +
  geom_text_repel(data = . %>% filter(date ==as.Date("2022-01-01")), aes(x = date, y = values, label = Rep_mar, color = Rep_mar))

12 ports

Linear

Code
mar_mg_am_pwhc %>%
  left_join(rep_mar, by = "rep_mar") %>%
  filter(cargo == "TOTAL",
         unit == "THS_T",
         Rep_mar %in% c("Rotterdam", "Antwerpen", "Hamburg",
                        "Peiraias", "Valencia", "Algeciras",
                        "Bremerhaven", "Felixstowe", "Barcelona",
                        "Ambarli", "Gioia Tauro", "Le Havre")) %>%
  year_to_date %>%
  mutate(values = values / 10^3) %>%
  mutate(Rep_mar = factor(Rep_mar, c("Rotterdam", "Antwerpen", "Hamburg",
                        "Peiraias", "Valencia", "Algeciras",
                        "Bremerhaven", "Felixstowe", "Barcelona",
                        "Ambarli", "Gioia Tauro", "Le Havre"))) %>%
  ggplot + geom_line(aes(x = date, y = values, color = Rep_mar)) +
  theme_minimal() + xlab("") + ylab("Volumes des conteneurs (Millions EVP)") +
  #scale_color_manual(values = viridis(13)[1:12]) +
  theme(legend.title = element_blank()) +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 20, 1))

Log

Code
mar_mg_am_pwhc %>%
  left_join(rep_mar, by = "rep_mar") %>%
  filter(cargo == "TOTAL",
         unit == "THS_T",
         Rep_mar %in% c("Rotterdam", "Antwerpen", "Hamburg",
                        "Peiraias", "Valencia", "Algeciras",
                        "Bremerhaven", "Felixstowe", "Barcelona",
                        "Ambarli", "Gioia Tauro", "Le Havre")) %>%
  year_to_date %>%
  mutate(values = values / 10^3) %>%
  mutate(Rep_mar = factor(Rep_mar, c("Rotterdam", "Antwerpen", "Hamburg",
                        "Peiraias", "Valencia", "Algeciras",
                        "Bremerhaven", "Felixstowe", "Barcelona",
                        "Ambarli", "Gioia Tauro", "Le Havre"))) %>%
  ggplot + geom_line(aes(x = date, y = values, color = Rep_mar)) +
  theme_minimal() + xlab("") + ylab("Volumes des conteneurs (Millions EVP)") +
  #scale_color_manual(values = viridis(13)[1:12]) +
  theme(legend.title = element_blank()) +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(0, 20, 1))