Container Port Traffic Monitoring

Posted on Oct 28, 2020

The skills the author demonstrated here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Project Overview

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.

Container Port Traffic Monitoring


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.

Container Port Traffic Monitoring

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.

Container Port Traffic Monitoring

About Author

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI