German Credit Data Visualization

Theo Kwanga
Posted on October 17, 2017

Published by Theo Kwanga (NYCDSA), October 15th 2017

Introduction

Banks analyse a myriad of criteria before granting a credit. These range from age, amount and purpose of credit, profession, employment status and a lot more. They also employ sophisticated regression and logistics machine learning algorithms to predict whether the credit applicant is creditable or not.

The aim of this project is to produce an interactive shiny application whose usage is two-folds namely:

Firstly by bank managers to get a preliminary visual insights into the creditability of a credit applicants when analysing a credit demand. Since their predictive models are resource intensive and may run for a long time, this preliminary visualization may be useful in eliminating outright unsatisfactory demands before running models on the rest.

Secondly by credit applicants to estimate their creditability before officially making a demand to their banks. This will help them to tailor their credit demand accordingly or put it off until a time when they attain a favourable credibility score.

The Dataset

The dataset used for this project was obtained from the UCI ML repository (GCD dataset). This dataset was donated to the public by Professor Dr. Hans Hofmann from the Hamburg University in 1994. Getting current credit data is seemingly impossible since this information is highly valuable to any bank and making it public will give away a business advantage.

The dataset contains 1000 observations with 20 variables 14 of which are categorical and an additional column classifying the applicants as creditable or non-creditable. A document describing the variables is also available in the location above. Fortunately there were no missing values in the dataset. Some basic transformation was performed on the dataset like renaming some of the variables and decoding the codes used for the various categories and levels into meaningful names. Some of the categorical variables were transformed to numeric in order to perform mathematical calculations on them and later transformed back to categorical for the visualizations.

Below is the summary of some of the variables in the dataset:

Credit.Amount               Age..years.                          Duration.of.Credit..month.             Creditability
Min. : 250                       Min. :1.000                         Min. : 4.0                                            Creditable: 700
1st Qu.: 1366                  1st Qu.:1.000                       1st Qu.:12.0                                        Non Creditable: 300
Median : 2320               Median :2.000                    Median :18.0
Mean : 3271                    Mean :2.358                        Mean :20.9
3rd Qu.: 3972                 3rd Qu.:3.000                     3rd Qu.:24.0
Max. :18424                    Max. :4.000                         Max. :72.0

Exploratory data visualization

The application makes it possible to visualize the data according to various sub-groupings by highlighting the graphical EDA tab and then using the variable selection menu on the left sidebar panel, this provides better insights into the data. Plotting the sum of the credits against the age groups below show that credit demands from applicants between the ages of 20 and 39 make up for about two-thirds of the total credit  demands.

New car and television / radio are the top reasons for mosts applicants seeking a credit. Unfortunately or fortunately, very few applicants are seeking a credit for education or retraining. This may either means that education and retraining are not worth a credit or that their costs have been covered entirely either by the schools, universities, government or in some other way which seems very unlikely.

Skilled employees and married men / widowed men each are also responsible for almost two-thirds of the credit sum. Female credit takers in the data are on the very low end which beats logic considering the fact that both sexes face the same financial hardships.

Highlighting the credit default proportions tag permits one to view the credit defaults rates among the various sub-groups on the left sidebar panel. Categories that appear on the left of the graph like married men / widowed men, applicants over seventy, in the forties and thirties, and used car / radio / television as reason for the credit have the least default rates i.e these are the most creditable categories whereas categories on the right of the graph like applicants in the twenties, new car / education as purpose of credit, hghly qualified employees and divorced men are the most risky categories i.e most non-creditable (see graphs below).

 

The credit default distribution tab permits one to select multiple criteria to visualize the credit distributions and creditability contrary to the previous tabs where only one variable could be visualized. This could be very useful to a bank manager to identify minute clusters of highly creditable or non-creditable applicants. Applicants can also immediately see if they fall into a creditable or non-creditable category and modify their credit demands accordingly.

Future Scope of Project

The project could be extended to assign weights to the various variables before building and training a predictive model which will simulate if an applicant is creditable or not .

Modern credit analyses employ many additional variables like the criminal records of applicants, their health information, net balance between monthly income and expenses. A dataset with these variables could be acquired or complementary variables added to the dataset. This will make the credit simulations much realistic, similar to what is done by the banks before  a credit is approved.

The shiny application is available on this link: GCD Visualization


About Author

Theo Kwanga

Theo Kwanga

Read more

Leave Responses

Your email address will not be published. Required fields are marked *

No comments found.