Author Archives: Scott Stoltzman

George Washington as a Constitutional Word Cloud

Is George Washington better looking on the dollar bill or represented by a word cloud built with the text of The Constitution of the USA?

A colleague recently asked me that exact question. If you want to be taken seriously in the data science world, you better be able to answer something like this!

I decided that it would be fun to show off a Python package by Andreas Mueller called word_cloud (here) to make a fun image with the text of the Constitution and an image of one of the Founding Fathers.

I must warn you, word clouds are like pie charts people like the way they look but clouds don’t provide much information. That said, this package is really neat because it allows you to easily turn text into images utilizing masks, colors, and numpy!

I’ll keep this post short, what you want to do is simple:

  1. Select an image which you would like to mimic in both color and shape
  2. Read your image into Python using numpy
  3. Read your text into Python using open() and read()
  4. Make your word cloud!

Continue reading

Simulating Probabilities – The Monty Hall Problem

Psychology vs. Probability

Anyone old enough to remember the Monty Hall problem from the old TV Show Let’s Make a Deal? It’s a classic probability problem – but despite its simplicity, it can be hard to understand what choices to make to maximize your odds of winning.

This is the problem:

You are a contestant on a game show. The host displays three doors. One has the brand new car behind it while behind the other doors have goats behind them. Here’s a beautiful image of all possible options you would have: Continue reading

Microsoft Cognitive Services Vision API in R

Microsoft Cognitive Services Vision API in R


A little while ago I did a brief tutorial of the Google Vision API using RoogleVision created by Mark Edmonson. I couldn’t find anything similar to that in R for the Microsoft Cognitive Services API so I thought I would give it a shot. I whipped this example together quickly to give it a proof-of-concept but I could certainly see myself building an R package to support this (unless someone can point to one – and please do if one exists)!

A quick example, sending this image retrieved the location of the human face and created a caption! Here’s my dog lined up next to his doppelganger:

Continue reading

tropical storms data

Exploratory Data Analysis of Tropical Storms in R

Exploratory Data Analysis of Tropical Storms in R

The disastrous impact of recent hurricanes, Harvey and Irma, generated a large influx of data within the online community. I was curious about the history of hurricanes and tropical storms so I found a data set on data.world and started some basic Exploratory data analysis (EDA).

EDA is crucial to starting any project. Through EDA you can start to identify errors & inconsistencies in your data, find interesting patterns, see correlations and start to develop hypotheses to test. For most people, basic spreadsheets and charts are handy and provide a great place to start. They are an easy-to-use method to manipulate and visualize your data quickly. Data scientists may cringe at the idea of using a graphical user interface (GUI) to kick-off the EDA process but those tools are very effective and efficient when used properly. However, if you’re reading this, you’re probably trying to take EDA to the next level. The best way to learn is to get your hands dirty, let’s get started.

Continue reading

US Immigration Enforcement – Part 1

Trend of US Immigration Enforcement

In the coming months I’ll be digging into the immigration enforcement data posted on data.world. I encourage anyone to take this data and either add to the project or to do something on their own. I will be bringing in external data sources to merge as well (which I did for this first plot).

If you’re only here for a “high-level nugget” of information, the basic thing you can see is:

Things have changed since 1925!

Continue reading