So You Want To Pick A Dataviz Platform: Part II- Python (& Friends)
Told From the Perspective of Someone Who Doesn’t Understand Computers

“So then. You think we can do good things for you,” I said. “You’re going to be very happy.”
The client agreed. “I’m really impressed by this service and the staff you have running it.” The client gestured to the wizard on my right, named Jeff. Jeff wore a suit and held a pen & notebook, but he may as well have had on a cloak and magic wand.
“Well, I’m excited as well,” said the wizard. “Clients like you are exactly who we look for. You understand the need for both near-term insights and long-term integration. Our firm’s track record of spells and elixirs in spaces like yours gives me nothing but high hopes that our analytics platform will improve your marketing ROI.”
“And you’re absolutely positive that you won’t use any Yarr in your spells?” said the client.
I kept a straight face. More and more, clients talked to my wizards as if any of them knew what the wizards were talking about. This client, an analyst for a Chief Marketing Officer of an auto parts dealer, knew quite a lot. Tantamount, then, that I act as if I did as well.
This is what I do, though. Forget what I don’t know about computers. I can get this wizard in a room with that Assistant CMO, and I simply love it when I do. The day I realized I could do that by making my own company was a happy one. Call me George, or Mr. Hammond, if you’ll work for me soon.
“Like I said,” started the wizard. “There are those in my faith who practice the old religion and pray to the god Wickham, sacrificing bow ties in his name. Even still, I hold to the worship of Rossum and the symbol of the snake. Integration into your systems is key, and I think Python will offer that, more out-of-box for you than R, given your current stack.”
The client agreed to seek approval from his chief executive suite, so we shook hands and left.
On the drive back to our office, the wizard laid out a timetable to deliver his Spell As A Service. He would gather his priests of the order of data science. They would research their sacred documentation. Upon constructing their magical “jupiter” recipe and invoking the spirits of the Multiple Cores, they would demo the capability for me. Give it a week, he said, before we put anything on your schedule.

It’s not that there’s something wrong with me, you understand? I try every day to keep up with these conversations, but I come from a time of Rolodexes and leather-bound daily planners. I know I’m behind. And I know my company would be better off if I could speak to our products better. To compensate, we have this arrangement: I run the company & drive business in, and the wizards deliver using industry-leading data science. If I have to cope by viewing my most profitable employees as characters from Harry Potter, so be it.
Besides, I knew this would happen. I once worked for a consulting firm named WTR that couldn’t manage this at all. They feared data science, so they ignored it. Certainly, I don’t understand data science, but I know what it can do. The market, primed for these wizards, needed me to make my own company. Several wizards left WTR and joined me at Hammond Consulting.
A quiet week after meeting the marketing assistant, I received an email invitation about a meeting with the coders. Reading the email, I saw that the invite went to me, but also… oh, predictable. Danielle Tanner, my protege. The wizards call her “Queen Dany.” They followed me willingly to my company from WTR, but only after I begged her to do so first.
She speaks their wizard tongue… elvish? Jedi? and then she translates for me. Limitlessly valuable. I think she can do some of the coders’ jobs, but she fills in such a critical gap for me that most of her time ends up there.
At the appointed hour, I arrived in the coders’ meeting room. They were all seated in the conference room, saving the head seat for me with Danielle on my left. With Danielle by my side, I felt reassured. “Ok, let’s get started.”
A wizard with a laptop sat at the far end of the table. He typed into his laptop and a flat-screen TV hanging on the far wall changed channels from a news station that had been on mute to the wizard’s laptop screen.
The wizard Jeff told me that they prepared the spells…. Tell you what, I’ll just describe these things as Danielle did after translating for me. She summarized that the client stored sales and expense data in a proprietary system that didn’t offer any metrics or self-reporting. Big problem for a company trying to see where their whales and primary markets are.
Now, I sold the client on a reporting solution that our firm can set up and manage for them. Critically, we didn’t require any licensing. Client pays us, we set something up, we show them how to use it over a period of 5 years. They get an entirely bespoke and scalable capability that will integrate into any new tech they deploy and won’t cost them anything extra once we leave. Everybody wins.
The wizards want to demo a prototype for the kinds of reports that the client’s data can become. In practice, this is actually quite hard. Wizards generally don’t know clients like salespeople. They needed me to look at the content in the report demo (usually charts and dashboards) and give feedback. That’s it, just look.
The wizard sitting at the computer typed some words and a black box appeared on the TV. Jeff began, “As you know, we’ve been laying groundwork for the reporting app. Let’s launch the demo.”
The wizard typed the word “notebook” in the box and hit enter. A lot of other text suddenly appeared in the box. An internet browser appeared and loaded a webpage.
“Ok, so this is a jupiter notebook,” said Jeff.
“A webpage where they practice spells,” said Danielle, reading my face. “And it’s ‘Jupyter’ with a y, but that’s not important,” though she’s wrong there. Clients want it spelled right in emails and documentation. And who spells Jupyter with a y?!
They walked me through the code.
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
direct_link1 = r"demo1.xlsm"
orders = pd.read_excel(direct_link1)
states = pd.pivot_table(orders, index='State', values=['Sales'], aggfunc=np.sum)
states = states.sort_values("Sales")
states.plot(kind='bar', figsize=(10,5))
I wasn’t impressed, so I said, “I appreciate that you’ve got the charting capability up, but… no. The client has no use for this. It tells them no story, provides no frame of reference, delivers no insights other than ‘Oh, look at your top states.’ It is, at its core, a dead-end product. It’s useless. Show me the next thing you have.”
Danielle’s silence I took to be agreement.
Jeff, professional as ever, ventured, “Well, can you talk about what the client will value as an insight? We’re still in an early flail.”
Ah, yes. Flail. Jeff, you truly have hit it. “I can see that. You’ve been setting up your process to get the project going but you haven’t explored any of the data yet. You’ve done everything else setting up a system to analyze the data and now you don’t know what to analyze.” My critique got nods.
I looked at Danielle, so she leaned in. “You really just have to go exploring, guys. What stood out in the dataframe when you ran pandas-profiling?”
Danielle said this casually enough that it sounded to me like something they probably should’ve done already. Instead, Jeff said, “We haven’t really made it that far in the exploration process since we’ve been laying groundwork.”
I thought I saw Danielle’s right ear twitch in a rare sign of frustration. I cut in with, “Those… those five states on the right are significantly larger than all the others. Can we do this chart with those five as one group, and all the rest in another?”
This took a few minutes. Spells, I’ve learned, can take significant trial and error. But they got it.
big_states = list(set(x for x in states.nlargest(5,"Sales").index))
states['Group'] = np.where(states.index.isin(big_states), "Five Largest", "All Others")
groups_df = states.groupby("Group").sum()
groups_df = groups_df.sort_values("Sales", ascending=False)
groups_df.plot(kind='bar', figsize=(10,5))
“There. With some more formatting, that’s not a bad idea to show the client.” I crossed my arms thinking about when I could schedule a meeting.
“Well,” Danielle started, “It’s a plain chart, right? And it doesn’t tell the client whether these amounts are good or bad. No reference point.”
“Oh, Danielle. Just call Ade already.”
Adelaida is a wizard on a different team that Danielle and I have known since our WTR days. She and Danielle share a mutual respect. Moreso, in fact, than Ade seems to have with the Python wizards. Danielle rang her up and then said “she’s on her way,” but I could see the wizards shifting a bit.
It’s because she brings in different languages. First, Yarr, which is for some reason Python’s competitor- though they look the same to my eyes. Her second language, something I’ve never gotten right, I think it’s called Jabba’s Crib. Most of these wizards like Star Wars so of course a computer language is based around a character from it. I have actually seen Star Wars! My sister gave me the VHS tapes back in the 90s.
Danielle leaned over. “Remember, Jabba’s Crib isn’t the same language as Jabba, and you have to refer to it with both words.” Seemed simple enough. A crib and an alien are completely different.
Ade arrived, walking over to the wizard who was running the computer and sat next to him. She asked why this wasn’t being done in Yarr, and then on-the-spot opened another webpage and made the same chart but in Yarr.
library(ggplot2)
library(readxl)
library(data.table)
data <- read_xlsx('demo.xlsx')
df = aggregate(x = data$Sales,
by=list(State=data$State),
FUN=sum)
colnames(df) <- c("State","Sales")
df <- df[order(df$Sales, decreasing=TRUE), ]
rownames(df) <- (1:49)
df[1:5,'Group'] <- "Top Five"
df[6:49,'Group'] <- "All Others"
draw <- aggregate(x=df$Sales,
by=list(Group=df$Group),
FUN=sum)
colnames(draw) <- c("Group","Sales")
ggplot(data=draw, aes(x=reorder(Group, -Sales),
y=Sales)) +
geom_bar(position="dodge", stat="identity")
“I feel like you phoned that in,” Danielle remarked to Ade.
“Dplyr isn’t installed here,” said Ade. “No piping.”
I politely informed Ade that the deliverable needed to be in Python due to previous client discussion. She said, “What if the back end uses Python to connect the data together, but the actual chart uses Jabba’s Crib to show the metrics?”
I asked if a quick sample could be made. Ade responded, “I can make a sample with the same numbers that the other charts use instead of summarizing the data yet again.” She loaded another website that had some sample code and typed out the next chart.
<html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
<body>
<canvas id="bar-chart" width="10" height="5"></canvas>
</body>
<script>
// Bar chart
new Chart(document.getElementById("bar-chart"), {
type: 'bar',
data: {
labels: ["Top Five", "All Others"],
datasets: [
{
label: "Sales",
backgroundColor: ["#3e95cd", "#8e5ea2"],
data: [1193900,1103300]
}
]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
fontSize : 48
}
}],
xAxes: [{
ticks: {fontSize : 48,}
}]
},
legend: { display: false},
title: {display: false}
}
});
</script>
</html>
An argument followed about implementing this into the already-built system the wizards had made, so I put my foot down. “They’re a week into their build,” I said, “The groundwork is all laid, but we need to keep it in this tech constraint.”
Ade pointed to her second chart. “Well, at least incorporate some better visual arrangements. Right, Danielle?”
Danielle, ever the peacekeeper, raised her hands and said, “That’s really why I wanted Ade to come. This is the first of many metrics we want to build for this client. I strongly believe we should set aside a visual schema now and use it cohesively across all the metrics going forward.”
I agreed. “And make sure to put something else in this chart that shows a contrast between actual profitability and Sales. Is Sales really everything? Can we show if they’re really profitable? Look for that. That’s insightful.”
The meeting broke there. The coders knew they’d have something in a couple days and Danielle promised to advise the design choices.
I had a voicemail when I returned to my office. The client wanted a meeting with their board in a few days. A VP, Ms. Douglas, seemed to be angry that the company brought us in. A board meeting was fine by us, I said. The meeting fit our delivery schedule anyway, so I accepted.
A couple days passed as planned. I took Jeff to see the client and their board. Jeff set up the demo in the executive board room, which was a smaller conference room than I thought it would be.
As they came into the room, none of the board members shook our hands and only sat down, chatting quietly. Eventually, a very old CEO came in and everyone stood for him.
After brief introductions, we showed them the chart.
y = groups_df.plot(kind='bar', figsize=(10,5), color=['#1F77B4','orange'])#, width = 0.4)#, space=1)
plt.xticks(rotation='horizontal')
y.set_title('However, profits fall short', fontsize=14, fontname="Franklin Gothic Medium")
plt.suptitle('Five States Exceed All Others In Sales', fontsize=19, fontname="Franklin Gothic Medium")
font = font_manager.FontProperties(family='Franklin Gothic Medium',style='normal', size=16)
plt.legend(prop=font)
plt.legend(frameon=False)
y.spines['top'].set_visible(False)
y.spines['left'].set_visible(False)
y.spines['right'].set_visible(False)
plt.xlabel('')
plt.xticks(fontfamily="Franklin Gothic Medium")
y.yaxis.set_visible(False)
plt.rcParams["mathtext.fontset"] = "cm"
for p in y.patches:
y.annotate(formay(p.get_height()), (p.get_x() * 1.005, p.get_height() * 1.005))plt.show()

The key bit — how profits in the top 5 markets seemed to be below the other markets as a whole — especially stood out.
Clean, simple demonstrations like that work nicely, in my experience. They require little math, and the process to obtain them is short. The clients’ own coders can make it and their board members can grasp it.
A woman midway down the table jumped in with comments. I realized quickly that this must be Ms. Douglas, the skeptical VP. She criticized everything. Why Python, why not a commercial option, why analyze the data this or that way.
Something felt off at that moment. C-suite skeptics barrage me frequently, and questions like those should be expected. But the timing of it all. And the tone of Ms. Douglas’ voice, some sort of… urgency? Fear?
Jeff had no problem defending against these questions, but the dialogue became excruciating. Everything about our process, methodology, or tools got no less than four questions. The key moment came when Jeff described our design thinking methods and how we drive our clients to insights with products like our chart.
“For example, this chart can lead to more questions,” he said. “Where are profits being drained? Is this expected behavior? What do the operations directors in those “top five” markets think is the cause?”
I added, “We want you to give us that feedback as we build these tools for you. We want you to look at the art of the possible and explore where the heart of your problems are. We want to understand your company’s problems and successes even more than you do, and then share that understanding with you.”
Nobody make a comment, so I continued. “Truthfully, when we first saw these numbers, I was struck by the disparity between the top five states and all your other markets, especially with profits so low in the top five. So an example of the insights gleaned from a chart like this would be a follow-up discussion with the sales directors in those markets. To further understand the cause. Is it operational costs? Expenses? Some other root issue?”
The CEO spoke up in a slow, firm voice. “There’s only one person in charge of those markets, and she oversees all expenses.” He stared at Ms. Douglas. In fact, the whole room looked at her. And then the room became quiet.
Well, I take no pleasure in telling you that our ad hoc analytics product ended up being evidence in an embezzlement arrest of the company’s VP of large-market operations. In fact, the board meeting ended shortly after the CEO called security. Our client’s board approved bringing us on just days later.
We began a long relationship with that client, with this fiasco as our main focus of analysis. I’m still tempted to call this experience one of the greatest successes of my life, but I strongly believe that this was only possible because of the personal growth I’ve received running this company.
Most of all, I love my newfound drive to do hard things. Or new things. Or anything that forces me to stretch myself. Even if I never speak a computer language and have to sit through many similar demo meetings with my wizards, I’ll still do it. I get to watch what happens afterwards, and it can be extraordinary.
You have to try things you don’t already know at every turn. Computers will always be that to me. They confuse me, they change constantly, and they cause all kinds of problems. But look at my people. Look how they showed me the skills and character behind all the magic. These wizards teach me and guide me to adventure. For that alone, I’ll do it all again.
Coming Soon: Part 3: Tableau


