Skip to content
3 min read csv

BW #50: Red Sea shipping

Get better at: CSV, multiple files, filtering, regular expressions, dates and times, window functions

BW #50: Red Sea shipping

We're now more than three months into the war between Israel and Hamas. While I have many thoughts on the war, this issue focuses on an unexpected war-related development, specifically, the Houthi rebels in Yemen expressing their solidarity with Hamas by attacking ships in the Red Sea. (They claim to be attacking ships that are owned by or trading with Israel, but that turns out not to be the case.)

Shipping companies are now paying more in insurance to go through the Red Sea, or they're rerouting their ships to go around the Cape of Good Hope in South Africa. Either way, it would seem that these Yemeni rebels' actions are responsible for a rise in inflation.

NPR's Planet Money reported on this topic earlier this month (https://www.npr.org/2024/01/02/1197959330/red-sea-tensions-global-shipping), and Marketplace had a story on it as well (https://www.marketplace.org/2024/01/17/red-sea-attacks-houth-rebels-shipping-rates/).

This week, we'll look at how many ships normally travel through the Red Sea and Suez Canal, and how many appear to be rerouted.

Data and seven questions

This week's data comes from PortWatch (https://portwatch.imf.org/), a joint project between the International Monetary Fund and the University of Oxford that was launched in November. They aim to track ships and ports around the world, and to give us insights into what's happening on those fronts.

We'll look at three related data sets, all describing the traffic of cargo ships and oil tankers:

  1. The number of ships passing through Bab el Mandeb, the "Strait of Tears" at the entrance to the Red Sea
  2. The number of ships passing through the Suez Canal
  3. The number of ships going past the Cape of Good Hope, in South Africa.

All three of these can be downloaded from the PortWatch page, "Trade disruptions in the Red Sea" (https://portwatch.imf.org/pages/573013af3b6545deaeb50ed1cbaf9444). Click on the "export data" link next to each graph, and choose the CSV export. (The Excel export produces an HTML file, rather than an actual Excel file, despite the ".xls" extension.)

The learning goals for this week's questions include:

Here are my seven tasks and questions for you this week. I'll be back tomorrow with my detailed solutions, including the Jupyter notebook I used to solve the problems myself: