District Data Labs

Creating a Hadoop Pseudo-Distributed Environment

Hadoop developers usually test their scripts and code on a pseudo-distributed environment (also known as a single node setup), which is a virtual machine that runs all of the Hadoop daemons simultaneously on a single machine. This allows you to quickly write scripts and test them on limited data sets without having to connect to a remote . . .

Read More

Posted in: hadoop

January 08, 2015

Simple CSV Data Wrangling with Python

Efficient Processing, Schemas, and Serialization

I wanted to write a quick post today about a task that most of us do routinely but often think very little about - loading CSV (comma-separated value) data into Python. This simple action has a variety of obstacles that need to be overcome due to the nature of serialization and data transfer. In fact, I'm routinely surprised how often I . . .

Read More

Posted in: pythonwrangling

November 08, 2014

Conditional Probability with R

Likelihood, Independence, and Bayes

In addition to regular probability, we often want to figure out how probability is affected by observing some event. For example, the NFL season is rife with possibilities. From the beginning of each season, fans start trying to figure out how likely it is that their favorite team will make the playoffs. After every game the team plays, these . . .

Read More

Posted in: rprobability

October 23, 2014

Computing a Bayesian Estimate of Star Rating Means

Consumers rely on the collective intelligence of other consumers to protect themselves from coffee pots that break at the first sign of water, eating bad food at the wrong restaurant, and stunning flops at the theater. Although occasionally there are metrics like Rotten Tomatoes, we primarily prejudge products we would like to consume through . . .

Read More

Posted in: python

September 11, 2014

How to Develop Quality Python Code

Workflows and Development Tools

Developing in Python is very different from developing in other languages. Python is an interpreted language like Ruby or Perl, so developers are able to use read-evaluate-print loops (REPLs) to execute Python in real-time. This feature of Python means that it can be used for rapid development and prototyping because there is no build . . .

Read More

Posted in: python

August 20, 2014

What Are the Odds?

An Intro to Probability with R

The probability of an event represents the likelihood of the event to occur. For example, most of us would agree that the probability of getting a heads after flipping a fair coin is 0.5 or that the probability of getting a one on rolling a fair die is 1/6. However, there are many more places where we encounter probabilities in our lives. . . .

Read More

Posted in: rprobability

August 18, 2014

How to Transition from Excel to R

An Intro to R for Microsoft Excel Users

In today's increasingly data-driven world, business people are constantly talking about how they want more powerful and flexible analytical tools, but are usually intimidated by the programming knowledge these tools require and the learning curve they must overcome just to be able to reproduce what they already know how to do in the . . .

Read More

Posted in: r

August 08, 2014