How bhrajo/proj-00-digital-engagement-analytics-for-agribusiness-growth works
Purpose and Scope
This is a Ghana-focused data science project evaluating whether social-media engagement predicts customer value, loyalty, purchasing, churn, and agribusiness profitability. It is an offline analytical workflow rather than a deployed application. The primary deliverable is evidence, predictive results, and generated analysis artifacts for agribusiness decision-making.
Entry Points and Execution Model
The interactive analytical entry point is the Jupyter notebook at notebooks/Enhancing_Digital_Engagement_for_Agribusiness_Growth.ipynb. Reusable data-access logic begins in src/data/load_data.py. Python dependencies are declared in requirements.txt, while environment.yml supports a reproducible Conda-based environment.
Data Ingestion and Privacy Boundary
Raw, cleaned, and engineered datasets are intentionally absent from the tracked tree; the README identifies data/ as ignored. The ingestion boundary is therefore src/data/load_data.py, which should isolate dataset paths, schema loading, and any sensitive-data handling from notebook analysis. The project works from anonymized customer data, making local data storage and preprocessing the main privacy boundary.
Preprocessing and Validation
The first pipeline stage cleans the raw customer records into the analytical population through missing-value imputation, outlier winsorization, scaling, and integrity validation. Its generated artifacts are organized under outputs/01-data-preprocessing-and-validation/, with stage documentation at outputs/01-data-preprocessing-and-validation/README.md. This stage establishes the trusted feature set consumed by downstream EDA and models.
Exploration, Segmentation, and Feature Engineering
The notebook performs exploratory analysis across engagement, trust, purchases, platform use, and demographics, including composite engagement scoring and customer segmentation. Outputs are materialized under outputs/02-exploratory-data-analysis/ and described by outputs/02-exploratory-data-analysis/README.md. Derived business features—such as Loyalty Resilience Score, Brand Relation Score, and customer-value metrics—form the boundary between descriptive analysis and supervised prediction.
Modeling and Evaluation
Predictive work uses regression and classification models: linear/logistic regression, Random Forest, XGBoost, and LightGBM, with tuning and explainability. The control flow is engineered features → model fitting → validation metrics and diagnostic plots, including R², accuracy, ROC-AUC, confusion matrices, and SHAP. Results and visual evaluations belong in outputs/03-modeling-and-predictions/, documented by outputs/03-modeling-and-predictions/README.md.
Outputs and External Dependencies
The repository produces static analytical artifacts rather than serving APIs or using cloud infrastructure. Core runtimes are Python plus Jupyter, managed through requirements.txt and environment.yml. No external service integrations are present in the tree; social-media platforms are analytical variables, not connected runtime dependencies. The report asset at docs/Enhancing_Digital_Engagement_for_Agribusiness_Growth.pdf is a stakeholder-facing presentation of the pipeline’s findings.
Main entry points: Enhancing_Digital_Engagement_for_Agribusiness_Growth.ipynb Analysis notebook · load_data.py Data loading boundary · Enhancing_Digital_Engagement_for_Agribusiness_Growth.pdf Stakeholder report · requirements.txt Python dependencies
Components 18
Analytical runtime
- Python dependencies
requirements.txt - Conda environment
environment.yml - Analysis notebook · Interactive orchestrator for the end-to-end workflow.
notebooks/Enhancing_Digital_Engagement_for_Agribusiness_Growth.ipynb
Offline analysis pipeline
- Anonymized local data · Raw, cleaned, and engineered customer data remains outside version control.
- Data loading boundary · Isolates dataset paths, schema loading, and sensitive-data handling.
src/data/load_data.py - Preprocessing & validation · Imputes, winsorizes, scales, and validates the analytical population.
- Trusted feature set
- EDA & segmentation · Analyzes engagement, trust, purchases, platforms, and demographics.
- Business feature engineering · Builds engagement, loyalty, brand-relation, and customer-value features.
- Predictive modeling · Fits regression and classification models including RF, XGBoost, and LightGBM.
- Validation & explainability · Produces metrics, diagnostics, and SHAP-based explanations.
Generated evidence
- Preprocessing artifacts
- EDA artifacts
- Modeling artifacts · Predictive results and visual evaluations.
- Stakeholder report · Presentation of pipeline findings for agribusiness decision-making.
docs/Enhancing_Digital_Engagement_for_Agribusiness_Growth.pdf - Preprocessing stage notes
outputs/01-data-preprocessing-and-validation/README.md - EDA stage notes
outputs/02-exploratory-data-analysis/README.md - Modeling stage notes
outputs/03-modeling-and-predictions/README.md
Connections 20
- Python dependencies → Analysis notebook: provides packages
- Conda environment → Analysis notebook: reproduces runtime
- Anonymized local data → Data loading boundary: loads anonymized records
- Data loading boundary → Preprocessing & validation: supplies customer records
- Analysis notebook → Data loading boundary: invokes
- Analysis notebook → Preprocessing & validation: orchestrates
- Preprocessing & validation → Trusted feature set: cleans and validates
- Trusted feature set → EDA & segmentation: supports analysis
- EDA & segmentation → Business feature engineering: informs derived features
- Business feature engineering → Predictive modeling: engineered features
- Predictive modeling → Validation & explainability: predictions and fits
- Preprocessing & validation → Preprocessing artifacts: writes artifacts
- EDA & segmentation → EDA artifacts: writes artifacts
- Validation & explainability → Modeling artifacts: writes metrics and plots
- Preprocessing stage notes → Preprocessing artifacts: documents
- EDA stage notes → EDA artifacts: documents
- Modeling stage notes → Modeling artifacts: documents
- Preprocessing artifacts → Stakeholder report: supports findings
- EDA artifacts → Stakeholder report: supports findings
- Modeling artifacts → Stakeholder report: supports findings