Public Hospital Coverage and Candidate Testing Clinic Locations in Greater Perth
Network analysis and spatial optimisation for Greater Perth, using SA2 demand points weighted by 2021 Census population, spatial data validation and candidat...
Python Portfolio Project | End-to-End Customer Churn Analysis
Banks face a costly and persistent problem: customers leave without warning. As a retention manager, you might only see monthly reports that arrive too late. Key questions include:
This was the business problem I set out to solve.
I built a four-stage Python analysis pipeline that transforms raw customer data into actionable retention insights. The solution moves from data exploration to polished dashboards and prioritised recommendations — demonstrating a full analytical workflow.
Notebook: 01_setup_exploration.ipynb
CLIENTNUM identifierAttrition_Flag (0 = Retained, 1 = Churned)Key finding: 16.1% churn rate — 1,627 customers left out of 10,127.
Notebook: 02_cleaning_transformation.ipynb
Encoding applied:
| Column | Method | Detail |
|---|---|---|
| Attrition_Flag | Binary | Existing Customer = 0, Attrited Customer = 1 |
| Education_Level | Ordinal | Uneducated (0) → Doctorate (6) |
| Income_Category | Ordinal | < $40K (0) → $120K+ (5) |
| Card_Category | Ordinal | Blue (0) → Platinum (3) |
| Gender | Binary | M = 1, F = 0 |
| Marital_Status | One-hot | Dummy variables, drop first |
Features engineered:
| Feature | Meaning |
|---|---|
| Trans_Freq_Ratio | Transaction activity relative to tenure |
| Inactivity_Rate | Proportion of year spent inactive |
| Contact_Intensity | Contact frequency relative to tenure |
| Utilisation_Band | Utilisation ratio binned: Very Low / Low / Medium / High |
Output: data/processed/bank_churners_clean.csv — 10,127 rows × 30 columns
Notebook: 03_analysis_insights.ipynb
Techniques used:
Top 5 churn predictors:
| Rank | Feature | Importance |
|---|---|---|
| 1 | Total_Trans_Amt | 17.7% |
| 2 | Total_Trans_Ct | 14.5% |
| 3 | Total_Ct_Chng_Q4_Q1 | 11.2% |
| 4 | Total_Revolving_Bal | 10.5% |
| 5 | Total_Relationship_Count | 7.5% |
Insight: Transaction behaviour dominates churn prediction over demographics.

Transaction amount, transaction count and the Q4–Q1 change in transaction count are the three strongest predictors, together accounting for 43.4% of the model’s feature importance.

Total transaction count shows the largest difference between the groups (Cohen’s d about −1.1, higher in retained customers), while contact frequency and inactivity are higher among churned customers.
Notebook: 04_visualisation_storytelling.ipynb
Outputs:
| Output | Description |
|---|---|
| Executive Dashboard | KPI cards, churn split, transaction comparison, distribution charts |
| Top Churn Drivers Chart | Ranked horizontal bar chart with colour-coded importance |
| Demographic Breakdown | Interactive Plotly and static PNGs |
| Recommendations Card | Prioritised business actions in a visual card |
globe-bank-retention-analysis/
├── data/
│ ├── raw/
│ └── processed/
├── notebooks/
│ ├── 01_setup_exploration.ipynb
│ ├── 02_cleaning_transformation.ipynb
│ ├── 03_analysis_insights.ipynb
│ └── 04_visualisation_storytelling.ipynb
├── outputs/
│ ├── figures/
│ └── reports/
├── .gitignore
├── README.md
└── requirements.txt
| Category | Tools |
|---|---|
| Language | Python 3.13 |
| Data manipulation | pandas, numpy |
| Visualisation | matplotlib, seaborn, Plotly |
| Statistical analysis | scipy (Welch’s t-test, Cohen’s d) |
| Machine learning | scikit-learn (Random Forest) |
| Environment | Jupyter Notebook, VS Code |
| Priority | Finding | Recommended Action |
|---|---|---|
| HIGH 🔴 | Low transaction activity | Trigger automated re-engagement campaigns when transaction count drops below the 3-month rolling average |
| HIGH 🔴 | Inactive customers churn | Implement 60-day inactivity alerts with personal outreach |
| MEDIUM 🟠 | Fewer bank products | Cross-sell complementary products to single-product customers |
| MEDIUM 🟠 | High contact frequency | Flag customers with 3+ contacts in 12 months for proactive satisfaction review |
| LOW 🟡 | Platinum card holders churn most (25.0%) | Review card benefits and product fit for Platinum holders |
Technical lessons:
Design lessons:
Process lessons:
| Built with Python 3.13 | pandas | matplotlib | seaborn | Plotly | scikit-learn | Jupyter | VS Code |
| Project Duration: March 2026 | Status: Complete and Portfolio-Ready |
Network analysis and spatial optimisation for Greater Perth, using SA2 demand points weighted by 2021 Census population, spatial data validation and candidat...
Spatial analysis of wheat yield and nitrogen treatments in ArcGIS Pro, using Moving Window Kriging, Local Bivariate Relationships and pairwise Z-tests on a s...
End-to-end Python analysis of customer churn across 10,127 bank customers, covering EDA, feature engineering, statistical analysis and Random Forest modelling.
Interactive Power BI dashboard for training analytics, built on a star schema data model with DAX measures.
SQL analysis of sales and customer data for H+ Sport, a fictitious nutrition and activewear company, focusing on mineral water sales and data accuracy.
SQL analysis of a hospital database covering patient demographics, hospital stays, outpatient visits, lab results and risk factors to support hospital operat...