Skip to main content

📱Demystifies your messages and allows for easy analysis and visualization of conversations.

Project description

Demesstify Logo

Demystify your messages.


GitHub last commit GitHub license PyPI Made with Python


demesstify is a Python library that demystifies your messages and allows for easy analysis and visualization of conversations.


Table of contents

Installation

demesstify can be installed via pip:

pip install demesstify

The source code can be viewed on GitHub here.

Dependencies

demesstify depends on the following packages:

Package Description
pandas For easy manipulation of message data
matplotlib For visualizations
wordcloud For creating wordclouds
calmap For creating calendar heatmaps
emoji For working with emojis
lorem For creating dummy text

Example usage

Basic example

First, import the demesstify library.

import demesstify as dm

Next, create the iMessages object.

For this example, we will use the from_random class method, which allows us to randomly generate the specified number of messages. These messages will be populated using lorem ipsum dummy text.

imessages = dm.iMessages.from_random(total_messages=10)

Now that we've created the iMessages object, we can analyze the messages.

For example, we can find the 3 most frequently used emojis and the number of times they appeared in the messages.

imessages.emojis.get_most_frequent(3)

Next, we can determine the total number of messages that were exchanged.

imessages.sent.get_total()

We can also find the average number of messages received per day.

imessages.received.get_average_per_day()

Then, we can calculate the number of times velit appears in the messages.

imessages.all.get_count_of_word('velit')

For even more analytics, we can create a MessageCloud object.

Because the MessageCloud object is essentially a wrapper around the WordCloud object of the wordcloud library, we have access to its parameters as well. This way, we can specify exactly what time of words we want to include in the statistics.

cloud = dm.MessageCloud(imessages)
cloud.min_word_length = 3
cloud.repeat = False                # will not repeat any words
cloud.collocations = False          # will not include pairs of words
cloud.include_numbers = False       # will not include numbers
cloud.generate()

With the MessageCloud object, we can see which words were used the most frequently and how often.

cloud.words.get_most_frequent(5)

Future improvements

  • Add support for identifying attachments
  • Add support for other message sources, e.g. Android or social media platforms
  • Add more interesting calculations and analyses
  • Incorporate sentiment analysis
  • Add unit tests

Authors

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

demesstify-0.0.2.tar.gz (22.0 kB view hashes)

Uploaded Source

Built Distribution

demesstify-0.0.2-py3-none-any.whl (24.2 kB view hashes)

Uploaded Python 3

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