A complete, modular, and production-ready end-to-end data processing pipeline built with Python. This pipeline ingests raw datasets, cleans and preprocesses data, performs transformations, analyzes it, and generates automated reports with visualizations.
Complete pipeline execution with all 6 stages completing successfully
Sample sales data with 1,020 rows including dates, products, quantities, and revenue
Histogram showing the distribution of revenue values
Average revenue across different product categories
Time series analysis showing revenue trends over the dataset period
Correlation matrix showing relationships between numeric variables
Automated HTML report with insights, statistics, and embedded visualizations
- Modular Architecture: Separate modules for each pipeline stage
- Configuration-Driven: Customize behavior via JSON configuration
- Error Handling: Comprehensive error handling and logging throughout
- Automated Reporting: Generate professional HTML reports with insights
- Visualization: Automatic generation of meaningful plots
- CLI Interface: Easy-to-use command-line interface
- Production-Ready: Follows industry best practices
Data Processing Pipeline/
β
βββ data/
β βββ raw/ # Raw input data
β βββ processed/ # Cleaned and processed data
β
βββ output/
β βββ reports/ # Generated HTML reports
β βββ visuals/ # Generated visualizations
β
βββ src/
β βββ __init__.py
β βββ data_ingestion.py # Data loading (CSV/Excel)
β βββ data_cleaning.py # Data cleaning and preprocessing
β βββ data_transformation.py # Feature engineering and transformations
β βββ data_analysis.py # Statistical analysis and visualization
β βββ reporting.py # Automated report generation
β βββ utils.py # Utility functions
β
βββ config/
β βββ config.json # Pipeline configuration
β
βββ main.py # Pipeline orchestrator with CLI
βββ generate_sample_data.py # Sample data generator
βββ requirements.txt # Python dependencies
βββ README.md # This file
- Python 3.8 or higher
- pip (Python package manager)
-
Clone or download the project
-
Install dependencies
pip install -r requirements.txtIf you want to test the pipeline with sample data:
python generate_sample_data.pyThis will create a sample dataset at data/raw/sample_data.csv with 1,000 rows of realistic sales data.
Basic usage:
python main.py --input data/raw/sample_data.csvWith custom configuration:
python main.py --input data/raw/sample_data.csv --config config/config.jsonSave processed data to custom location:
python main.py --input data/raw/sample_data.csv --output output/my_processed_data.csvWith debug logging:
python main.py --input data/raw/sample_data.csv --log-level DEBUGView help:
python main.py --helpThe pipeline executes the following stages sequentially:
- Loads data from CSV or Excel files
- Auto-detects file format
- Handles missing or corrupt files gracefully
- Validates data integrity
- Standardizes column names (lowercase, underscores)
- Removes duplicate rows
- Handles missing values (fill/drop strategies)
- Fixes data types (dates, numeric, categorical)
- Detects outliers (optional)
- Feature engineering (datetime extraction, mathematical operations)
- Categorical encoding (label encoding, one-hot encoding)
- Data normalization (min-max, z-score)
- Filtering and aggregations
- Summary statistics
- Correlation analysis
- Trend detection
- Distribution analysis
- Automated insight generation
- Distribution histograms
- Correlation heatmaps
- Time series trends
- Bar charts
- All plots saved automatically to
output/visuals/
- Generates comprehensive HTML reports
- Includes key insights and statistics
- Embeds visualizations
- Saves to
output/reports/
The pipeline is configured via config/config.json. Key configuration options:
{
"paths": {
"raw_data_dir": "data/raw",
"processed_data_dir": "data/processed",
"output_dir": "output",
"reports_dir": "output/reports",
"visuals_dir": "output/visuals"
}
}{
"cleaning": {
"missing_value_strategy": "fill",
"missing_value_fill_method": "median",
"remove_duplicates": true,
"standardize_columns": true,
"fix_data_types": true
}
}{
"transformation": {
"feature_engineering": {
"enabled": true,
"features": [
{
"name": "date_month",
"type": "datetime_extract",
"source_column": "date",
"extract": "month"
}
]
}
}
}{
"visualization": {
"enabled": true,
"plots": [
{"type": "distribution", "column": "revenue"},
{"type": "bar_chart", "x": "product_category", "y": "revenue"},
{"type": "trend", "date_column": "date", "value_column": "revenue"},
{"type": "heatmap"}
]
}
}After running the pipeline, you'll find:
- Processed Data:
data/processed/<filename>_processed.csv - Visualizations:
output/visuals/*.png - Reports:
output/reports/analysis_report_*.html - Logs:
pipeline.log
You can customize the pipeline by:
- Modifying config.json: Change cleaning strategies, add features, adjust visualization settings
- Using your own data: Point to any CSV or Excel file
- Extending modules: Add custom transformations or analysis methods
Add to config.json:
{
"transformation": {
"feature_engineering": {
"features": [
{
"name": "revenue_per_unit",
"type": "math",
"operation": "division",
"columns": ["revenue", "quantity"]
},
{
"name": "price_range",
"type": "bin",
"source_column": "unit_price",
"bins": 5
}
]
}
}
}The pipeline works with any CSV or Excel file. Just ensure:
- File is accessible and not corrupted
- Contains at least some numeric or categorical columns
- For trend analysis: include a date column and numeric value column
Example:
python main.py --input /path/to/your/data.csv1. Module not found error
Make sure you're running from the project root directory:
cd "Data Processing Pipeline"
python main.py --input data/raw/sample_data.csv2. Missing dependencies
Reinstall dependencies:
pip install -r requirements.txt --force-reinstall3. File not found
Check the file path is correct and relative to the project root.
4. Empty output
Check the log file (pipeline.log) for detailed error messages.
DataIngestionclass- Methods:
load_csv(),load_excel(),auto_detect_format(),validate_data()
DataCleanerclass- Methods:
standardize_columns(),handle_missing_values(),remove_duplicates(),fix_data_types(),detect_outliers()
DataTransformerclass- Methods:
create_features(),filter_data(),group_and_aggregate(),normalize_data(),encode_categorical()
DataAnalyzerclass: Statistical analysisDataVisualizerclass: Plot generation- Methods:
summary_statistics(),correlation_analysis(),trend_detection(),plot_distribution(), etc.
ReportGeneratorclass- Methods:
generate_html_report(),create_summary()
- Utility functions:
setup_logging(),load_config(),validate_directories()
- Always review config.json before running the pipeline
- Check logs for warnings and errors
- Validate output to ensure data quality
- Backup raw data before processing
- Customize features based on your specific dataset
This project is designed to be extensible. You can:
- Add new transformation methods
- Create additional visualization types
- Support more file formats (Parquet, JSON, etc.)
- Add machine learning pipelines
- Implement database connectivity
This project is open-source and available for educational and commercial use.
Built as a comprehensive data processing pipeline demonstrating industry best practices in data engineering.
Happy Data Processing! π
- Git installed on your system
- GitHub account
- Go to GitHub
- Click the "+" icon in the top-right corner
- Select "New repository"
- Fill in the details:
- Repository name:
data-processing-pipeline(or your preferred name) - Description:
End-to-end data processing pipeline with automated analysis and reporting - Visibility: Public or Private (your choice)
- DO NOT initialize with README, .gitignore, or license (we already have these)
- Repository name:
- Click "Create repository"
Open terminal/command prompt in your project folder:
cd "c:\Users\dnitr\Desktop\COLLEGE\myProjects\Data Processing Pipeline"
git init# Add all files
git add .
# Check what will be committed
git statusgit commit -m "Initial commit: Complete data processing pipeline with modular architecture"GitHub will show you commands after creating the repository. Use these:
# Rename branch to main
git branch -M main
# Add remote repository (replace YOUR_USERNAME with your GitHub username)
git remote add origin https://github.com/YOUR_USERNAME/data-processing-pipeline.git
# Verify remote
git remote -v# Push to GitHub
git push -u origin mainYou'll be prompted to enter your GitHub credentials:
- Username: Your GitHub username
- Password: Your GitHub Personal Access Token (not your GitHub password)
Note: If you don't have a Personal Access Token:
- Go to GitHub β Settings β Developer settings β Personal access tokens
- Click "Generate new token (classic)"
- Give it a name (e.g., "Git CLI Access")
- Select scopes:
repo(full control of private repositories) - Click "Generate token"
- Copy the token immediately - you won't see it again!
Go to your GitHub repository page and refresh. You should see all your files!
- Download GitHub Desktop
- Install and sign in with your GitHub account
- Click File β Add Local Repository
- Browse to your project folder and select it
- If it says "This directory is not a repository", click "create a repository"
- Fill in the details and click "Create Repository"
- Click "Publish repository"
- Choose the repository name and settings
- Click "Publish Repository"
After making changes to your project:
# Check changes
git status
# Add modified files
git add .
# Commit with descriptive message
git commit -m "Updated pipeline configuration and added new features"
# Push to GitHub
git push-
.gitignorefile is present (already added) - No sensitive data (API keys, passwords) in code
- No large data files (use Git LFS if needed)
-
pipeline.logis in.gitignore(already added) - Virtual environment folders are ignored (already added)
-
Add Topics (on your repo page):
python,data-pipeline,data-processing,data-analysis,pandas,data-science
-
Enable Issues for tracking bugs and features
-
Add License (optional but recommended):
- Go to your repo β Add file β Create new file
- Name it
LICENSE - Choose a license template (MIT is popular)
-
Set Repository Website (if you deploy it)
- Commit Often: Make small, focused commits with clear messages
- Use Branches: Create feature branches for new features
- Write Good Commit Messages: Use present tense ("Add feature" not "Added feature")
- Keep README Updated: Update documentation as you add features