This code is used with data downloaded from facebook to generate statistics in form of graphs.
Download conversation data from here.
Data format needs to be in JSON. For smaller file (and faster request process) select low quality media if you don't want media from groups for personal use (photos, videos).
-
Process this file(s) with
fix_stupid_facebook_unicode_encoding.py
in console. (writefix_stupid_facebook_unicode_encoding.py
without argument for help) -
Insert all generated files into 1 folder in the same directory as folder
src
. (name folder as you like and write it's name inmain.py
)
-
Process fixed file(s) with
src/main.py
in console. (writesrc/main.py
without argument for help) -
Good work! now you have stats for your messenger conversations.
If you have more groups that you want to get statistics, then:
- Create folder messages and inside create 1 folder for each of your group files
- Run script
fix_stupid_files.sh
- Run script
generate_all.sh
- voilà, now you have folder
img
with all your charts with stats.
Example file structure
.
└── messages
├── group1
├── group2
├── group3
└── group4
Right now i created modules for:
- All sended messages
- All reactions given to others
- All received reactions
- Counting specific reaction
- Counting specific word
- Counting all emoji used in conversation
- Count sended images, gifs
- Count sended files
- Count deleted messages
- Count sended links to websites
- Count Added and removed members
Message file construction:
- participants
- name
- messages
- sender_name
- timestamp_ms
- type
- is_unsent
Message types:
- Call
- call duration
- Generic
- photos
- uri
- creation_timestamp
- videos
- uri
- creation_timestamp
- thumbnail
- uri
- gifs
- reactions
- reaction
- actor
- photos
- Share
- Subscribe
- Users
- name
- Users
- Unsubscribe
"Weird things":
- Pinging is in Generic (@someone)
- when someone join call then it's Generic (someone joined video chat)