Generate a network graph of connections from your WhatsApp groups data
This project creates a network graph of connections out of your WhatsApp groups' participants data.
Make sure you have installed all of the following prerequisites on your machine:
$ git clone https://github.com/OfirKP/Whatsapp-Net
$ cd Whatsapp-Net
), run this command:$ npm install
requirements.txt
:$ pip install -r requirements.txt
or by installing them directly:
$ pip install networkx==2.5 tqdm==4.50.2 matplotlib==3.1.1
To generate a json file with your groups' data, run the following command:
$ node scrape.js
A browser window should open. If you're not connected to WhatsApp web, connect by scanning QR code.
Wait until json file starts downloading.
Then, run the python script:
$ python generate_graph.py <data1.json> <data2.json> ...
Optional arguments:
-c
, --contacts
: paths to contacts (.json) files, so that the first file overrides names
of identical contacts in other files-o
, --output
: path to output GEXF file (default is graph.gexf
)-h
, --help
: help message to get more info about the usage of the scriptRECOMMENDED: use a software like Gephi that allows graph visualization, taking GEXF files as input.
This project is licensed under the GNU General Public License v2.0 . See License for more info.