This data science project cleans, merges, and visualizes 71 fiscal years of historical cargo volume data from the Kolkata and Haldia Ports in India. The objective is to identify peak shipping periods, long-term macroeconomic trends, the shift in trade strategies, and the evolution of the cargo mix over seven decades.
The raw historical data for this project was sourced from the Open Government Data (OGD) Platform India. The datasets contain audited fiscal year records detailing principal commodity breakdowns and overall cargo traffic metrics for the Syama Prasad Mookerjee Port (Kolkata Dock System and Haldia Dock Complex).
By applying a 10-year moving average to the raw traffic data, we filter out short-term economic shocks to reveal a massive, sustained explosion in port volume beginning in the late 1990s.

Historically, the ports relied on a few key bulk commodities. However, by the 2000s, miscellaneous "Other Commodities" completely dwarfed traditional bulk goods like Coal and Petroleum, indicating a massive structural shift toward a diversified port business model.

The port has consistently operated as an import-dominant hub. The ratio of imports to exports shows the region's heavy reliance on incoming foreign goods rather than domestic export production.

Container shipping did not exist at these ports in 1950. Tracking its emergence against traditional bulk goods like Food Grains shows the modernization of maritime logistics.

(Note: A total of 10 advanced statistical charts, including Correlation Heatmaps, Decadal Boxplots, and YoY Volatility, are available in the outputs/figures/ directory).
The project follows a standard, reproducible data science workflow:
kolkata-haldia-port-analysis/
βββ data/
β βββ raw/ # Immutable historical CSV datasets
β βββ processed/ # Cleaned, merged 71x18 dataset ready for analysis
βββ notebooks/
β βββ 01_eda_and_cleaning.ipynb # Phase 1: Exploratory Data Analysis
βββ src/
β βββ data_cleaning.py # Phase 2: Automated cleaning, imputation, and merging
β βββ visualization.py # Phase 3: Seaborn/Matplotlib chart generation
βββ outputs/
β βββ figures/ # 10 High-resolution PNG visualizations
βββ requirements.txt # Project dependencies
βββ README.md
- Imputation: Early historical years lacking container/coastal tracking data were filled using zero-imputation (
fillna(0)) to maintain scientific accuracy. - Standardization: Extracted clean integer years from fiscal date strings (e.g.,
1950-51β1950) and applied rigorous naming conventions to all columns. - Feature Engineering: Created new relational metrics including
YoY_Growth,Import_Export_Ratio, moving averages, andTop_5_Combinedto unlock deeper economic analysis.
If you wish to clone this repository and reproduce the pipeline on your local machine:
1. Clone the repository and navigate into the folder:
git clone https://github.com/Debzillaa/kolkata-haldia-port-analysis.git
cd kolkata-haldia-port-analysis2. Set up a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
pip install -r requirements.txt3. Run the data pipeline:
# Step 1: Clean the raw data and generate the merged CSV
python src/data_cleaning.py
# Step 2: Generate all 10 high-resolution charts
python src/visualization.pypandas- Data manipulation and mergingmatplotlib- Core plotting engineseaborn- Advanced statistical visualizations