How it works

How This Dashboard Works

This site answers one simple question: which customers may leave soon, and what clues make the model think that?

What The Site Shows

The dashboard shows which customers may stop using a service. In data projects, this is often called churn. Here, the UI mostly says leaving because that is easier to understand.

It highlights customers most likely to leave, the monthly money connected to those customers, and the biggest reasons the model sees.

How To Read The Numbers

A high chance of leaving means the model found a customer who looks similar to customers who left in the past. It is a warning sign, not a promise.

The reasons chart shows which customer details mattered most to the model. It helps explain the prediction, but it does not prove one detail caused the customer to leave.

How The Risk Score Is Made

Python cleans each customer row. It turns numbers like monthly bill and months as customer into model-ready values. It also turns words like contract type and payment type into simple 0/1 columns.

The model gives each customer a chance of leaving from 0% to 100%. The app then labels that score as Low, Medium, or High risk.

Machine Learning Used

The project uses logistic regression from scikit-learn. That means the model predicts one of two answers: the customer leaves or the customer stays.

It is used because it is quick, easier to explain than many models, and gives a percentage chance of leaving. That makes it a good first model for a clear business dashboard.

How Airbyte Is Used

Airbyte Cloud moves the public customer file into the Neon database.

Airbyte does not train the model. Its job is to load the data. After that, Python cleans the data, trains the model, and saves dashboard-ready tables.

Step-by-Step Flow

1

Collect the data

Airbyte reads the public customer file and loads it into Neon PostgreSQL.

2

Store raw records

The database keeps the original customer rows so Python has a clean starting point.

3

Clean and prepare

Python cleans column names, fixes missing values, and prepares useful customer details.

4

Train the model

Python trains a model that estimates each customer's chance of leaving.

5

Save dashboard tables

The pipeline saves tables for main numbers, customer predictions, and leaving reasons.

6

Explain the results

The dashboard shows the results, and the chatbot answers questions using those tables.

Tools Used

Airbyte CloudMoves the public customer file into the database.
Neon PostgreSQLStores the raw data, clean data, predictions, and dashboard numbers.
GitHub ActionsRuns the Python data job in the cloud.
PythonCleans the data and trains the leaving-risk model.
pandasHelps Python clean and reshape customer rows.
scikit-learnBuilds the prediction model.
Next.jsBuilds the dashboard pages and API routes.
VercelHosts the live web app.
OpenAI APIHelps the chatbot answer questions in plain language.

Database Tables Used

raw.customer_churnOriginal customer rows loaded by Airbyte.

analytics.customer_healthClean customer rows used by the dashboard.

analytics.churn_predictionsOne row per customer with chance of leaving and risk level.

analytics.kpi_summaryMain dashboard numbers.

analytics.model_evaluationCounts that explain the model score cards.

analytics.churn_driversCustomer details that most affected the model.