Regression discontinuity design (RDD) is an econometric staple that is often overlooked in data science. Here, I use RDD in Python to determine whether children should be allowed to drink beer.

Photo by George Cox on Unsplash

Data science is all the rage at the moment, and quite rightly. Econometrics, the brother of data science (statistics being the father) sometimes feels a bit left out. Despite a large majority of their techniques and procedures being the same, some really useful econometric techniques often get forgotten about in modern data science.

An example of some of my journal-published econometric work can be seen here.

Data science focuses mostly on prediction, trying to determine causal inference is often not considered important. Data science prediction techniques are fantastic as long as the underlying systems and relationships do not change, but…

Laptop showing data
Photo by Lukas Blazek on Unsplash

A surprisingly easy approach to showcasing your Matplotlib plots and Pandas dataframes online for the whole world to see — in less than 100 lines of code.

Have you ever wanted to have a visualisation or dataframe accessible from your laptop or phone without having to run the code every time? Wouldn't it be just great if you could leave it running in the background and have a web address in which you could access the data anytime, anyplace (with an internet connection)? Especially one that could automatically update when new data was available.

Turns out, you can, and it's not that difficult at all. I taught myself how to do it over the last week just from Google, but there's a lot of rubbish out there…

In day to day life, we often have to make predictions with no data. Here are some ways to make better guesses.

Photo by Todd Trapani on Unsplash

Often in life, you’ll have to predict things with little or no data. Or simply you will know the distribution of a population and nothing more. For example, what is the probability that a Bonsai tree you’ve been gifted for Christmas will make it to the awkward family gathering?

In this article, I’ll discuss briefly some great insights from Statistics that will help you answer such questions. I’m not promising to predict the future, I’m simply going to show you the best techniques we have to do so, which often produce surprisingly good results despite our lack of data.


An extract from Tigers in a Bamboo Grove (Tigers at Play), mid-1630s, by Kano Tan’yū (Nanzen-ji, Kyoto)

Stoic philosophers and Zen monks approach death with parallel resoluteness. The way they approach death has resounding implications for our lives.

The Tiger and the Strawberry

There is an elegant simplicity in Zen Buddhism. In Hemingway fashion, more is said with less. The Zen tradition is centred around a master-student relationship and one of the most useful styles of teachings Zen has to offer is its Koans. Koans are elegant vignettes that attempt to capture an idea without explicitly stating it. This results in the individual pondering the meaning of the story and coming to a moment of realisation on their own accord. The realisation…

See your future self as a bit of a lost soul who just needs some help down the right path.

Monk meditating overlooking a lake
Photo by Simon Migaj on Unsplash

A lot of the theory on forming habits focuses on raw willpower and hard work. Behavioural Economics disagrees.

I’ve worked as a Behavioural Economist for a few years now and I spend most of my time trying to influence or predict other peoples’ decisions. I decided it was about time to use some of my tricks on myself. Here’s how you can too.

An exceptionally brief introduction into Behavioural Economics

Traditional economics assumed that individuals were purely rational, robotic entities that always made the correct decision that would ultimately maximize the benefit to themselves — this idea of a man was coined “Homo Economicus”.

Turns out, we aren’t even close to rational a lot of the time. We are quite often, systematically (and predictably) irrational.

The death of Seneca depicted by Manuel Domínguez Sánchez
The death of Seneca depicted by Manuel Domínguez Sánchez

The ancient wisdom of the Stoics has never been more relevant.

The 21st century, the age of Facebook, Instagram, Snapchat, and whatever is next in the production line. The age of jealousy and material desire. It’s not that social media doesn’t have its uses, it does, but as with everything else in the world, there are negative aspects. This short essay looks at Stoic philosophy as a solution to the negative psychological aspects of social media.

A brief introduction to Stoicism

If you’re unfamiliar with Stoicism, I’ll give you a short introduction. Stoicism is a philosophy of personal ethics, which was founded in the third century BC by Zeno of Citium. …

Albert Camus

Some of Camus’ most insightful discoveries were deduced from his experience playing the beautiful game.

“What I know most surely about morality and the duty of man, I owe to football.”

Albert Camus died in a car crash in the small French town of Villeblevin in 1960, in his pocket were the train tickets he decided not to use at the last minute.

Camus was a French-Algerian Philosopher, Author, and journalist. Three years before his death he won the Nobel prize for literature. In his adolescence, he was a passionate lover of Football until he was forced to give up the game at seventeen due to contracting tuberculosis.

Camus is most commonly known for works…

Photo by Jac Alexandru on Unsplash

Here are some tips, with code, to clean, analyze and visualize survey data in Python.

Before we start, if you haven’t run your survey yet, here are some of my tips on how to get the most respondents using data and psychological insights. Without good (or enough) data, any model you build, or inference you extract, will be useless.

Survey data is notoriously a pain, primarily because people are lazy and do strange things when answering surveys. Survey software can be annoying too. …

data streams
Photo by Joshua Sortino on Unsplash

Employing these techniques gives me, on average, 70% more responses when conducting research surveys

Getting people to fill out a survey is an unfortunately complicated business. There’s no silver bullet to get everyone to fill it out all of the time. However, I’ve grouped a mix of techniques that can significantly help when used in conjunction with each other.

As we all know, good data, and a good amount of data, is essential to building any working models. Therefore, this article will help you increase the amount of data you collect when you go attempt to collect it from the public.

  • Firstly, I’ll discuss the leverage salience theory and its implications for getting individuals…

Photo by Nathan Rogers on Unsplash

I used data to make fantasy football easy — and here’s the full code so you can too.

This will probably be my last post about FPL for a couple of reasons. Firstly, I have other things to work on and secondly, my friends have been reading these and they are starting to catch me up.

Therefore, to leave off I’ve created a very simple fantasy cheat sheet that incorporates both ROI (see my previous posts for an explanation) and upcoming fixtures. It, therefore, combines both major aspects of picking a player: their form as well as their next few opponents.

Therefore, I won't dwell on it and will get straight to the point. Below is an embedded…

James Asher

Possibly the best Scottish Economist since Adam Smith. I write about Data Science, Economics, and Philosophy. Writer for Towards Data Science + others.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store