/sms-analysis

Python/IPython code to analyze one's text messages. Intended to work out of the box, see README for details.

Primary LanguagePython

sms-analysis

Python/IPython code to analyze one's text messages. Intended to work out of the box.

Author: Michael Dezube <michael dezube at gmail dot com>

For further discussions: Join the chat at https://gitter.im/mdezube/sms-analysis

Overview of code

This code will:

  1. Find your latest iPhone sync (currently only supports doing this automatically on Macs), for PCs edit table_connector.py to find the file
  2. Load up the messages database and address book database locally
  3. Merge the databases together into fully_merged_messages_df which you can freely play with
  4. Visualize a word tree of your text messages with a specific contact
  5. Show you who you text the most

Note: none of your data is modified nor sent anywhere during execution

Dependencies

  1. Pandas, see Pandas install
  2. IPython follow Pandas install link for details how to install this as well
  3. An iPhone, having synced with this computer
  4. If running on a Mac, code will work out of the box. If running on a PC, change the variable BASE_DIR in table_connector.py to the directory of your backups
    • This post seems to specify the location of backups on Windows.
  5. Internet connection to load the google visualization API, it's a very small file though

Quick start

  1. Start the IPython notebook like so: jupyter notebook sms_analysis.ipynb
  2. Under the menu choose Cell --> Run All
  3. Edit the CONTACT_NAME and ROOT_WORD in the last cell to alter the visualization and then re-run that cell, under menu choose: Cell --> Run Cell

Contact michaeldezube at gmail com with questions

Example word tree: