A web app that lets you investigate the Twitter customer service of your service provider and see how it stacks up against the industry's best. CLICK HERE to check to check it out!
In a nutshell
I used Natural Language Processing to analyze twitter conversations between mobile service providers and their customers to compute several customer satisfaction metrics for these companies over a period of three months. This information was used to build an interactive web app that allows a user to comprehensively compare the customer service of any provider with competitors and help them choose the best provider for their needs.
Data collection, cleaning and restructuring
- Downloaded a dataset of over 3 million customer service related tweets spanning 108 companies over 7 industries.
- By chaining together tweets that belonged to a unique conversation, I was able to generate 800 thousand coherent conversations out of the 3+ million tweets (see 01_convo_chains.ipynb).
Feature Engineering and Analysis
Using the Google Cloud Natural Language API, I performed sentiment analysis to generate a sentiment score between -1 (very negative) to +1 (very positive) for every tweet in the corpus (see gcp_sentiment.py, 02_sentiment.ipynb and 03_adding_sentiments_to_tweets_csv.ipynb).
The raw sentiment scores were used to engineer higher order features (satisfaction metrics) such as rate of issue resolution and customer sentiment boost for individual conversations (see 04_create_conversations_table.ipynb).
In order to study the evolution of satisfaction metrics with time, I binned and aggregated the metrics in one hour blocks to get metric time series for each mobile service provider (see 05_creating_times_table.ipynb).
The time series were further analyzed over two time periods (two weeks and two months) in order to obtain satisfaction metrics for the companies over their recent vs less-recent past and rank them accordingly (06_averages_over_time.ipynb).