Customer Churn Analysis: R-Shiny App
Introduction:
Analyzing the secrets hidden within customer data is imperative for companies to apply resources and prevent churn. This blog explores the development of an R-Shiny application to help tackle this issue and empower users to keep customers loyal.
Background:
The application used a dataset sourced from Kaggle focused on customer churn within a European banking group. It comprises 10,000 records, 11 feature columns, and one target/output column. Some basic ETL methods were applied before application planning and development. The deliverables for this application were an easy-to-use, visually friendly interface that could interact with the CSV dataset, the ability to filter customer demographics and output a baseline churn rate, and the ability to select different business categories to analyze churn distribution.
Development:
The system overview of the application consisted of a server-side backend and dashboard UI frontend. The server side begins with ETL/preprocessing from the customer churn data files and longitude/latitude European map data (for mapping visuals). Next, a global script runs at the application's start-up to load preprocessed data and define global variables within the server function logic. Finally, the server function interacts with the user interface I/O and routes backend logic to update user graphs and visuals.
User Interface:
This application offers two main functions: Step 1) Sort for customer demographics and baseline the churn rate within the selected group. Some of these inputs available are country/region, gender, age, and credit score. Step 2) Then, the user can choose a business category to be explored for churn distribution. The goal is to identify business categories running well above the churn baseline to investigate further.
Step 1:
Step 2:
Conclusion:
This R-Shiny app provides a simple and functional UI for a two-step customer churn analysis. It was organized into server-side and front-end system components: the server-side handles initialization/ETL of the Kaggle dataset and other backend server logic. The front end handles UI layout design and routings from the user. This application simplifies customer churn analysis, making it a valuable framework for real-world business use cases.