What Really Happened to Nigeria’s Economy?

You may have heard the news that the size Nigeria’s economy now stands at nearly $500 billion. Taken at face value (as many commenters have seemed all to happy to do) this means that the West African state “overtook” South Africa’s economy, which was roughly $384 billion in 2012. Nigeria’s reported GDP for that year was $262 billion, meaning it roughly doubled in a year.

How did this “growth” happen? As Bloomberg reported:

On paper, the size of the economy expanded by more than three-quarters to an estimated 80 trillion naira ($488 billion) for 2013, Yemi Kale, head of the National Bureau of Statistics, said at a news conference yesterday to release the data in the capital, Abuja….

The NBS recalculated the value of GDP based on production patterns in 2010, increasing the number of industries it measures to 46 from 33 and giving greater weighting to sectors such as telecommunications and financial services.

The actual change appears to be due almost entirely to Nigeria including figures in GDP calculation that had been excluded previously. There is nothing wrong with this, per se, but it makes comparisons completely unrealistic. This would be like measuring your height in bare feet for years, then doing it while wearing platform shoes. Your reported height would look quite different, without any real growth taking place. Similar complications arise when comparing Nigeria’s new figures to other countries’, when the others have not changed their methodology.

Nigeria’s recalculation adds another layer of complexity to the problems plaguing African development statistics. Lack of transparency (not to mention accuracy) in reporting economic activity makes decisions about foreign aid and favorable loans more difficult. For more information on these problems, see this post discussing Morten Jerven’s book Poor NumbersIf you would like to know more about GDP and other economic summaries, and how they shape our world, I would recommend Macroeconomic Patterns and Stories (somewhat technical), The Leading Indicators, and GDP: A Brief but Affectionate History.

“The Impact of Leadership Removal on Mexican Drug Trafficking Organizations”

That’s the title of a new article, now online at the Journal of Quantitative Criminology. Thanks to fellow grad students Cassy Dorff and Shahryar Minhas for their feedback. Thanks also to mentors at the University of Houston (Jim Granato, Ryan Kennedy) and Duke University (Michael D. Ward, Scott de Marchi, Guillermo Trejo) for thoughtful comments. The anonymous reviewers at JQC and elsewhere were also a big help.

Here is the abstract:


Has the Mexican government’s policy of removing drug-trafficking organization (DTO) leaders reduced or increased violence? In the first 4 years of the Calderón administration, over 34,000 drug-related murders were committed. In response, the Mexican government captured or killed 25 DTO leaders. This study analyzes changes in violence (drug-related murders) that followed those leadership removals.


The analysis consists of cross-sectional time-series negative binomial modeling of 49 months of murder counts in 32 Mexican states (including the federal district).


Leadership removals are generally followed by increases in drug-related murders. A DTO’s home state experiences more subsequent violence than the state where the leader was removed. Killing leaders is associated with more violence than capturing them. However, removing leaders for whom a $30m peso bounty was offered is associated with a smaller increase than other removals.


DTO leadership removals in Mexico were associated with an estimated 415 additional deaths during the first 4 years of the Calderón administration. Reforming Mexican law enforcement and improving career prospects for young men are more promising counter-narcotics strategies. Further research is needed to analyze how the rank of leaders mediates the effect of their removal.

I didn’t shell out $3,000 for open access, so the article is behind a paywall. If you’d like a draft of the manuscript just email me.

Mexico Update Following Joaquin Guzmán’s Capture

As you probably know by now, the Sinaloa cartel’s leader Joaquin Guzmán was captured in Mexico last Saturday. How will violence in Mexico shift following Guzman’s removal?

(Alfredo Estrella/AFP/Getty Images)

(Alfredo Estrella/AFP/Getty Images)

I take up this question in an article forthcoming in the Journal of Quantitative Criminology. According to that research (which used negative binomial modeling on a cross-sectional time series of Mexican states from 2006 to 2010), DTO leadership removals in Mexico are generally followed by increased violence. However, capturing leaders is associated with less violence than killing them. The removal of leaders for whom a 30 million peso bounty (the highest in my dataset, which generally identified high-level leaders) been offered is also associated with less violence. The reward for Guzmán’s capture was higher than any other contemporary DTO leader: 87 million pesos. Given that Guzmán was a top-level leader and was arrested rather than killed, I would not expect a significant uptick in violence (in the next 6 months) due to his removal. This follows President Pena Nieto’s goal of reducing DTO violence.

My paper was in progress for a while, so the data is a few years old. Fortunately Brian Phillips has also taken up this question using additional data and similar methods, and his results largely corroborate mine:

Many governments kill or capture leaders of violent groups, but research on consequences of this strategy shows mixed results. Additionally, most studies have focused on political groups such as terrorists, ignoring criminal organizations – even though they can represent serious threats to security. This paper presents an argument for how criminal groups differ from political groups, and uses the framework to explain how decapitation should affect criminal groups in particular. Decapitation should weaken organizations, producing a short-term decrease in violence in the target’s territory. However, as groups fragment and newer groups emerge to address market demands, violence is likely to increase in the longer term. Hypotheses are tested with original data on Mexican drug-trafficking organizations (DTOs), 2006-2012, and results generally support the argument. The kingpin strategy is associated with a reduction of violence in the short term, but an increase in violence in the longer term. The reduction in violence is only associated with leaders arrested, not those killed.

A draft of the full paper is here.

Constitutional Forks Revisited

Around this time last year, we discussed the idea of a constitutional “fork” that occurred with the founding of the Confederate States of America. That post briefly explains how forks work in open source software and how the Confederates used the US Constitution as the basis for their own, with deliberate and meaningful differences. Putting the two documents on Github allowed us to compare their differences visually and confirm our suspicions that many of them were related to issues of states’ rights and slavery.

Caleb McDaniel, a historian at Rice who undoubtedly has a much deeper and more thorough knowledge of the period, conducted a similar exercise and also posted his results on Github. He was faced with similar decisions of where to obtain the source text and which differences to retain as meaningful (for example, he left in section numbers where I did not). My method identifies 130 additions and 119 deletions when transitioning between the USA and CSA constitutions, whereas the stats for Caleb’s repo show 382 additions and 370 deletions.

What should we draw from these projects? In Caleb’s words:

My decisions make this project an interpretive act. You are welcome to inspect the changes more closely by looking at the commit histories for the individual Constitution files, which show the initial text as I got it from Avalon as well as the changes that I made.

You can take a look at both projects and conduct a difference-in-differences exploration of your own. More generally, these projects show the need for tools to visualize textual analyses, as well as the power of technology to enhance understanding of historical and political acts. Caleb’s readme file has great resources for learning more about this topic including the conversation that led him to this project, a New York Times interactive feature on the topic, and more.

Uncle Bob on Public Policy and Software Professionalism

Software developers need to develop their own professional standard, or politicians will do it for them. That’s what “Uncle” Bob Martin argues in this interview starting about 28:00:

Healthcare.gov was awful. That’s a case where a software failure interfered with a public policy. Whether you agree with that policy or not that should scare the hell out of you, because the next public policy may be one much more important and if our software can’t cope with it we could be in a really deep, deep hole.

At some point or another, some software team is going to screw up so badly that there is a disaster of tremendous loss of life. At that point the politicians of the world will decide they have to do something about it. If we are not there with a set of minimum standards that we follow, practices that we follow, if we can’t convince those politicians that we have been behaving professionally and that this was an accident–if we can’t convince them that we weren’t being negligent–then they’ll have no choice but to regulate us. They’ll pass laws about which languages we use, what platforms we can program on, what books we have to read, and so on. It will not be a good outcome. I don’t want to be a civil servant.

The Economy That Is Stanford

Five of the six most-visited websites in the world are here, in ranked order: Facebook, Google, YouTube (which Google owns), Yahoo! and Wikipedia. (Number five is a Chinese-language site.) If corporations founded by Stanford alumni were to form an independent nation, it would be the tenth largest economy in the world, with an annual revenue of $2.7 trillion, as some professors at that university recently calculated. Another new report says: ‘If the internet was a country, its gross domestic product would eclipse all others but four within four years.’

That’s from this London Review of Books piece by Rebecca Solnit. The October, 2012, research report on which the claim is based is here, based on survey data. Solnit’s piece is interesting throughout, including a discussion of parallels and differences between the tech boom and the Gold Rush.

Political Forecasting and the Use of Baseline Rates

As Joe Blitzstein likes to say, “Thinking conditionally is a condition for thinking.” Humans are not naturally good at this skill. Consider the following example: Kelly is interested in books and keeping things organized. She loves telling stories and attending book clubs. Is it more likely that Kelly is a bestselling novelist or an accountant?

Many of the “facts” about Kelly in that story might lead you to answer that she is a novelist. Only one–her sense of organization–might have pointed you toward an accountant. But think about the overall probability of each career. Very few bookworms become successful novelists, and there are many more accountants than (successful) authors in the modern workforce. Conditioning on the baseline rate helps make a more accurate decision.

I make a similar point–this time applied to political forecasting–in a recent blog post for the blog of Mike Ward’s lab (of which I am a member):

One piece of advice that Good Judgment forecasters are often reminded of is to use the baseline rate of an event as a starting point for their forecast. For example, insurgencies are a very rare event on the whole. For the period January, 2001 to August, 2013, insurgencies occurred in less than 10 percent of country-months in the ICEWS data set.

From this baseline, we can then incorporate information about the specific countries at hand and their recent history… Mozambique has not experienced an insurgency for the entire period of the ICEWS dataset. On the other hand, Chad had an insurgency that ended in December, 2003, and another that extended from November, 2005, to April, 2010. For the duration of the ICEWS data set, Chad has experienced an insurgency 59 percent of the time. This suggests that our predicted probability of insurgency in Chad should be higher than for Mozambique.

I started writing that post before rebels in Mozambique broke their treaty with the government. Maybe I spoke too soon, but the larger point is that baselines are the starting point–not the final product–of any successful forecast.

Having more data is useful, as long as it contributes more signal than noise. That’s what ICEWS aims to do, and I consider it a useful addition to the toolbox of forecasters participating in the Good Judgment Project. For more on this collaboration, as well as a map of insurgency rates around the globe as measured by ICEWS, see the aforementioned post here.

Visualizing Political Unrest in Egypt, Syria, and Turkey

The lab of Michael D. Ward et al now has a blog. The inaugural post describes some of the lab’s ongoing projects that may come up in future entries including modeling of protests, insurgencies, and rebellions, event prediction (such as IED explosions), and machine learning techniques.

The second post compares two event data sets–GDELT and ICEWS–using recent political unrest in the Middle East as a focal point (more here):

We looked at protest events in Egypt and Turkey in 2011 and 2012 for both data sets, and we also looked at fighting in Syria over the same period…. What did we learn from these, limited comparisons?  First, we found out first hand what the GDELT community has been saying: the GDELT data are in BETA and currently have a lot of false positives. This is not optimal for a decision making aid such as ICEWS, in which drill-down to the specific events resulting in new predictions is a requirement. Second, no one has a good ground truth for event data — though we have some ideas on this and are working on a study to implement them. Third, geolocation is a boon. GDELT seems especially good a this, even with a lot of false positives.

The visualization, which I worked on as part of the lab, can be found here.  It relies on CartoDB to serve data from GDELT and ICEWS, with some preprocessing done using MySQL and R. The front-end is Javascript using a combination of d3 for timelines and Torque for maps.


GDELT (green) and ICEWS (blue) records of protests in Egypt and Turkey and conflict in Syria

If you have questions about the visualizations or the technology behind them, feel free to mention them here or on the lab blog.

Technology and Government: San Francisco vs. New York

In a recent PandoMonthly interview, John Borthwick made a very interesting point. Many cities are trying to copy the success of Silicon Valley/Bay Area startups by being like San Francisco: hip, fun urban areas designed to attract young entrepreneurs and developers (Austin comes to mind). However, the relationship between tech and other residents is a strained one: witness graffiti to the effect of “trendy Google professionals raise housing prices” and the “startup douchebag” caricature.

New York, on the other hand, has a smaller startup culture (“Silicon Alley”) but much closer and more fruitful ties between tech entrepreneurs and city government. Mayor Bloomberg has been at the heart of this, with his Advisory Council on Technology and his 2012 resolution to learn to code. Bloomberg’s understanding of technology and relationship with movers and shakers in the industry will make him a tough act to follow.

Does this mean that the mayors of Chicago, Houston, or Miami need to be writing Javascript in their spare time? Of course not. But making an effort to understand and relate to technology professionals could yield great benefits.

Rather than trying to become the next Silicon Valley (a very tall order) it would be more efficacious for cities to follow New York’s model: ask not what your city can do for technology, but what technology can do for your city. Turn bus schedule PDF’s into a user-friendly app or–better yet, for many low-income riders–a service that allows you to text and see when the next bus will arrive. Instead of calling the city to set up services like water and garbage collection, add a form to the city’s website. The opportunities to make city life better for all citizens–not just developers and entrepreneurs–are practically boundless.

I was happy to see San Francisco take a small step in the right direction recently with the Open Law Initiative, but there is more to be done, and not just in the Bay Area. Major cities across the US and around the world could benefit from the New York model. See more of the Borthwick interview below:

The Culture That is Unix

We are about one year away from the Unix’s 35th birthday, but I recently enjoyed going through this piece from the 25th anniversary. I especially enjoyed the parts about how Unix was governed, and the way that its origins influenced its organizing structure in later years:

The general attitude of AT&T toward Unix–“no advertising, no support, no bug fixes, payment in advance”–made it necessary for users to band together….

The decision on the part of the AT&T lawyers to allow educational institutions to receive Unix but to deny support or bug fixes had an immediate effect: It forced the users to share with one another. They shared ideas, information, programs, bug fixes, and hardware fixes….

[Bill] Joy began producing the BSD Berkeley Software Distribution. It was first offered in March 1978. The license was on one side of a sheet of paper….

The fact that the BSD release had a simple license agreement, credited those who produced the software, and was priced at the actual cost of the media and distribution exemplifies what was best about Unix in its first decade and what made it such a popular operating system….

Sunil Das, of City University, London, notes that “technically, Unix is a simple, coherent system that pushes a few good ideas to the limit.” But let history not forget that some of those ideas had nothing to do with operating systems; they had to do with sharing, collaboration, and the user-driven evolution of technology supported by a capable, concerned pan-corporate community of developers and users.