- Download your Facebook messenger history from your Facebook settings. More here.
- Unzip your data into the directory of your choice.
- Identify a person whose chat history you want to analyze (if you want to run analysis for a single person) and copy the path to his subdirectory, or copy the path to the root data directory.
- We will refer to this folder's path as ${FOLDER}.
- Clone this repository and change directory into it.
git clone https://github.com/Kodnot/facebook-message-analysis.git && cd facebook-message-analysis
- Install any dependencies.
pip install -r requirements.txt
- If you get an NTLK download error, use this command to resolve the issue. It will tell NTLK to download the appropriate stopwords file.
python
>>> import nltk
>>> nltk.download('stopwords')
>>> quit()
- Launch the bokeh app locally, passing the folder containing the conversation files as an argument
bokeh serve --show fbmessages/ --args **${FOLDER}**
In a few seconds, you should get some nice interactive visualizations. Here's a demo of what the visualizations look like: