This project visualizes Facebook Messenger data.
I also experiment with TDD, frameworks like nltk
, and whatever else is interesting when I spend time on this project.
- Create a new virtual environment with
virtualenv venv
. - Source the virtual environment with
source venv/bin/activate
. - Within the virtual environment, install project requirements with
pip install -r requirements.txt
. - Create an output directory for the program's
-o
flag, such asout/
. - Run the program with:
python Main.py -i test/Messages/conversation_skeleton.json -o out/ -w util/100_Common_English.txt
-i
- Input file, this is.json
sourced from Facebook Messenger.-o
- Output directory for artifacts.-w
- A wordlist of terms to ignore, if desired.
src
contains:
Conversation.py
- An exchange between two or more participants, this class manages instances of theMessage
class and keeps track of running totals about the conversation history.FileIO.py
- This project uses.json
and.txt
files. This file defines a common way to do that in the context of this project (and maybe re-invents the wheel).Main.py
- Given input files as arguments, generate graphs and text logs. Mostly an imperative set of instructions that leveragesFileIO
,Conversation
, andVisualizer
.Message.py
- Represent messages parsed from.json
as a Python class.Visualizer.py
- Functions that wrap calls tomatplotlib.pyplot
.
test
contains unit tests and sample .json
input for use by the test suite.
Run this locally with: python -m unittest discover -s MessengerVisualizer/test -t MessengerVisualizer
util
contains:
100_Common_English.txt
- A wordlist of the 100 most-common english words.Custom_List.txt
- A wordlist with additional words to filter out.ClearDirectory.sh
to delete the contents ofoutput/
between executions.MessageType.py
- An enum for MessageType that doesn't do much (yet).