Skip to main content

whatstk

Package version

Build StatusGitHub license GitHub stars GitHub forks

whatstk is a Python module for WhatsApp chat group analysis and distributed under the GPL-3.0 license.

The project was started in December 2016 by lucasrodes and albertaparicio.

⭐ Please star our project if you found it interesting to keep us motivated 😃!

Installation

Tested on Python 3.7

pip install whatstk

Getting Started

Obtain a dataframe from your chat log file

Export your WhatsApp chat using your phone and send it to your computer. Make sure to choose the correct format of the header. In the example here, the header (see example.txt) uses the syntax '%d.%m.%y, %H:%M - %name:'. Header example: 07.08.2016, 19:30 - Misty:

from whatstk.core import WhatsAppChat

filename = 'chats/example.txt'
# [IMPORTANT] Choose header format accordingly
hformat = '%d.%m.%y, %H:%M - %name:'
chat = WhatsAppChat.from_txt(filename, hformat)

Plot the cumulative messages sent by day

Once you have your chat object, you can visualise the cumulative number of messages sent per day using the following code

from whatstk.core import interventions
counts = interventions(chat, 'date', msg_length=False)
counts_cumsum = counts.cumsum()

# Plot result
from plotly.offline import plot
from whatstk.plot import vis
plot(vis(counts_cumsum, 'cumulative characters sent per day'))

Note: More examples to come soon.

Contribute

We are very open to have collaborators. You can freely fork and issue a pull request with your updates! For other issues/bugs/suggestions, please report it as an issue or text me.

Metadata

Release files for whatstk 0.1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whatstk 0.1.11
File Size Uploaded Provenance Actions
whatstk-0.1.11.tar.gz 27.9 kB Without provenance Details for whatstk-0.1.11.tar.gz

Release files / whatstk-0.1.11.tar.gz

Download URL whatstk-0.1.11.tar.gz
Size 27.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9411074614e899d1d67c58a7bd9027c37089e13c259ee9a37340ff445d523a20
BLAKE2b-256 checksum
How to use checksums
0a3f5cf589495979261864f40d33313a770791e649a1fe3fba297551bb23a8de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2

Security for whatstk 0.1.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.11 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page