F

From Chocolates to Bar Graphs

Abbu, I’ll make a graph of all the chocolates you eat while I’m asleep and will send it to your team,” my daughter Pariza complained, after finding yet another chocolate wrapper on my desk.

We don’t have a television at home and my wife is quite mindful about limiting screen time for the kids, even for their studies, which means I get to become their source of entertainment. While my wife does the heavy lifting in raising them and inculcating good qualities in them, when I’m not working, I try to do my part. I spend time with them telling stories, reading books, playing board games, and drawing with them. As someone who lives and breathes data, it’s hard for me to resist bringing it into our activities. That’s how the idea of “drawing data with kids” came to be.

Introducing Pariza

Pariza is a 10-year-old, happy and curious girl. Currently she is home-schooling and I’m working from home which means we get to see each other quite often.

illustration of a young girl in a white dress and headscarf standing behind an assortment of papers and food

She likes to peek into my monitor to see what I am working on and who all I am talking to.

Since she has seen me messing around with data, it was easy to start the dataviz journey with her. In my experience working with data, I think the biggest deterrent to learning is the domain (of the data).

I think all the datasets I have seen while learning data science are heavily biased towards specific audiences. I had never heard about iris flowers before I saw them detailed in clustering tutorials. And reading about their varieties – setosa, virginica, versicolor – makes me dizzy. Same is the case with other popular datasets.

Having faced these challenges, I wanted to find a simple and yet engaging way to teach Pariza about data, something that she sees on a regular basis.

One fine day, I was lost in these thoughts and was staring at my laptop.

Making the Graph

“Abbu, I’ll make a graph of all the chocolates you eat while I’m asleep and will send it to your team.”

My train of thoughts was disturbed by Pariza’s complaint .

Me: “I think that’s a great idea, Pariza. Why don’t you bring your notebook and we will create a graph of chocolates?”

She ran excitedly to her room and got the notebook, and we started creating our dataset. Since she didn’t take the count of how many chocolates of each type she found, instead we used the count of letters in each candy name.

table listing various candy brands and the number of letters in each name

Pariza: “Abbu, I’m feeling hungry just staring at these names.”

Me: “Ha-ha! Let’s focus on our work now and later you might get to taste some.”

Next, we created x-axis with the number of letters and y-axis to write the name of the candies.

blank set of chart axes, with the x-axis as number of letters (1-9) and the y-axis unlabeled

Then looking at our dataset we added different bars for each candy type.

A horizontal bar chart shown on the axes from above, overlaid by the table showing the number of letters in each candy name

We could have easily done this activity on a spreadsheet or via a programming language but would have lost the fun we had working with pen and paper. It also helped avoid additional screen time.

Your Turn to Play

Hope you enjoyed the above activity. Here’s another example you could play with:

1. Write down the name of your friends or family members and number of letters in each name, similar to the list below (just replace names below with your friends or family members).

Table listing several people's names in one column, with a blank column labeled "Number of letters" that the reader can fill out

2. Create x-axis and label it as “Number of letters”

3. On the y-axis, write the name of each family member and create bars indicating the length of each name.

4. Look for interesting patterns. What do you notice about different names?


This article was adapted from my newsletter Drawing Data with Kids, where I share my journey of teaching dataviz and analysis to my 10-year-old. Feel free to subscribe if you would be interested in similar articles delivered directly to your mailbox.

Author profile

Gulrez Khan is a Lead Data Scientist at PayPal. He champions Data Visualization & Storytelling with data and has been giving talks, workshops, speaking at conferences to democratize data. Outside his day job, he loves playing with public datasets.