Skip to main content

Advanced US Freight Analytics Dashboard with Interactive Visualizations

Project description

๐Ÿš› Advanced US Freight Analytics Dashboard

๐ŸŽฏ Overview

An interactive, data-driven dashboard for comprehensive analysis of US freight transportation patterns across rail and port modes. This enhanced visualization platform provides deep insights into seasonal trends, performance metrics, and predictive analytics for freight transportation.

๐Ÿš€ Enhanced Features

โœจ Professional UI/UX

  • Modern, responsive design with custom CSS styling
  • Interactive metric cards and KPI displays
  • Mobile-friendly layouts

๐Ÿ“Š Advanced Analytics

  • Multi-Modal Analysis: Compare rail and port freight transportation
  • Seasonal Decomposition: Deep dive into seasonal patterns
  • Trend Analysis: Statistical trend detection with R-squared values
  • Predictive Insights: Moving averages and anomaly detection
  • Interactive Heatmaps: Correlation analysis between variables

๐Ÿ—บ๏ธ Enhanced Geospatial Visualization

  • Interactive port location maps with volume bubbles
  • Regional analysis by coast (Atlantic, Pacific, Gulf)
  • Geographic performance distribution

๐Ÿ“ˆ Advanced Chart Types

  • Sunburst charts for hierarchical data
  • Interactive heatmaps with hover details
  • Time series with statistical trend lines
  • Growth rate analysis with year-over-year comparisons
  • Capacity utilization indicators

๐Ÿ“‚ Project Structure

DashBoard/
โ”œโ”€โ”€ ๐Ÿ“ฑ streamlit_app.py          
โ”œโ”€โ”€ ๐Ÿ“‹ requirements.txt           
โ”œโ”€โ”€ ๐Ÿ“– README.md                 
โ”œโ”€โ”€ ๐Ÿ“œ LICENSE                  
โ”œโ”€โ”€ ๐Ÿ”ง .gitignore            
โ”œโ”€โ”€ ๐Ÿ› ๏ธ setup.py                 
โ”œโ”€โ”€ ๐Ÿ“ CHANGELOG.md             
โ”œโ”€โ”€ ๐Ÿค CONTRIBUTING.md          
โ”œโ”€โ”€ ๐Ÿ” SECURITY.md              
โ”œโ”€โ”€ ๐Ÿš€ run_dashboard.bat        
โ”œโ”€โ”€ ๐Ÿ“Š Data/                    
โ”‚   โ”œโ”€โ”€ Rail_Carloadings_originated.csv    
โ”‚   โ””โ”€โ”€ port_dataset.json                  
โ”œโ”€โ”€ ๐Ÿ“ Script/                  
โ”‚   โ”œโ”€โ”€ enhanced_dashboard.py              
โ”‚   โ”œโ”€โ”€ dash_water_rail.py                
โ”‚   โ””โ”€โ”€ test_dashboard.py               
โ”œโ”€โ”€ โš™๏ธ .vscode/                
โ”œโ”€โ”€ ๐Ÿณ .devcontainer/         
โ””โ”€โ”€ ๐Ÿ”„ .github/                
    โ”œโ”€โ”€ workflows/
    โ”‚   โ””โ”€โ”€ ci.yml             
    โ””โ”€โ”€ ISSUE_TEMPLATE/
        โ”œโ”€โ”€ bug_report.yml      
        โ””โ”€โ”€ feature_request.yml 

๐ŸŽจ Dashboard Sections

1. ๐Ÿš† Rail Analytics

  • Overview: Trend analysis with statistical insights, interactive heatmaps
  • Seasonal Analysis: Sunburst charts, year-over-year seasonal comparisons
  • Trend Analysis: Growth rate calculations, performance tracking
  • Predictive Insights: Moving averages, anomaly detection

2. ๐Ÿšข Port Analytics

  • Overview: Interactive maps, time series comparisons
  • Performance Metrics: Capacity utilization, regional analysis
  • Seasonal Patterns: Coast-based seasonal analysis
  • Growth Analysis: Port ranking and performance trends

3. ๐Ÿ“Š Comparative Analysis

  • Multi-Modal Comparison: Rail vs Port volume analysis
  • Market Share Evolution: Modal share tracking over time
  • Conversion Analytics: TEU equivalent calculations
  • Strategic Insights: Mode-specific advantages analysis

๐Ÿ› ๏ธ Technical Features

Performance Optimizations

  • @st.cache_data for efficient data loading
  • Progressive loading for large datasets

Advanced Libraries

  • Plotly: Interactive charts with hover details
  • SciPy: Statistical analysis and trend detection
  • Pandas
  • NumPy

๐Ÿš€ Quick Start

๐Ÿ“ฆ Package Installation (Recommended)

# Install from PyPI (when published)
pip install freight-analytics-dashboard

# Launch dashboard immediately  
freight-dashboard

# Custom configuration
freight-dashboard --port 8502 --host 0.0.0.0

# Get help
freight-dashboard --help

๐ŸŒ Live Demo

View Live Dashboard on Streamlit Cloud ๐Ÿ”—

๐Ÿ’ป Local Development

Option 1: From Package Source

# Clone the repository
git clone https://github.com/meghkc/DashBoard.git
cd DashBoard

# Install in development mode
pip install -e .

# Launch via CLI
freight-dashboard

Option 2: Direct Streamlit

# Clone and navigate
git clone https://github.com/meghkc/DashBoard.git
cd DashBoard

# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run the main dashboard (Streamlit Cloud compatible)
streamlit run streamlit_app.py

Option 3: One-Click Launch (Windows)

# Double-click the launcher
run_dashboard.bat

๐Ÿณ Container Deployment

# Docker
docker build -t freight-dashboard .
docker run -p 8501:8501 freight-dashboard

# Or use pre-built image (when available)
docker run -p 8501:8501 meghkc/freight-analytics-dashboard

โ˜๏ธ Cloud Deployment

  • Streamlit Cloud: Fork repo โ†’ Connect GitHub โ†’ Deploy
  • Heroku/Railway/Render: Direct deployment support via Procfile
  • Any Python hosting: Install package and run freight-dashboard
## ๐Ÿ“Š Data Sources & Specifications

### **Rail Dataset**
- **Source**: USDA Agricultural Transportation
- **Timespan**: 2017-2023 (7 years)
- **Key Metrics**: Carloads by railroad, commodity, and time

### **Port Dataset**
- **Source**: Individual port authority websites
- **Coverage**: 9 major US container ports
- **Timespan**: 2018-2024
- **Key Metrics**: TEU (Twenty-foot Equivalent Units)

## ๐ŸŽฏ Analytics Features

### **KPI Dashboard**
- Total freight volume metrics
- Growth rate calculations
- Peak performance indicators
- Operational efficiency metrics

### **Data Insights**
- Anomaly detection alerts
- Seasonal pattern recognition
- Performance benchmarking
- Trend significance testing

### **Export Capabilities**
- Data download options
- Chart export functionality
- Report generation ready

## ๐Ÿ‘จโ€๐Ÿ’ป Technical Specifications

### **System Requirements**
- Python 3.8+
- 4GB RAM minimum
- Modern web browser
- Internet connection for maps

### **Dependencies**

streamlit >= 1.48.0
pandas >= 1.5.0
plotly >= 5.0.0
scipy >= 1.9.0
scikit-learn >= 1.1.0
seaborn >= 0.11.0
numpy >= 1.21.0

## ๐Ÿ”— Links & Resources

- **Data Source (Rail)**: [USDA Agricultural Transportation](https://agtransport.usda.gov/stories/s/appm-bhti)
- **Data Source (Ports)**: Individual port authority websites
- **Framework**: Built with Streamlit
- **Visualization**: Powered by Plotly
- **Author**: Megh KC | Created 2024 | Enhanced 2025

---

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freight_analytics_dashboard-1.0.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

freight_analytics_dashboard-1.0.0-py3-none-any.whl (685.8 kB view details)

Uploaded Python 3

File details

Details for the file freight_analytics_dashboard-1.0.0.tar.gz.

File metadata

File hashes

Hashes for freight_analytics_dashboard-1.0.0.tar.gz
Algorithm Hash digest
SHA256 84cc75aa88619df2f931563cf11d0ef375d49e473690dd00f7688016b2731b1d
MD5 2a62ef91fcfff7dcf35c7c0f87ecdce6
BLAKE2b-256 381d21f1024b0f05b992f867fc3ad34530a6348022fedfdd6b3b8bfbe7d1a7ab

See more details on using hashes here.

File details

Details for the file freight_analytics_dashboard-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for freight_analytics_dashboard-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd590ce9e8a9643291e1cdca042a74277f5add278e6006d92dc3705f9989eed7
MD5 2eda3655859d14b79305514f37bad427
BLAKE2b-256 cd4afe05101efbba5b3203641a9dab5e7976d82118efe78aa9b27e46210f7f4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page