Container Port Traffic Monitoring
The skills the author demonstrated here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.
For this project, I analyzed the import and export traffic at the top four container ports in the United States. Container ports are centers for transferring containers of imported and exported products between large ocean vessels and trucks or trains for inland transport. Most container ports provide monthly figures for imported and exported containers on their websites, differentiating between empty and full containers. The unit of measure is the TEU or Twenty-Foot Equivalent Unit. This is the size of a standard 20 foot shipping container (20 feet long and 8 feet tall).
The goals of the project were to explore the relationship between container port traffic and other useful economic indicators such as sales, stock prices, and national trade figures. Because of the long times and complicated logistics involved in ocean travel, port traffic provides a snapshot of the consensus of what demand will be for the shipped products 2-4 months in
the future. This can be useful in making pricing and space allocation predictions. Port traffic can also be disrupted by local, national and international crisis, such as hurricanes, floods, or pandemics (eg., COVID) and this will also impact demand and pricing.
Data Analysis - Pt. 1
The data show a strong correlation between container port traffic and national economic indicators, with variations due to the types of products being shipped through each port. Monthly variations in port traffic do in fact correlate with national sales numbers for shipped products, with a time lag of 2-4 months. Finally, the impact of COVID can be clearly observed in the port traffic, with a steep drop in trade followed by a equally sharp recovery. Future work includes the possibility of tracking vessel traffic from top trading partner countries in order to predict container port congestion and provide a more up-to-date measure of trade figures.
It is not obvious that local port traffic should be a strong indicator of what is happening in the country as a whole. Here it is shown, however, that the traffic at an individual port (Long Beach) matches with the S&P 500 closing price when plotted over a long period of time (1995-2020). Recessions occuring in 2002 and 2008 are clearly observed. The US trade imbalance as reported by the US government also correlates well with the Total Exports - Total Imports of containers coming into an indiviudal port. As shown below, the trade imabalance varies between different ports. Further analysis is needed to determine the products where the trade imbalance is highest.
Data Analysis - Pt. 2
The variation in imports by month for Los Angeles and Long Beach were plotted. Monthly figures are averaged over the last five years. This is compared with monthly variation in sales for top import products for the two ports: furniture sales for Los Angeles and gasoline sales for Long Beach. In both cases it can be seen that imports reach their peak 2-4 months prior to sales. This shows how port traffic is a leading indicator for future product sales. Given further time a quantitative correlation between port traffic and sales data should be calculated.
Variation in exports by month is plotted allowing selection of the port. In general, there is less monthly variation in exports than in imports. This is presumably because agricultural products have a smaller seasonal variation in usage than consumer products or petroleum.
Port traffic dropped precipitously in March 2020 due to the pandemic. This is observed in both import and export data. The time resolution is not fine enough to distinguish between the different stages of the pandemic when the data is summarized between all four ports. Individual ports show some interesting differences. Los Angeles and Savannah experienced a recovery in April, but then dropped again before recovering completely. NYC did not experience a major drop until May.
This is presumably because of the relatively large number of European trading partners with NYC, and the later onset of the virus in Europe compared with China.