OfirKP / Whatsapp-Net

Generate a network graph of connections from your WhatsApp groups data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Whatsapp Net

This project creates a network graph of connections out of your WhatsApp groups' participants data.

Prerequisites

Make sure you have installed all of the following prerequisites on your machine:

Downloading & Installing

  1. Clone this project
$ git clone https://github.com/OfirKP/Whatsapp-Net
  1. In the application directory ($ cd Whatsapp-Net), run this command:
$ npm install
  1. Install required python packages either by using 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

Usage

Scraping

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.

Generating Graph (GEXF file)

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 script

Visualizing data

RECOMMENDED: use a software like Gephi that allows graph visualization, taking GEXF files as input.

💻 Technologies Used

License

This project is licensed under the GNU General Public License v2.0 . See License for more info.

About

Generate a network graph of connections from your WhatsApp groups data

License:GNU General Public License v2.0


Languages

Language:JavaScript 50.5%Language:Jupyter Notebook 39.1%Language:Python 10.3%