WhatsApp Export Chat

There was a tiny controversy on one WhatsApp group I’m part of. This is a “sparse” WhatsApp group, which means there aren’t too many messages sent. Only around 1000 in nearly 5 years (you’ll soon know how I got that number).

And this morning I wake up to find 42 messages (many members of the group are in the US). Some of them I understood and some I didn’t. So the gossip-monger I am (hey, remember that Yuval Noah Harari thinks gossip is the basis of human civilisation?), I opened up half a dozen backchannel chats.

Like the six blind men of Indostan, these chats helped me construct a picture of what had happened. My domain knowledge had gotten enhanced. However, there was one message that had made a deep impression on me – that claimed that some people were monopolising whatever little conversation there was on that group.

I HAD to test that hypothesis.

The jobless guy that I am, I figured out how to export a chat from WhatsApp. With iOS, it’s rather easy. Go to the info page of a chat or a group, and near “delete chat/group”, you see “export chat/group”. If you say you don’t want media (like I did), you get a text file (I airdropped mine immediately into my Mac).

The formatting of the WhatsApp export file is rather clean, making it easy to parse. The date is in square brackets. The sender’s name (or number, if they’re not in your contact list) is before a colon after the square brackets. A couple of “separate” functions later you are good to go (there are a couple of other nuances. If you can read R code, check mine here).

chat <- read_lines('~/Downloads/_chat.txt')
tibble(txt=chat) %>% 
separate(txt, c("Date", "Content"), '\\] ') %>%
separate(Content, c("Sender", "Content"), ': ') %>%
mutate(
Content=coalesce(Content, Date),
Date=str_trim(str_replace_all(Date, '\\[', '')),
Date2=as.POSIXct(Date, format='%d/%m/%y, %H:%M:%S %p')
) %>%
fill(Date2, .direction = 'updown') %>%
fill(Sender, .direction = 'downup') %>%
filter(!str_detect(Sender, "changed their phone number to a new number") ) %>%
filter(!str_detect(Sender, ' added ') & !str_detect(Sender, ' left')) %>%
filter(!str_detect(Sender, " joined using this group's invite link"))->
mychat

That’s it. You are good to go. You have a nice data frame with sender’s name, message content and date/time of sending. And as one of the teachers at my JEE coaching factory used to say, you can now do “gymnastics”.

And so for the last hour or so I’ve been wasting my time doing such gymnastics. Number of posts sent on each day. Testing the hypothesis that some people talk a lot on the group (I turned out to be far more prolific than I’d imagined). People who start conversations. Whether there are any long bilateral conversations on the group. And so on and so forth (this is how I know there are ~1000 messages on this group).

Now I want to subject all my conversations to such analysis. For bilaterals it won’t be that much fun – but in case there is some romantic or business interest involved you might find it useful to know who initiates more and who closes more conversations.

You can subject the conversations to natural language processing (with what objective, I don’t know). The possibilities are endless.

And the time wastage can be endless as well. So I’ll stop here.

Marriage

“I love you”, I told her over three years back.

“If you love me so much give me half your assets”, she replied, probably in jest.

“I’ll give you but in exchange for half your assets”.

“You know I’ve just started working so I don’t have too many assets. So I’ll happily exchange half my assets for half yours”.

A few months later we got married. And yes, this is a true and serious story. While it might ┬ábe devoid of all the romance that one associates with love and marriage, it illustrates what marriage is all about – it is a commercial contract where you pledge to share half your assets to the counterparty, and bequeath all your assets to him/her in case of your “unfortunate demise”.

One of the major points in the BJP’s manifesto over the years has been for a Uniform Civil Code. Currently, in India, people belonging to each religion have their own “civil codes” which governs their personal lives. According to the current Indian laws, a Christian girl has to wait until she is 21 years old to get married, while a Muslim girl can get married at 16. A Hindu man can have a maximum of one legally wedded wife, while a Muslim man can have four.

Now you can see why the BJP’s clamour for a Uniform Civil Code appears controversial – Muslims believe that this move will deprive them of the additional three wives that they are currently entitled to. However, I argue that by stripping marriage off all the emotional context and just sticking to its core commercial values, we can have a Uniform Civil Code without any controversy.

The basic argument is this: the Government of India (or any other government) has no business telling people who they should live with, sleep with or have children with. As long as two adults consent to stay together or share a bed , there should be no legal hassles to them doing so. If three adults consent to live with each other and agree on a conjugal arrangement, the government should have no problem with that either. So why do we need a civil code at all?

The only interest a Government has in the institution of marriage is in terms of property rights. Because of the basic principle that a person’s “next of kin” inherits its property, the government needs to know who a person’s next of kin is. For that purpose, you need a legal document – a purpose that is today served by a marriage certificate. Beyond this realm of property rights and inheritance, a secular government has no right to dictate who I’m sleeping with – as long as it’s consensual.

So I propose the following segment of the Uniform Civil Code: “any adult, at a particular point of time, can have exactly one legally wedded spouse” (notice that the gender neutral wording takes care of LGBTs also). Notice also that this code only talks about legally wedded spouses. What it doesn’t mention, or care to mention, that one can have as many “illegal” spouses as they want. With the caveat that because these people are not legally wedded to you they don’t have a claim on your property.

Currently there is too much drama in the courts about the “basic structure of the Indian family” and “family values” and more often than not they are being used to pass rather illiberal judgments. The multiple civil code structure that we have, which is based on a supposedly divine and romantic institution of marriage, is doing more harm than good to the citizens. Once the state (and all its arms) realizes that marriage is at the core a commercial contract a lot of social wrongs can be easily set right.

I didn’t need to marry the person who is now my wife only if I wanted to move in with her. As two consenting adults, no one could have prevented us. It was, however, a measure of mutual trust and love, that we decided that we should share assets also. And hence decided to get married (our marriage was registered according to the “Hindu Marriages Act”, for the record).

 

The National College Flyover

What will happen to the controversial National College Flyover when the Metro gets built? If I remember right, the proposed Metro goes from Lalbagh West Gate up Vani Vilas road, and is supposed to take a right turn on to K R Road at the National College circle. Surely there is no space on VV Road to for the metro and the flyover to exist side by side. They can’t take the metro underground there since the ground there has to bear the additional weight of the flyover.

So what will become of the flyover? Yet another example of the BBMP’s shortsightedness.

I don’t remember the forum (it might have been this blog, or its predecessor) but I had once mentioned as to how the National College Flyover was useless. And I had gotten shouted down by a bunch of people saying “go in the evening and see the number of vehicles on the flyover, and you’ll know it’s not useless”. I’ve gone there a few evenings after that (over the last 2-3 years) and watched the traffic in the evening, and still believe that it wasn’t necessary.

It wasn’t necessary because the traffic at the intersection isn’t enough of a reduction in petrol and time cost of going over the flyover to pay for the flyover in a reasonable number of years (if I remember my minor subjects right, this is the standard reasoning by transportation engineers). People on K R Road, and the traffic going towards Jain college from “north road” (the western part of VV Road) still have to spend an insane amount of time at the signal. People on VV Road have it easy but then they get stuck at the new signal that has been installed at the junction of VV Road and Shankar Mutt Road.

And to consider the amount of controversy that the flyover created when it was built. And the fact that it’s most likely going to get pulled down for the metro construction.