Data Science

A kid’s guide to data science – clustering

Bedtimes are the Worst

Having a bedtime is tough when you’re a kid. I get it. When the YouTube video you’re watching gets cut short because you have to get ready for bed, it’s the worst.

But like most kids, occasionally you get to stay up past your bedtime. Have you ever wondered why adults let kids stay up past their bedtimes? Think about it. Every so often, you get to stay up late.

Why? What’s different about those days? Maybe you should keep track of your bedtimes to see if you can discover the magic formula to staying up late!

Tracking Your Bedtimes

Tracking your bedtimes is easy. Let’s make a list of things that might help you solve this puzzle.

  • The date. It’s good to know which days you go to bed on time versus days you stay up late.
  • Your age. As you get older, you’re allowed to stay up later. That’s a good thing!
  • Is it a school night? You almost never stay up late on a school night.
  • Are you home? 
  • Is it a sleepover? Sleepovers are the best!
  • Are you sick?
  • Your bedtime. (Boo, Hiss!)
  • The actual time you went to bed that day. 

Look at this in action.

  • January 14, 2016 (The date)
  • 12 (Your age)
  • Yes (Is it a school night?)
  • Yes (Are you home?)
  • No (Is it a sleepover?)
  • No (Are you sick?)
  • 8:30pm (Your bedtime.)
  • 8:30pm (Actual time you went to bed.)

Great! You’ve got your first bedtime tracked! You’re well on your way.

Super Bedtime Tracking

Now let’s change the way we’re tracking your bedtimes to make it easier to track lots of days.

Let’s take a look at what 3 days looks like.

Screen Shot 2016-01-14 at 10.08.09 PM


Now imagine tracking bedtimes for a whole year—all 365 days. That’s a lot of data!

Clustering the Data

If you had a year’s worth of bedtimes tracked, you could begin to look for patterns. Are certain days better than others for staying up late? Clustering, aka grouping, the data allows you to observe meaningful patterns. Do you see any interesting patterns in the table below? It looks different from the table above since we consolidated the data into 4 groups.

Screen Shot 2016-01-25 at 5.16.46 PM

Group 4 is a winner! Nothing exciting here though—you already know that you get to stay up late during weekend sleepovers.

Screen Shot 2016-01-25 at 5.16.14 PM

Groups 1 and 3 are pretty boring. No staying up late on school nights. Boo!

Group 2 is interesting. Friday is not a school night, but being sick means going to bed early.

What did we learn?

If you want to stay up late more often…

  1. Have more sleepovers!
  2. Don’t get sick! The easiest way to avoid colds is to wash your hands!

3 tips to improve your leadership skills

What makes a great leader? Here are three things you can do to help improve your leadership skills.

1. Become a better communicator.

Great leaders are effective communicators. If you struggle in this department, it may be time to hone your communication skills. When it comes to effective communication, practice makes perfect. I used to hate public speaking and avoided it at all cost. Everything changed when I joined Toastmasters International. Whether you’re giving impromptu comments or a prepared speech, every meeting provides an opportunity to speak in a supportive environment. Find a club near you to get started.

2. Gain confidence.

Great leaders are confident. Did you know that changing your body language can make you feel more confident?  Regardless of how you really feel, “high-power poses” can affect testosterone and cortisol levels in the brain—tricking your brain into feeling more confident. Amy Cuddy’s TED talk will explain how. Try a power pose before your next big meeting or interview.

3. Develop self-awareness.

Great leaders have self-awareness. They understand and reflect on their strengths and weaknesses. They embrace their failures, learn from them, and know that they must do better. You can start to develop self-awareness by taking a free online assessment to better understand your personality, style, and strengths and weaknesses.

Big Data

How Big is Your Data?

Big Data architecture can add layers of complexity to an IT environment.  Not sure if you’re dealing with Big Data?  Use Gartner’s 3Vs as a litmus test: Volume, Velocity, and Variety.

The 3Vs become a reasonable test on whether you should add Big Data to your architecture.

  1. Volume. The amount of data.  How much data are you processing? Some smartwatch manufacturers store every user interaction. For these companies, this might be hundreds of terabytes or petabytes of data.
  2. Velocity. The speed of data. How fast is your data moving in and out of the system? Some data is created and captured in realtime at the point of the transaction.
  3. Variety. The assortment of data. Do you have different types of data? Data can consist of text, images, audio, video and the supporting metadata.

Having only 2 of the 3 Vs may mean that you can avoid adding Big Data to your architecture and skip the added complexity.


Failure is an option

Traf-O-Data 8008

Have you ever heard of Traf-O-Data 8008?  If you answered “no,” you’re not alone. Bill Gates’s first attempt at entrepreneurship was a bit of a flop. Traf-O-Data 8008 was supposed to turn traffic tapes into useful data. Things were so bad that the product didn’t work during a demo for a local County government.  Some time later, the State of Washington began offering free traffic processing services, ending the need for Traf-O-Data 8008. Instead of giving up, Bill Gates used his first failure to help lay the foundation for what would become Microsoft.

A Key to Success is Failure.

Failure is an option that can bring growth and resilience. Many of the world’s greatest business executives, sports athletes, and leaders attribute failure as a key to their success.

‘Shark Tank’ investor Kevin O’Leary likes to invest in entrepreneurs who have felt the sting of failure because he believes “they have a better chance in the future.”

Make the failure work for you

  1. Separate yourself from the failure. You are not a failure. Something you tried didn’t work.
  2. Accept the failure and move on. You can’t change the past so stop dwelling on it.  The time and energy you spend talking and thinking about the failure could be used on moving forward.
  3. Think about what the experience has taught you. Use this as an opportunity to learn and grow. What aspects of your approach would you adjust or change?
  4. Shift your focus to something new. It’s time to adjust your focus to something new and exciting. Consider the past failure as an asset.


Strategic Planning

Your IT Infrastructure is Dying

Eventually, all of your technology will die.  According to manufacturer specifications, every product has a useful service life.  It’s the IT Circle of  Life, aka IT Asset Management, and should be part of your strategic plan and budget.

I once led technology operations for a company with a small data center and an APC Symmetra power backup unit consisting of 30+ batteries.  A simple audit revealed that 24 of the batteries had surpassed their expected life by at least a year.  At $500 per replacement battery, the potential risk to the budget was $12,000. Thankfully, only six batteries failed that year.

Fortunately, small and medium sized businesses can take a few simple steps to track IT assets and plan accurately for the future.

  • Develop a system. Consider implementing a system to track all IT assets.  Include details like purchase dates, locations, serial numbers, and warranty information. Free software packages like SpiceWorks make it easy.
  • Set lifecycle policies for your IT assets. Use the manufacturer’s End of Service Life or consider the following averages as a guide to get you started.
  • Ensure that resource and budget allocations are accurate. How many IT assets are going to die next year? Include reasonable replacement cost estimates in your budget.

Keep it simple and begin tracking today.

Tag Clouds

Twitter Tag Clouds – Visualizing Popular Hashtags

tag cloud is a visual representation of text data and is typically made up of single word tags. The frequency of each tag is usually represented by size or color.

I created the following tag clouds using Twitter’s API and two KNIME workflows. Twitter’s API returned 1379 tweets by searching the #browns hashtag. The Browns are currently in the news for firing both their head coach and GM, so I thought the hashtag would make a good candidate for tag clouds.


First Tag Cloud

Tag cloud number 1 is based on common keyword tags found in all 1379 tweets. I stripped usernames and URLs from the tweets before processing them. I then used KNIME’s POS Tagger node to assign parts of speech to each term. The resulting tag cloud highlights nouns in brown, verbs in orange, and adjectives in black. Larger words appear more often in the tweets that were analyzed.


Second Tag Cloud

Tag cloud number 2 is based on the same tweets and keyword tags. For this tag cloud, I used KNIME’s Named Entity Tagger node to tag terms as either organizations, locations, or people. The resulting tag cloud highlights people in brown, organizations in orange, and locations in black. Terms in green could not be identified by the tagger. As with the cloud above, the larger the font, the higher the tag frequency.


Interested in creating your own tag clouds? I’ll have instructions posted soon. Until then, feel free to leave a comment with your Twitter username and the hashtag you’d like analyzed. I’ll tag you with the results.