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:
Select an image which you would like to mimic in both color and shape
Read your image into Python using numpy
Read your text into Python using open() and read()
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 →
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:
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.
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: