What’s the link between Oil and Freedom (Part 1)?

Now my brief ode to Elon Musk wasn’t without purpose. It was just an introduction to who the world should thank when the world finally stops being a sop and gets over its obsession with fossil fuels. In my head, development for countries goes a little like this:

  1. Country is poor.
  2. Country encourages trade as well as technological development.
  3. Citizens demand rights and personal freedoms in return, which country grants.
  4. Country is rich.
  5. Country exerts influence over other countries.

Now my problem with fossil fuels is that they take undeserving countries from step 1, straight to step 4. This is bad as the country has not actually developed, much like a child who never went to school but got given a high school diploma for free anyway – he’s rude, brash and will probably give you an atomic wedgie if you disagree with him.

So my question goes like this: Does access to Oil affect the way a country develops and the freedom of its citizens?

For ‘Access to oil’ I can use the % of total exports which are fuel –  easy to find thanks to the World Bank. Citizens’ freedom is a little more abstract, but the Cato Institute has recently released a fantastic publication where a multitude of countries are rated on a scale of Personal Freedom. A description for the index is as follows:

The index captures the degree to which people are free to enjoy the major freedoms often referred to as civil liberties—freedom of speech, religion, and association and assembly in the countries in the survey. In addition, it includes indicators on rule of law, crime and violence, freedom of movement, and legal discrimination against same-sex relationships. We also include five variables pertaining to women’s freedom that are found in various categories of the index.

As the Index was measured over the period of 2008-12, then the Fuel % variable will be averaged over that period. This also allows me to use a larger sample too as many countries have missing data for individual years. Here goes:


There’s a definite negative trend, but many countries seem scattered all over the place. It’s visible though that the scattered countries are generally of low GDP per Capita (labelled by colour). This makes sense as these countries are still poor, whether they have oil or otherwise, and hence are still stuck on step 1. I wanted to confirm this:


Again, there’s a strong positive trend between GDP per Capita and freedom, but in this case it’s logarithmic. It appears to level out and lose its variance at around $10,000, hence I can remove all values below that threshold:


Ah, that’s better. There’s a clear trend and the p-value is < 0.0001 – clearly significant! Although of course, this is only correlation and does not necessarily mean causation. A few reasons for caution:

  • A large proportion of the low freedom countries are Islamic Middle Eastern countries, hence this may well be due to culture. A large proportion of the world’s oil is located there and hence location may well be a confounding variable.
  • Social issues are complex and there will be multiple variables which will affect a country’s freedom. It may well be impossible to find them all.

I’ll be attempting to find all the variables and gain some insight for what that means for the future of the world in Part 2. See you then!


JF <3 EM

I’ve been reading a lot about Elon Musk recently thanks to the awesome blog Wait But Why. I’ll admit that when I first heard the name (e-lon, wtf), I thought of this:

“Jordan thinks I’m Elon Musk”

Oh how wrong I was – he rocks. He’s a genius. He’s cool. He’s running three multi-billion dollar companies. He’s changing the world. And he actually looks like this:

“I’m Elon Musk”

If it sounds like I love him, then I probably do – but only in a way you can love someone who turns errything he touches into diamonds. I have a theory that when this guy is through, he’ll be one of the most famous people in history: his name muttered in the same breath as Isaac Newton, Albert Einstein and Kim Kardashian. Here’s what he’s up to at the moment:

  • Revolutionising space travel and planning to send your grandchildren to Mars (not as sinister as it sounds) to protect them from the impending apocalypse.
  • Creating awesome electric cars and is going to make them so awesome that gasoline becomes a relic of the past, much like respect for elders.
  • Powering said awesome electric cars along with everything else with the sun and turning your house into a giant solar panel, preventing climate change in the process.

Now that’s why they call him the real Iron Man.

Mapping World Religions

I love the world. No, not in some tree hugging, Michael Jackson sorta way, but because it’s so damn interesting. So many stories entwined into one long, tragic but glorious tale: and nothing shares it quite like a map.

Thanks to the painstaking work of the guys at the Correlates of War Project, I managed to obtain country religion data [1] at the click of a button. From there, it’s a breeze to find the main religion and map its dominance using CartoDB. Here it is:

Cool huh? Just a glimpse tells a story of empire, conquest and isolationism. A few interesting insights:

  • The monopoly of Christianity in the New World is alarming. It’s obvious who won the race there.
  • Japan looks all adorable and lonely over in the East due to its historical isolationism.
  • The conquests of the Mohammedans in the 6th and 7th century were vast, and when nations become Islamic, they stay Islamic.
  • The influence of China over the North and the USA over the South are obvious on the Korean Peninsula.

Also it’s worth a quick mention of the limitations of the data set:

  • Generally each country was surveyed in a different study, and hence the results will differ in their reliability.
  • Following a religion will mean different things to different countries and cultures. To some it may mean being pious, whereas others it is just a source of identity. For example religion seems to be very prominent in the Nordic countries, but in reality this isn’t true in the traditional sense.

So take the results with a pinch (or truckload) of salt. Arigato and Sayonara.

[1] Zeev Maoz and Errol A. Henderson. 2013. “The World Religion Dataset, 1945-2010: Logic, Estimates, and Trends.” International Interactions, 39: 265-291. 

The city might never sleep – but do the cyclists?

Ever wanted to visualise CitiBike activity in the Big Apple on a sunny Sunday? Nah, me neither. But I thought it’d be a fun project anyways so here goes.

Although born and bred in London – or King’s Landing as I like to call it to my friends from the cold, dark North – New York is generous enough to supply its data in real time, whereas King’s Landing – nada. It is the Land of the Free (data) after all.

A touch of automation and preprocessing using Python, with a little SQL thrown in and voilà, here it is. Zoom out and enjoy.

data [dey-tuh, dat-uh, dah-tuh]

​information, ​especially ​facts or ​numbers, ​collected to be ​examined and ​considered and used to ​help decision-making, or ​information in an ​electronic ​form that can be ​stored and used by a ​computer.

Oh heeeeeell no. Me and data? That’s about as tragic a communion since two star crossed lovers hooked up in Verona. What sort of punk ass advice is that.

Besides, I don’t even know what data really is. Don’t even get me started on the spreadsheets. And everyone who does data looks a little like this, right?


But hey-ho, he’s got a cigarette and I guess they used to be ‘in’. Plus, big framed glasses 1,000 years before their time is hipster. Maybe I’ll give my old pal Google a call and see what’s up.

“Shalom Google, m’ old chum. I’ve heard on the grapevine that you know a little about data. What’s the scoop?”

Big Data and the History of Information Storage

“That was fun, and a pretty big buildup. What’s actually being done with data then?”

How Target Figured Out A Teen Girl Was Pregnant Before Her Father Did

“Classic. But c’mon – I’m not doing this just to get a young girl grounded. Is it actually doing anything with any importance?”

This algorithm can predict a revolution

Ebola: Can big data analytics help contain its spread?

Google Earth Engine brings together the world’s satellite imagery

How big data is driving the sharing economy

The Refugee Project

“OMFG, data’s actually pretty awesome – but data scientists are still just a bunch of dweebs, right?!”

Data Scientist: The Sexiest Job of the 21st Century