Important sidenote: there is probably a slick way to grab the messages and attachments with a single SQL command, and a slick way to do the timezone adjustment in the SQL command …. If you’re stopping here, one caveat: the dates are all in Greenwich Mean Time (GMT), so you may want to convert to Eastern standard or something else before you start fiddling around. We can access this with the built-in SQL tool sqlite3 from the Terminal asĪnd follow the same procedure as before to save it into a CSV.Īt this point, we can fire up our favorite data analysis tool (Python, R, Excel, whatever) and we have a convenient couple of CSVs saved to play with. (If you poke around in the surrounding folders, you’ll find that each text chain is saved by day in a file you can open in the Message.app application, same with attachments, but this is not helpful for doing anything big.) IOS archives all iMessage chats in a SQL database in /Users/username/Library/Messages/chat.db. (Might do some text analysis and/or modeling in a later post.) Doing some time-series style plots with it.Doing this extraction in a Jupyter/IPython notebook and saving it into a Pandas dataframe.Exporting a group chat as a CSV file, including the sender and type of message (text or attachment).So in this post I will give some basic recipes for The slick iMessage Analyzer app can handle group chats, and even allows you to export the chat as an easy-to-play-with CSV - but there is a limited menu of queries, it doesn’t differentiate between members of the chat, and it doesn’t make explicit distinction between text vs. So I thought I was in luck.īut I found that these resources tended to neglect group chats (for example this excellent tutorial or many nice Github repos like these PHP scripts). Questions like: who sends the most texts by hour, most used words, circadian rhythms, maybe some modeling … It turns out that (1) iOS archives all iMessages in a convenient SQL database on your Mac and (2) there is a ton of code out there to read and manipulate this data. ![]() ![]() ![]() I wanted to do some data science-y analysis of some group conversations I’ve been in for years over iMessage (the Apple ecosystem message app).
0 Comments
Leave a Reply. |