Nigerian Bank Twitter Data

Research Project

A friend of mine from the Pan African University, which has a campus inside my university, introduced me to his Nigerian buddy who needed help gathering Tweets to Nigerian Banks for his Masters Thesis.

The data comprises of direct tweets mentioning the banks’ Twitter handles. With the inclusion of indirect mentions and replies, the dataset swells and most of the data was found to be of low impact to the overall objective.

The overall objective in this case was sentiment analysis on the customer interactions with the banks.

Dataset

The dataset has 5 columns: Date, text, Retweets, Favourites and Permalink

I had the option of adding username and mentions but I was advised against it by Nigerian buddy since what he really wanted was text and date data. However, [we/you] can extract those from permalink and text entries respectively.

The dataset contains tweets from 5 banks: First Bank, United Bank of Africa, Zenith Bank, Access Bank and GT Bank

The data spans tweets from 31st December 2018 to 1st January 2017

Download

You can find a copy of the data here as a zip file.

Note 1

The delimiting character used was "\x1f" which is one of the ascii control characters for delimiting as seen here.

I quickly realised the issue with commas, tweet text contains (A lot of) commas. I then tried the semicolon but lo and behold, there are a couple of Nigerians who use semicolons in their tweets (Abeg oga, What for ?) .

I then turned to using a non-printable character for delimiting.

Note 2

Best way to work with the dataset in through pandas. Preferrably in a Jupyter Notebook. To load the dataset into a pandas dataframe run

1
2
3
import pandas, csv

dataframe = pandas.read_csv('path_to_file.csv', delimiter='\x1f', quoting=csv.QUOTE_NONE)

I tried loading it into GSheets because of how interactive it is but it just wouldn’t accept my delimiter (Pls hlp) so I ended up using qgrid which worked beautifully.

I’m no longer on Twitter so if anyone needs to reach out, feel free to ping me on karanja@karanjamutahi.com

Have fun