Data Visualization of U.S Retail Consumer Banking Complaints

Posted on Aug 8, 2016
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Objective and Motivation

All of us have a relationship with a financial institution. At a minimum, most of us have a checking account and a credit card, while others might have various loan related products. Irrespective of the type of product, retail consumers have long term relationships with their banks / financial institutions. The app described here provides a tool to analyze the data on the effectiveness of these financial relationships and compares these across banks and other financial service providers.

One of the commonly used industry metrics for measuring consumer satisfaction is to look at how consumer complaints are resolved over time. This Shiny app does just that.  It can be used by the general public / consumers to look at the complaint volume and uncover insights around delayed, disputed responses and their trends over time. These insights can help consumers be better prepared to assess the relative performance of financial institutions.

The Shiny app can be accessed at

Dataset & Cleaning

The data comes from the website of the Consumer Financial Protection Bureau (CFPB) which is a Federal agency responsible for protecting the rights of retail consumers. The Consumer Complaint Database (CCD) is a centralized repository that stores the log of various complaints filed by the consumers starting 2011. The data is available in the form of a text file and includes the following information: type of product, issue faced by the consumer, whether the complaint was resolved on time, whether the response was disputed by the consumer.

The analysis focuses on years 2012 to 2015, the only years for which CCD has complete data.  Minimal data manipulation was required to standardize variable names, perform data type conversion and derive the Complaint date variable.

The R code is available in my GitHub repository :

Overview of the Consumer Complaints Data Analysis App

There are 6 tab pages in the application:

  • Complaints trend tab provides an overview of the volume of complaints by year;
  • Response trend tab shows the trend in responses provided by the firms (including percentage of delayed and disputed responses);
  • Top Issues tab shows the list of top 5 issues based on the volume of complaints;
  • Companies tab displays the response metrics by firms;
  • Map tab provides a visual depiction of of the response metrics by state;
  • Data tab shows the consumer complaint data in a tabular format.

The Welcome page provides a basic overview of the app and some background around the consumer complaint database.



Complaints Data Trend

The Complaints Trend page displays the trend in the number of complaints filed based on the financial products or services offered by the firms. This chart depicts a rising trend in the complaint volume for most of the products except mortgage. The user can select multiple products from the checkbox and the plot will refresh to display the trend for those products. We can also see that Mortgage and Debt Collection account for almost 50% of the total number of complaints filed.

Complaint Trend


Response Data Trend

The Response Trend graph displays the trend in the responses received from the financial institutions based on the products selected. The user can select the products to compare the trend in delayed responses, disputed responses and responses that were resolved with monetary relief. The percent of delayed responses were below 2% for most of the products except Debt Collection which had more delayed responses. Overall, the delays were found to be within reasonable limits considering the volume of complaints handled. The R code used for rendering the plot on the server is shown below.

Response Trend - Delayed

Looking at the Disputed responses plot, one can immediately see that the percent of disputed responses jumps to low 20's compared to the 2% to 6% range for Delayed response plot. On an average, 23% of the responses were disputed across products and there was a strong relation between the way a complaint was resolved and a response being disputed. In general, consumers tend to dispute the bank's response if their case was closed without any relief.

Response Trend - Disputed

Top Issues

This graph displays the top 5 issues faced by consumers for a given product and year. In most cases these top 5 account for 60% of all complaints for that product.  For Mortgage and Debt Collection the most common complaint are:  Loan modification, foreclosure, escrow payments and attempts to collect debt that are not owed.

Top Issues



This page displays the response metrics (Delayed & Disputed) for a given product filtered by the bank tier and the year. We can see that the top tier banks, Bank of America, JPMorgan Chase and Wells Fargo, have on average a 20% dispute percentage across the board. The Tier 2 and 3 institutions have a relatively higher average dispute percentage compared to the big three Tier 1 banks.   This may be due to the fact that the larger banks have established procedures in place and have the ability to assign more resources to handle complaints.

Companies complaint

Maps & Data

The Maps page provides a country wide visualization of the response related metrics that we have seen in previous pages. The Data tab displays the consumer complaint data that was used for this analysis. The user can hover the mouse over the states and the graph displays the metrics for that state. In general, states that are most populous such as California, Texas, New York and Florida have a higher volume of complaints indicating those states also have a higher proportion of account holders.

Also, states that have a relatively high foreclosure rate, tend to have higher mortgage related responses being disputed. Last but not the least, states that have a higher percentage of senior citizens typically tend to have a higher number of cases being disputed.

State complaint volume

The R code used for rendering the map on the server is shown below. All the plots and maps were created using googleVis package in R.



This analysis helps uncover several insights about the typical issues faced by the consumers and the overall trends in the responses provided by financial institutions.

  • The banks and lending companies seem to be handling the complaints in a timely manner since the average % of delayed responses is less than 3%.
  • Mortgage and Debt Collection related complaints account for almost 50% of the total volume of complaints filed. The banks can bring down the number of complaints significantly by focusing on the above products. There seems to be some scope for improvement in terms of enhancing the processes and streamlining the procedures that could help alleviate the mortgage / debt collection related issues.
  • All financial institutions could improve on their communication in addressing the complaints filed by senior citizens. It appears that senior citizens tend to dispute the responses more than other segments of the population which could be due to the difficulty in interpreting bank's response.
  • The banks and other consumer facing financial service providers could do a better job in managing the consumer's expectations. People tend to dispute more when their issues are resolved without any monetary relief and this is where the banks can do a better job in setting and managing expectations so that both parties are on the same page right from the time a complaint is filed.

Once the above factors are addressed, it will help reduce the complaints significantly and make the financial markets a better place for the consumers.


About Author

Nanda Rajarathinam

Nanda has been applying his analytical, problem-solving and team management skills, at a leading consulting firm, focusing on data engineering, solution architecture and analytics. He has a strong background in Build, implementation and performance optimization of Extract, Transform...
View all posts by Nanda Rajarathinam >

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI