Made graphs a little bit more prettier, also added the option to display stats from users on the graph (not shown in pic)
Able to generate basic pie charts to demonstrate the chat distribution across the days
Able to generate basic graphs that depict the messaging frequency over time
Able to generate wordcloud with masks, simple by adding the -m flag
To use custom masks, replace the mask_color.png in the breakdown folder to the image of your choice
Able to extract conversations between two people
Able to generate a wordcloud
Analayze and visualize your facebook converstaions between you and someone!
- Who initiates conversation
- Mouse click events for the graphs
matplotlib, wordcloud, ggplot is currently used to aid visualization. To install them, simple execute
pip install matplotlib
pip install wordcloud
pip install seaborn
Get a copy of the repository and put the messages.htm that you downloaded from facebook into fb-convos/data/messages.htm. For more info on downloading your facebook data goto https://www.facebook.com/help/131112897028467/
git clone https://github.com/kendricktan/fb-convos.git
cd fb-convos
cp [your messages.htm location here] data/messages.htm
Before doing anything we first need to extract information from the downloaded message data dump (aka messages.htm)
python breakdown/extract.py data/messages.htm data/out.csv [User1's name] [User2's name]
If you want a simple wordcloud generated whilst formatting it, simply add the -wc flag
python breakdown/extract.py -wc data/messages.htm data/out.csv [User1's name] [User2's name]
For more information simply invoke the --help flag
python breakdown/extract.py --help
To generate a wordcloud from add the formatted data, simply invoke
python breakdown/analyze-wordcloud.py data/out.csv
For wordcloud which combines messages from both users simply invoke the -ob
(output both) flag
python breakdown/analyze-wordcloud.py -ob data/out.csv
To specify a specific year (for example, 2014) do:
python breakdown/analyze-wordcloud.py -y 2014 data/out.csv
To generate a masked wordcloud (with the default image of a cat), run:
python breakdown/analyze-wordcloud.py -m data/out.csv
To save the files and don't display the masked wordclouds, run:
python breakdown/anaylze-wordcloud.py -m -dd -s [FOLDER LOCATION] data/out.csv
Again, for more information invoke the --help flag
python breakdown/analyze-wordcloud.py --help
To generate a graph of the message frequency against time, simply invoke
python breakdown/analyze-msg-freq-grah.py data/out.csv
To specify a start date for the graph (forcefully start displaying from that date), simply invoke the -sd
(start date) flag
python breakdown/analyze-msg-freq-grah.py -sd 2015-09-20 data/out.csv
To specify a end date for the graph (forcefully display until that date), simply invole the -ed
(end date) flag
python breakdown/analyze-msg-freq-grah.py -sd 2015-09-20 -ed 2016-01-01 data/out.csv
To display all graphs (a.k.a graphs from user1 and user2), add the -da flag
python breakdown/analyze-msg-freq-grah.py -da -sd 2015-09-20 -ed 2016-01-01 data/out.csv
To manually specify a user's name user the -u1 or -u2 command (for the -da output), e.g.
python breakdown/analyze-msg-freq-grah.py -u1 USER1 -u2 USER2 -sd 2015-09-20 -ed 2016-01-01 data/out.csv
To generate a pie chart of the distribution of chat across the days, simply invoke
python breakdown/analyze-msg-daily-piechart.py data/out.csv