Skip to main content

A library which allows users to easily run simple Data Analytics on their Facebook Messenger Data

Project description

FacebookMessengerAnalyzer

A library which allows users to you easily run some simple Data Analytics on their Facebook Messenger Data

https://github.com/zegarmm001/FacebookMessengerAnalyzer

Introduction

To install simply open your Python Temrinal and pip install

python -m pip install FacebookMessengerAnalyzer

Getting Started

You will need to download your Facebook Messenger Data! Is can be easily done by visiting:

https://www.facebook.com/dyi/?referrer=yfi_settings

MAKING SURE YOU SELECT FORMAT: JSON as this is the data format this library analyzes. You can select whatever data you would like to download but we are most concerned with the "Messages" tab.

Once you have Selected your desired Date Range, Format =JSON and whatever quality suits you, select Create file. It took me a few hours before I got an email from Facebook saying my data is ready to download, so beware.

Once downloaded, you will need to uncompressed your data using coming like 7Zip or WinRaR.

Now, depending where you uncompresed your data, find your way to that location and navigate to .\messages\inbox\

You will see a long list of folders at this location each corresponding to a different chat! Decide which chat you want to analyze and copy its path. This is all you need to start analyzing!

Now open your favorite python IDE.

from FacebookMessengerAnalyzer import IndividualMesseges

PATH_TO_THE_FACEBOOK_DATA = r'C:\Users\Test\Facebook\messages\inbox\samsmith'

Facebook_messages_object =  IndividualMesseges(PATH_TO_THE_FACEBOOK_DATA )

#Get a quick description of your chat
Facebook_messages_object.describe()

There is a tests folder which contains a FacebookMessengerAnalyzer_test.py file with sample data which you can play with!

Plotting

from FacebookMessengerAnalyzer import IndividualMesseges

PATH_TO_THE_FACEBOOK_DATA = r'C:\Users\Test\Facebook\messages\inbox\samsmith'

Facebook_messages_object =  IndividualMesseges(PATH_TO_THE_FACEBOOK_DATA )

#plot of messages sent each month
Facebook_messages_object.plot_counts()

#plot the sentiment of the conversations aggregated by month
Facebook_messages_object.plot_sentiments()

What is Sentiment Analysis?

VADER Sentiment Analysis. VADER (Valence Aware Dictionary and sEntiment Reasoner) is a lexicon and rule-based sentiment analysis tool that is specifically attuned to sentiments expressed in social media, and works well on texts from other domains. It provides a number between -1 and 1 which indicates the sentiment ("attitude"/"happiness") of the messages. The VADER lexicon is an empirically validated by multiple independent human judges, VADER incorporates a "gold-standard" sentiment lexicon that is especially attuned to microblog-like contexts.

This library will run this and visual your results with on line of code! (assuming you have initialized a object as shown earlier)

Facebook_messages_object.plot_sentiments()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

FacebookMessengerAnalyzer-0.0.3.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

FacebookMessengerAnalyzer-0.0.3-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file FacebookMessengerAnalyzer-0.0.3.tar.gz.

File metadata

  • Download URL: FacebookMessengerAnalyzer-0.0.3.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for FacebookMessengerAnalyzer-0.0.3.tar.gz
Algorithm Hash digest
SHA256 7f47bcfed01d5286466eeaa9f5df95d279e1835233eb07698f7e313d3a6ad3e7
MD5 2e19becd3a493c79f905c386c2861a21
BLAKE2b-256 562692c364e214ce28ef970f9c28b8b8dee5cf0bdc3ac5413e27ba3232fcdd51

See more details on using hashes here.

File details

Details for the file FacebookMessengerAnalyzer-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: FacebookMessengerAnalyzer-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for FacebookMessengerAnalyzer-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ceaec0fcf1b73c342bdf165c17c1d7089b71164f47904015e8c7c992ce815c63
MD5 176a8f9d7894cbd9ebf5cd3ec203e556
BLAKE2b-256 9ca65cf115295beb47c1611ee90afd785566ee3849c5ad5e4bbac8bb56602e00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page