4 ms·
I got inspired by Spotify Wrapped to put together this - an iMessage Wrapped with data and visualizations on who/where/what/how/when people texted in 2020. Sta
by lxor677 6y ago
I got inspired by Spotify Wrapped to put together this - an iMessage Wrapped with data and visualizations on who/where/what/how/when people texted in 2020.
Stack is Flask, Jinja, chart.js, leaflet.js and bootstrap. The app runs locally, and accesses the chat and contact SQLite DBs on OS machines. I've been programming for about 18 months, but this was is the first side project I've released into the wild, so it's been an awesome learning experience.
Link to the repo is here
https://github.com/michael-danello/iMessageWrapped https://github.com/michael-danello/iMessageWrapped
- oefrha 6y agoThe contact map seems to be based on area code: https://github.com/michael-danello/iMessageWrapped/blob/cef20564e5744fb9a69ec0483ff1e124490b134e/imessage2020wrapped/app.py#L275-L290 https://github.com/michael-danello/iMessageWrapped/blob/cef2... Unfortunately area code of a cell phone number isn't a great indicator of where the owner lives (though to be fair you can't really tell otherwise). Relevant XKCD entry: https://xkcd.com/1129/ https://xkcd.com/1129/ In my case my area code (650) is where I went to college, and many if not most of my friends and colleagues seem to be in a similar position.
- lxor677 6y agoHaha, that XKCD is great. Yeah, this was definitely a recognized constraint for the where section. What I will say is that I recently graduated from college, so my data was actually fairly descriptive - friends' hometowns (where a number of them have moved back) + a whole lot of international students in my college town who got US numbers.
- pvg 6y agoI got the impression from the code that this operates directly on whatever sqlite db iMessage actually uses. Is this right? If so, it's probably worth considering just making a copy, or including a script that makes the copy, when sudo'd. That way you don't need the permanent permission and there's no chance of accidentally messing up an important bit of user data. And paranoid people will probably feel better about not having a live local webserver that's poking around their personal messages.
- lxor677 6y agoTotally fair. I'll look into that for a v2. Since the operations are RO, I don't think there's much risk of messing up the data, but I think it makes sense from a context standpoint. The application certainly doesn't need permanent access. Although tbh, one of the reasons I had it was because I tried to orient the setup towards a non-technical audience, so I wanted a 'clickable' solution, like giving full disk access.
- 67868018 6y agoSQLite has write locking, it's not going to happen. And you're only reading anyway...
- gnicholas 6y agoFun, thanks! BTW, the word "represents" is misspelled in the WHO section.
- Zanni 6y agoThis is very cool. Some minor nits, since you seem to be open to feedback here: 1) Received (not Recieved) 2) represents (not repersents) 3) I have a random late night buddy because I sent no texts between 12 and 3am. 4) The "Good morning sunshine" block tells me my first morning text was sent at 13:39 AM on average, which is not a real time (should be just 13:39 or 1:39 PM) and not in the morning--which further suggests you're taking my overall average text time and not my average morning text time. This might be clearer as "You sent your first text at" (skipping "morning"). 5) I got no days of the week data and no map data. Once again, these are minor nits and didn't detract from my enjoyment at all. Just thought you might appreciate the chance to fix some easy errors.
- lxor677 6y agoThank you! Appreciate the feedback and glad you enjoyed. Spelling errors are my bane - I'll make sure to fix those. And yep, I think fixing some of those time errors is where I'll start. I feel that pandas is better optimized for handling dates than times, which explains some of my wonky work arounds. Days of the week is also interesting - did you have a full year of imessages on your computer or do you auto-delete after a certain period? The map is puzzling and I'm working to debug. It seems that it works occasionally on reload and that it works consistently if all fade-in animations are removed from page. I put this together in the last two weeks, so it's definitely been rushed. Thanks again for the feedback!