Skip to main content

Whatsapp chat analyzer with Python

Project description

Wtp

Wtp is a tool to analyze Whatsapp chats.

This tool uses the chat history (that can be acquired by the Whatsapp option 'Export chat') and displays in graphs information such as:

  • number of messages sent by each user;
  • number of characters sent by each user;
  • number of messages sent at each hour;
  • etc.

chat

Example

from Wtp import *

wtp = Wtp("path\\to\\WhatsApp Chat with Some Group or Someone.txt")
wtp.plot_msgs_by_users()

out

Installation

> pip install Wtp

There is an option to download the Wtp.py file and run:

> python Wtp.py [-h] -f FILE [-i] [-e] [-u USERS] [-r HIDE] [-m_users] [-w_users] [-c_users] [-m_user_w MSGS_USER_W] [-m_users_w] [-m_chat] [-m_chat_w]

Documentation

  • Common methods flags:

    • path_chat: path to the chat file (.txt);
    • path_import: path to the JSON file;
    • i: when True, initialize the object by the given JSON file. Default=False;
    • _u_: number of users to show in graph. Default=All;
    • hide: when True, display name/number of users in graph. Default=False.
  • Methods:

    • plot_msgs_users(_u_=None, hide=True): plot # of msgs by each user;
    • plot_words_users(_u_=None, hide=True): plot # of words by each user;
    • plot_charac_users(_u_=None, hide=True): plot # of characters by each user;
    • plot_user_msgs_each_day(id, hide=True, t="u: 1"): plot # of msgs of a given id by each day of the week;
    • plot_users_msgs_each_day(_u_=None, hide=True): plot # of msgs by each user by each day of the week;
    • plot_chat_msgs_each_day(): plot # of msgs by each day of the week;
    • plot_chat_msgs_each_hour(): plot # of msgs at each hour;
    • export(name = "data.json", use_pprint = False): export all data into a JSON file;
    • import_data(name = "data.json"): import all data from a given JSON file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Wtp-0.0.6.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

Wtp-0.0.6.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file Wtp-0.0.6.1.tar.gz.

File metadata

  • Download URL: Wtp-0.0.6.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Wtp-0.0.6.1.tar.gz
Algorithm Hash digest
SHA256 a8e57cbb8de39d9037a0de84bfeacabcaffbaf10f59db8e0483b897a842d3738
MD5 717b6a02fb64807db28fed17d000b089
BLAKE2b-256 81e047a6acc2a906a688e1b0405a574fc52783263b4e7438c323f9f37f34af9f

See more details on using hashes here.

File details

Details for the file Wtp-0.0.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for Wtp-0.0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8bb8df0bfcb6732a0cdd70ce084aac41a64b00b7107f65b4ecc80548fe919d5c
MD5 4b3b69f92924045d6bb9cb07239ad61d
BLAKE2b-256 3c8b634bb994971e38cdb66017e0d583b7898ed930b4e8cbd140ad93402bd346

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page