Make Your Own Toy Data Set
By: Dan Hales
Tags: Data Science

If you’re interested in completely missing the point of this post, feel free to grab my personal toy dataset from github. It consists of over 3000 measurements (length, width, depth, and weight) of two species of captive sea turtle hatchlings collected over nearly 20 years by researchers at NOAA’s Galveston laboratory.

This has been my go-to toy dataset when I want to implement a new algorithm from scratch to understand how it works, compare different models, or explore a new library.

As convenient as this dataset is now for quick little experiments, the real value came in actually cleaning and curating it myself. The entire process was mired in ambiguity, because I knew that I wanted a toy dataset, but didn’t immediately know what I wanted to do with it, which means I had to do a huge amount of EDA just to understand what I was working with. There were a few anomalies where one measurement was taken in different units, but it initially looked like the values were straight up omitted. Or that the turtles were just very, very, flat. Or perfectly cube-shaped, because columns had been duplicated for some entries. And there wasn’t one batch of abnormally large hatchlings — they happened to be around the same size as turtles that were several months older, even though they were the first entry in that collection of measurements (meaning they weren’t actually measured as hatchlings).

The individual csv files weren’t formatted identically, and documentation was scarce, requiring me to dive into some academic articles to figure out what mysterious column headers corresponded to, but that taught me a lot about both how turtles are measured and how tracking devices are fitted. It gave me an excuse to google all sorts of bizarre pictures trying to figure out how those measurements are obtained (spoiler alert: calipers, not measuring tape wrapped around the entire turtle like my idiot self had imagined).

In other words, when you’re building a toy dataset, you can’t just look at the properties of the dataset itself, you have to understand the context in which the data appears.

Photo by Andres Abogabir on Unsplash

If you’re new to data science and strapped for creativity when it comes to what to add to your portfolio, I can’t recommend building your own toy dataset enough. It might not be a project that will disrupt a multi-billion-dollar market, revolutionize an industry or shatter the status-quo, but you’ll know that data front and back and feel some real ownership over your analysis.

You’ll gain experience with hunting down data, merging multiple datasets, cleaning, finding anomalies, rescaling when necessarily, subsetting to the useful stuff, and making executive decisions with what you want to make it to the final product. Once you’ve got your toy dataset, you can step through tutorials in a totally unique context, with results that you have to interpret and evaluate on your own because that analysis hasn’t already been done by everyone else — and the more you use your toy dataset, the more you’ll get used to what it means to train compare multiple models.

In other words, even though you’re working with a toy data set, you’re doing real data science.