More on interactive graphics

So for a while now I’ve been building this cricket visualisation thingy. Basically it’s what I think is a pseudo-innovative way of describing a cricket match, by showing how the game ebbs and flows, and marking off the key events.

Here’s a sample, from the ongoing game between Chennai Super Kings and Kolkata Knight Riders.

As you might appreciate, this is a bit cluttered. One “brilliant” idea I had to declutter this was to create an interactive version, using Plotly and D3.js. It’s the same graphic, but instead of all those annotations appearing, they’ll appear when you hover on those boxes (the boxes are still there). Also, when you hover over the line you can see the score and what happened on that ball.

When I came up with this version two weeks back, I sent it to a few friends. Nobody responded. I checked back with them a few days later. Nobody had seen it. They’d all opened it on their mobile devices, and interactive graphics are ill-defined for mobile!

Because on mobile there’s no concept of “hover”. Even “click” is badly defined because fingers are much fatter than mouse pointers.

And nowadays everyone uses mobile – even in corporate settings. People who spend most time in meetings only have access to their phones while in there, and consume all their information through that.

Yet, you have visualisation “experts” who insist on the joys of tools such as Tableau, or other things that produce nice-looking interactive graphics. People go ga-ga over motion charts (they’re slightly better in that they can communicate more without input from the user).

In my opinion, the lack of use on mobile is the last nail in the coffin of interactive graphics. It is not like they didn’t have their problems already – the biggest problem for me is that it takes too much effort on the part of the user to understand the message that is being sent out. Interactive graphics are also harder to do well, since the users might use them in ways not intended – hovering and clicking on the “wrong” places, making it harder to communicate the message you want to communicate.

As a visualiser, one thing I’m particular about is being in control of the message. As a rule, a good visualisation contains one overarching message, and a good visualisation is one in which the user gets the message as soon as she sees the chart. And in an interactive chart which the user has to control, there is no way for the designer to control the message!

Hopefully this difficulty with seeing interactive charts on mobile will mean that my clients will start demanding them less (at least that’s the direction in which I’ve been educating them all along!). “Controlling the narrative” and “too much work for consumer” might seem like esoteric problems with something, but “can’t be consumed on mobile” is surely a winning argument!

 

 

Relative pricing revisited

Yesterday I bought a pair of jeans. Normally it wouldn’t be a spectacular event (though one of my first blogposts was about a pair of jeans), but regular squatting has meant that I’ve been tearing through jeans well-at-a-faster-rate, and also that it’s been hard to find jeans that fit me well.

Basically, I have a well-above-average thigh and a well-below-average arse for my waist size, and that makes it hard to find readymade pants that fit well. As a consequence I’ve hardly bought trousers in the last 2-3 years, though I’ve been losing many pairs to the tear in this period of time.

And so when I found a pair of jeans that fit me comfortably yesterday I wasn’t too concerned about paying a record price for it (about 1.8 times the maximum I’d ever paid for a pair in the past). In fact, I’d seen another pair that fit well a few minutes earlier (and it was a much fancier brand), but it was well above budget (3 times as expensive as my historically costliest ever pair), and so I moved on (more importantly, it came with a button fly, and I’d find that rather inconvenient).

Jeans having been bought, we went off to a restaurant at the mall for lunch, at the end of which the wife pointed out that the money we paid for the lunch was more than the difference in prices between the two pairs of jeans. And that if only we would avoid eating out when it’s avoidable, we could spend on getting ourselves much more fancier clothes without feeling guilty.

I’ve written about relative prices in the past, especially about the Big Mac Index, and how it doesn’t make sense because of differential liquidity. After moving to London, I’m yet to come to terms with the fact that relative prices of goods here is vastly different from that back home; and that I haven’t adjusted my lifestyle accordingly leading to inefficient spending and a possible strain on lifestyle.

Food, for example, is much more expensive here than in India (we’ll use official exchange rates for the purpose of this post). The average coffee costs £2.5 (INR 225), which is about 10 times the price of an average coffee in Bangalore (I’m talking about a good quick cup of coffee here, so ignoring the chains which are basically table rentals). The average weekday takeaway lunch costs £6 (INR 540), which is again 10X what it costs in Bangalore.

Semi-fancy meals (a leisurely meal at a sit down restaurant with a drink, perhaps) are relatively less costly here, costing about £25-30 per head compared to INR 1200-1500 in Bangalore, a ratio of about 2X. A beer at a pub costs about the same, though cocktails here are much more expensive.

The alternative to eating out is, of course, eating in, and most “regular” ingredients such as vegetables and rice cost more here, though cheeses (which are relatively less liquid in India) are actually cheaper here. Milk costs about the same.

Controlling for quality, clothes cost about the same (or might even be less costly here when you go for slightly more fancy stuff). Electronics again cost about the same (they come through the same global supply chain). Contact lenses are more expensive here (though the ones I buy in India are manufactured in the UK!).

In my book, I have a chapter called “if you want to live like a Roman, live in Rome”. It’s about how different cities have different relative liquidity of goods. Similarly, different cities and countries have different relative prices, and long-term residents of these places evolve their spending to optimise for their given set of relative prices.

And when you move cities or countries, if you don’t change your lifestyle accordingly you might end up spending suboptimally, and get less welfare from life.

Once again this points out problems with international price indices being constructed based on a particular commodity, or set of commodities. For not only are different commodities differentially liquid (as I pointed out in my Mint piece linked above) in different places, but also the “standard consumption basket” also varies from city to city!

And if a Delhi-ite consumes lots of apples, and a Bangalorean consumes lots of oranges, you can’t make an apples-to-apples comparison in cost of living in these cities!

A year of wiping arse near the Thames

So it’s been exactly one year and one day since we moved to London. Exactly one year ago (one day after we moved here), I wrote about why Brits talk so much about the weather.

The last one week has been among my most depressing in London. Between Tuesday and Friday, the only times I stepped out of home was to the store round the corner, for grocery shopping. The wife didn’t step out of home at all. The daughter accompanied me on one trip to the store. Between Tuesday evening and Saturday morning, there was a layer (or few) of snow on the ground, thanks to the Beast From The East.

This wasn’t the first time in life that I’d seen snow fall – that had occurred in early December when we were similarly snowed in one Sunday, and had run out of supplies.

This apart, another source of depression was the latitude – between early November and late January, it would get dark insanely early here – around 4pm or so. It would be especially cruel on weekends when we’d be home, to see it getting dark so early. I would take walks in the middle of work (I was working for a company then) to make sure I at least got to see some sun (or white clouds!).

Weather apart, one big insight about London after a year of living here is that it’s a massive sprawl. For example, I live in a 2-storey house, with a backyard at least 100 feet long. And this is typical of all the houses in my area. Roads curve around and have plenty of cul de sacs, giving most residential neighbourhood a suburban feel. Check out the satellite picture of my area here: 
Until I moved here last year, I had assumed that London is an “urban” and dense city, given what I’d seen in 2005 (when I’d stayed in South Kensington) and the fact that the city has great public transport and congestion charges. As it turns out, the neighbourhoods are really suburban and low density. Residential areas are really residential, and you need to go to your area’s “high street” if you need to shop.

In the suburbs, most people have cars, which they use fairly regularly – though not for commuting into the city. The area I live in, Ealing, for example, has brilliant public transport connections, but is fundamentally built for life with cars. We currently live in a 1880s house, but are soon moving to a more “urban” apartment in a building that used to be a pub.

London being a sprawl means that it takes a long time to get anywhere, unless you’re commuting directly in or out of town. Most tube connections are radial, which means that if you need to visit someone in another neighbourhood it can take a long time indeed. As a consequence, I’ve hardly met my friends here – with the one I’ve met most often it’s been at an average frequency of once in 2 months.

The other thing that’s intrigued me about London is the pubs – those in the middle of town are all mostly horribly crowded, while those in the suburbs are really nice and friendly. There’s this one place close to home where I go for my football matches, and where we once went for a Sunday roast (yes, pubs here offer baby high chairs!).

Other pubs in the area look inviting as well, and make me wonder why I don’t have “area friends” to go to them with!

Finally, coming to the title of this post, when we were house-hunting this time last year, one of the things I looked for was a house with a bidet or health faucet. We were told by the agents that such fixtures weren’t normal for rental housing in the UK. After we’d moved in, we asked our landlords if we could install a health faucet. Once again we got the same reply, and that we were free to install them as long as we took them away when we moved out.

So as it has happened, we haven’t really “washed arse in the Thames“!

 

The Anti-Two Pizza Rule

So Amazon supposedly has a “two pizza rule” to limit the size of meetings – the convention is that two pizzas should be sufficient to feed all participants in any meeting. While pizza is not necessarily served at most meetings, the rule effectively implies that a meeting can’t have more than seven or eight people.

The point of the rule is not hard to see – a meeting that has too many people will inevitably have people who are not contributing, and it’s a waste of their time. Limiting meeting size also means cutting total time employees spend in meetings, meaning they can get more shit done.

While this is indeed a noble “rule” in a corporate setting, it just doesn’t work for parties. In fact, after having analysed lots of parties I’ve either hosted or attended over the years, and after an especially disastrous party not so long ago (I’ve waited a random amount of time since that party before writing this so as to not offend the hosts), I hereby propose the “anti two pizza rule” for parties.

While five to eight people is a good number for a meeting, having enough people contributing but no deadweight, the range doesn’t do well at all for more social gatherings. The problem is that with this number, it is not clear if the gathering should remain in one group, or split into multiple groups.

When you have a “one pizza party” (5-6 people or less), you have one tight group (no pun intended) and assuming that people will get along with each other, you’re likely to have a good time.

When you have a “three pizza party” (more than 10 people), it’s intuitive for the gathering to breakup into multiple groups, and if things go well, these groups will be fluid and everyone will have a good time. Such a gathering also allows people to test waters with multiple co-attendees and then settle on the mini-group that they’ll end up spending most time with.

A two-pizza party (6-10 people), on the other hand, falls between the two stools. One group means there will be people left out of the conversation without respite. In such a small gathering, it is also not easy to break out of the main group and start your own group (again, seating arrangement matters). And so while some attendees (the “core group”) might end up having fun, the party doesn’t really work for most participating parties.

So, the next time you’re hosting a party, do yourself and your guests a favour and ensure that you don’t end up with between 6 and 10 people at the party. Either less or more is fine!

You might want to read this other post I’ve written on coordinating guest lists for birthday parties.

Astrology and Data Science

The discussion goes back some 6 years, when I’d first started setting up my data and management consultancy practice. Since I’d freshly quit my job to set up the said practice, I had plenty of time on my hands, and the wife suggested that I spend some of that time learning astrology.

Considering that I’ve never been remotely religious or superstitious, I found this suggestion preposterous (I had a funny upbringing in the matter of religion – my mother was insanely religious (including following a certain Baba), and my father was insanely rationalist, and I kept getting pulled in both directions).

Now, the wife has some (indirect) background in astrology. One of her aunts is an astrologer, and specialises in something called “prashNa shaastra“, where the prediction is made based on the time at which the client asks the astrologer a question. My wife believes this has resulted in largely correct predictions (though I suspect a strong dose of confirmation bias there), and (very strangely to me) seems to believe in the stuff.

“What’s the use of studying astrology if I don’t believe in it one bit”, I asked. “Astrology is very mathematical, and you are very good at mathematics. So you’ll enjoy it a lot”, she countered, sidestepping the question.

We went off into a long discussion on the origins of astrology, and how it resulted in early developments in astronomy (necessary in order to precisely determine the position of planets), and so on. The discussion got involved, and involved many digressions, as discussions of this sort might entail. And as you might expect with such discussions, my wife threw a curveball, “You know, you say you’re building a business based on data analysis. Isn’t data analysis just like astrology?”

I was stumped (ok I know I’m mixing metaphors here), and that had ended the discussion then.

Until I decided to bring it up recently. As it turns out, once again (after a brief hiatus when I decided I’ll do a job) I’m in process of setting up a data and management consulting business. The difference is this time I’m in London, and that “data science” is a thing (it wasn’t in 2011). And over the last year or so I’ve been kinda disappointed to see what goes on in the name of “data science” around me.

This XKCD cartoon (which I’ve shared here several times) encapsulates it very well. People literally “pour data into a machine learning system” and then “stir the pile” hoping for the results.

Source: https://xkcd.com/1838/

In the process of applying fairly complex “machine learning” algorithms, I’ve seen people not really bother about whether the analysis makes intuitive sense, or if there is “physical meaning” in what the analysis says, or if the correlations actually determine causation. It’s blind application of “run the data through a bunch of scikit learn models and accept the output”.

And this is exactly how astrology works. There are a bunch of predictor variables (position of different “planets” in various parts of the “sky”). There is the observed variable (whether some disaster happened or not, basically), which is nicely in binary format. And then some of our ancients did some data analysis on this, trying to identify combinations of predictors that predicted the output (unfortunately they didn’t have the power of statistics or computers, so in that sense the models were limited). And then they simply accepted the outputs, without challenging why it makes sense that the position of Jupiter at the time of wedding affects how your marriage will go.

So I brought up the topic of astrology and data science again recently, saying “OK after careful analysis I admit that astrology is the oldest form of data science”. “That’s not what I said”, the wife countered. “I said that data science is new age astrology, and not the other way round”.

It’s hard to argue with that!

The Derick Parry management paradigm

Before you ask, Derick Parry was a West Indian cricketer. He finished his international playing career before I was born, partly because he bowled spin at a time when the West Indies usually played four fearsome fast bowlers, and partly because he went on rebel tours to South Africa.

That, however, doesn’t mean that I never watched him play – there was a “masters” series sometime in the mid 1990s when he played as part of the ‘West Indies masters” team. I don’t even remember who they were playing, or where (such series aren’t archived well, so I can’t find the score card either).

All I remember is that Parry was batting along with Larry Gomes, and the West Indies Masters were chasing a modest target. Parry is relevant to our discussion because of the commentator’s (don’t remember who – it was an Indian guy) repeated descriptions of how he should play.

“Parry should not bother about runs”, the commentator kept saying. “He should simply use his long reach and smother the spin and hold one end up. It is Gomes who should do the scoring”. And incredibly, that’s how West Indies Masters got to the target.

So the Derick Parry management paradigm consists of eschewing all the “interesting” or “good” or “impactful” work (“scoring”, basically. no pun intended), and simply being focussed on holding one end up, or providing support. It wasn’t that Parry couldn’t score – he had at Test batting average of 22, but on that day the commentator wanted him to simply hold one end up and let the more accomplished batsman do the scoring.

I’ve seen this happen at various levels, but this usually happens at the intra-company level. There will be one team which will explicitly not work on the more interesting part of the problem, and instead simply “provide support” to another team that works on this stuff. In a lot of cases it is not that the “supporting team” doesn’t have the ability or skills to execute the task end-to-end. It just so happens that they are a part of the organisation which is “not supposed to do the scoring”. Most often, this kind of a relationship is seen in companies with offshore units – the offshore unit sticks to providing support to the onshore unit, which does the “scoring”.

In some cases, the Derick Parry school goes to inter-company deals as well, and in such cases it is usually done so as to win the business. Basically if you are trying to win an outsourcing contract, you don’t want to be seen doing something that the client considers to be “core business”. And so even if you’re fully capable of doing that, you suppress that part of your offering and only provide support. The plan in some cases is to do a Mustafa’s camel, but in most cases that doesn’t succeed.

I’m not offering any comment on whether the Derick Parry strategy of management is good or not. All I’m doing here is to attach this oft-used strategy to a name, one that is mostly forgotten.

Chiltu

If my mother were to be alive at the time I got married, I’m not sure she would have been too happy that I was marrying someone named Pinky. At the least, she would have insisted that we call Priyanka by another name.

The reason for this is that for my mother, the “default Pinky” was her friend Girija’s dachshund. Now I might have told you about “default names” – basically for every name, there is one person with the name who you instinctively think of. While the default person attached to a name can change over time, at any point of time there is only one default.

And because of this, when I know nothing about a person apart from his/her name, I form a Bayesian prior image which reflects that of the default person with the same name. And I assume this is true of a lot of people – you judge other people by their names in the absence of other information.

So considering that my mother was my mother, and so also followed the practice of judging people from her corpus of “default names”, she wouldn’t have wanted a daughter-in-law who had a nickname which defaulted to a dog, even if it were a rather friendly dachshund.

Anyway, this is not what the post is about. So while Pinky was Girija aunty’s longstanding pet, she wasn’t her only dog. Periodically she would take in some other dogs, though none of them lasted anywhere as long as Pinky did (I don’t ever remember meeting any of the other dogs more than once). However, one of them is hard to forget.

He was an Indian pie-dog named Chiltu. He was quite young, but thanks to his breed, he already towered over Pinky. So it turned out that whenever they were fed, Chiltu would finish off his portion much before Pinky ate hers, and then he would go for Pinky’s food as well.

Now don’t ask me why I remember this. But I remember telling this story to “my Pinky” a few years back when I had finished eating some rather tasty food much quicker than her. And I remember telling her that day that I would “do a Chiltu” – which is basically to go after Pinky’s food once I had finished my own food.

And that name has stuck. Every time one of us beats the other to eating something tasty, and then goes for the other’s portion, we simply say “Chiltu”.

My mother is long gone. Girija aunty has been gone for longer. Girija aunty’s dog Pinky has been gone for even longer. And Chiltu didn’t live with her for too long. But then Chiltu’s name, eternally associated with this practice, lives on!