Satellite Image Time Lapse of Artisanal Mining in Peru

My last post was about gold and mercury prices, and how we might measure their relationship. We would expect a relationship between prices of these metals because mercury is used in artisanal and small scale gold mining (ASGM). We may or may not see a signal in mercury prices related to ASGM, but we most definitely see the effects of ASGM on the landscape on a massive scale. Using the Landsat Annual Timelapse tool in Google Earth Engine, I created this animation showing the explosive growth of ASGM and associated deforestation near Huaypetue in the Madre de Dios region of Peru. Click on the image below to view the animation.

asgm landsat anim

You can see that beginning in the late 1990s, large areas around rivers turn from green (rain forest), to brown (cleared areas for mining). The trend seems to accelerate in the last 10-15 years. You can explore the region as it appears today in Google Maps:

And because it’s fun to play with Google maps, here is a striking oblique image of the region.

Zooming in a bit closer, seen from a plane flown by the Carnegie Airborne Observatory, the impacts of mining come into even sharper view:

The scenes on the ground look every bit as desolate as you would expect from the satellite and airborne imagery:

Embed from Getty Images

Embed from Getty Images Embed from Getty Images

If you are looking for more information on artisanal mining in Madre de Dios, this article in Nature is a good place to start. The Guardian has also been covering this region. This piece focuses on mercury use in mining and its toxic impacts.

Is Artisanal Gold Mining Driving the Price of Mercury?

This is the second in a multiple part series on mercury. In the last post, we explored global mercury prices and production over the last century. In this post, my aim is to answer the following questions: Is is possible to resolve a signal in the price of mercury that is attributable to its use in gold mining? Could the price of mercury be used as a predictor of the amount of gold produced using mercury?

First, some background.  Mercury has a very interesting property in that it forms amalgams with other metals.  A silver dental filling is an amalgam of mercury and silver. If you add mercury to ore or sediment containing gold, the mercury will suck up some of the gold into an amalgam. Then you can heat the amalgam to evaporate the mercury, leaving you with just gold.

This method was used for centuries to recover gold and silver. Today, large-scale industrial mines use other methods that are more efficient and do not release persistent, toxic, and bio-accumulative mercury into the environment. However, mercury is still widely used in artisanal and small-scale gold mining (ASGM). In fact, mercury use in this sector is probably increasing, and is now believed to be the largest source of mercury pollution in the world. The recent spike in gold prices is often cited as a cause of increased ASGM and associated mercury use.

Because ASGM activity is decentralized, often illegal, and commonly occurs in hard to reach parts of developing countries, it is very difficult to estimate the magnitude and trends of mercury use. But we do have data from the USGS on the prices of gold and mercury. In the last post we looked at the time series for mercury prices since 1900. Here, we are only going to look at the period from 1980-2011. (The modern ASGM period really started around 1980.) The chart below shows the inflation-indexed prices of mercury and gold. I’ve normalized them to an index where the 1980 price equals one so that I can show both series on one plot.hg.auMercury and gold prices appear to be closely correlated. The high correlation coefficient (0.89) confirms what we see in the plot. The series only diverge significantly after 2009, and we’ll look at that period more closely at the end of the post.

But the close correlation of mercury and gold prices is not enough to conclude there is a causal relationship. Perhaps there is a lurking variable that is correlated with the prices of both metals. Mercury and gold are certainly not substitutes for each other. No one buys mercury when they are worried about inflation, for example. But maybe mercury and gold prices are both are correlated to overall commodity prices. To find out I plotted an index of metals prices from the IMF (also normalized to one and corrected for inflation) together with the metals prices:hg.au.inThe correlation looks close, and indeed the the correlation coefficients of  the metals price index with the prices of  gold and mercury are both about 0.8. This is not quite as close as the correlation of gold and mercury prices to each other, but it’s too close to conclude that either time series is all that different from the overall trend in commodity metal prices.

Now is a good time to point out that mercury has other uses besides to gold mining, such as in certain products (like thermometers) and industrial processes (like making chlorine). Demand from these other uses is going to affect the price. Of course, the supply of mercury will also have an affect on price. In attempting to see a signal in the price of mercury caused by gold mining, the implicit assumption is that other factors affecting the price of mercury (the supply and demand) remain relatively constant with respect to each other over the time period. This is not a terrible assumption. In general both non-ASGM demand for mercury and mercury supply have been decreasing over the last 30 years. But the assumption does introduce some real uncertainly into the analysis. It is difficult to correct for because we don’t have good data on mercury use by sector over the time period.

There’s one more problem. Recall that the hypothesis is that mercury use in ASGM affects the price of mercury. We were using the price of gold as a proxy for mercury use in ASGM. That sounds like a reasonable assumption. High gold prices should mean more gold being extracted, and greater demand for mercury to extract the gold.  But what really determines mercury use is the amount of gold produced, not the price. And we actually have data on global gold production. It tells a different story:au.qIf anything, global gold production is negatively correlated with gold price over the last ~30 years! I don’t know why this is. One possible explanation has to do with the lag time of starting a mining operation. Perhaps the record high gold prices of the late 1970s and early 1980s caused a wave of exploration and new mines. Once those mines were developed, they could produce gold economically even at low prices. Perhaps technology improved so that it was cheaper to find and develop gold deposits.

This leads to one more complicating factor. Most gold is produced by large scale mines (which do not use mercury). Common estimates suggest that only about 12-20% of gold is produced by rough artisanal miners. Another implicit assumption in this analysis has been that the fraction of gold produced by ASGM has remained constant over time. But this may not be the case. Small-scale miners are likely to be able to take advantage of high gold prices more quickly than the majors, where exploration, permitting, and construction can mean many years before a mine becomes operational. Small-scale miners can often start mining almost immediately. This would mean than gold and mercury prices would be more closely correlated than one would expect when looking at global gold production. On the other hand, work by the Artisanal Gold Council has shown ASGM prevalence is “sticky” with respect to gold prices. That is, once they start mining, artisanal miners are likely to continue their operation even after the price of gold drops. 

Finally, let’s reexamine the period from 2009-2011, when the price of mercury rises much more rapidly that the price of gold. I don’t think there’s an obvious explanation for this. Perhaps mercury use in ASGM really takes off in this period. Another wrinkle is the establishment of bans on mercury export in the EU (took effect in 2011) and the U.S. (took effect in 2013). Maybe buyers were trying to purchase European and U.S. mercury ahead of the ban, driving up the price. We could look at export data to find out.

As you can see, this is an extremely complicated issue. Without better data, it is not possible to resolve a signal in mercury prices that can be attributed to gold prices or gold production. Even though this exercise did not yield a clear result, I think it is important to document the effort. In data analysis (and science in general), the lack of a clear conclusion is in itself  an important piece of information.

In the next mercury installment we’ll travel to Ukraine and Kyrgyzstan to learn how the elusive metal is wrested from the earth and what sorts of environmental, economic, and social impacts this mining brings.

One Chart that Explains Why Ukraine was Vulnerable to Revolution

After months of protests, Ukraine slipped into violence last week as government forces attacked protesters in Kyiv. Then, in a frantic 48 hours, President Viktor Yanukovych’s government collapsed, rival politician Yulia Timoshenko was released from prison, and Yakukovych fled into hiding.  It was a stunning victory for the “maidanovtsi”, those protesting on Kyiv’s Maidan and those supporting the protesters around the county and the world.

I’m reading Bruce Bueno de Mesquita’s The Predictioneer’s Game, which is about analyzing incentives to make political forecasts. This book got me thinking about Ukraine. Why did Yanukovych fall? Sure, he was corrupt, but so are many leaders in the region.

What happened in Ukraine was very complex. But it seems to me that at a basic level, the obvious corruption of the Yakukovych government,  combined with Ukraine’s relatively open and democratic society, led to an unstable situation.

To test this intuition, I looked at data from The Economist’s Democracy Index and Transparency International’s Corruption Perception Index. This plot shows where the former Soviet republics fit on the corruption – authoritarianism plane (click on the image for interactive version):

demo cor2

It is instructive to divide this plot into quadrants. The lower left quadrant shows those countries that are both very corrupt and authoritarian. These governments have survived very high levels of corruption in part because they resort to anti-democratic means of staying in power, such as restricting citizens’ political and civil rights.

The upper right quadrant contains nations with lower levels of corruption and authoritarianism. Chief among these are the Baltic states, which have enjoyed a high degree of stability. Georgia, although it experienced a revolution in 2003, has been more politically stable in recent years.

The lower right quadrant is a null set. We just don’t see countries that are very authoritarian but not very corrupt in this region. An example of a non-Eurasian country that sits in this quadrant would be the United Arab Emirates.

And then there’s the upper left quadrant: states that are less authoritarian but have high levels of corruption. Countries occupying this space have experienced lots of political instability. Kyrgyzstan has had two revolutions in the last decade: the Tulip Revolution of 2005, and the more violent second Kyrgyz revolution in 2010. Moldova suffered widespread unrest in 2009 (the so-called Twitter Revolution), although recent trends point to a more democratic and pro-European direction. And Ukraine had the Orange Revolution in 2004 before the political order was upended again last week as a result of Euromaidan.

Of course, there are many other factors that determine how likely a government is to fall. Economic growth and inequality surely play a part, as do the personalities and governing styles of individual leaders. Yakukovych, for example, was indecisive and incompetent, and many of his allies quickly abandoned him.

So what are the lessons here? Well, if you are going to blatantly siphon money away from your constituents while ignoring many of their basic needs, you better rule with an iron fist. If not, they are going to rise up and throw you out. Or better yet, don’t run a corrupt regime in the first place.

The events in Ukraine illustrate how a relatively democratic society, with a strong civil society and a (mostly) free press can be an important check on corruption in government. Although far from being “fully democratic” in the eyes of international indices, Ukraine was democratic and open enough for Euromaidan to take root and ultimately succeed.

From Miracle Metal to Global Health Risk: A 100-Year History of Mercury Prices and Production

I want to write a series of posts about mercury production, prices, and trade. Although this may seem like a rather esoteric subject, I hope to convince readers that it’s actually pretty interesting. I have a professional interest in mercury as a global pollutant, having worked on negotiations for the Minamata Convention. These posts will also be good opportunity to practice data manipulation, graphics, and analysis in R, a powerful programming language for statistical computing.

Mercury is a pretty amazing substance. It’s the only metal that is a liquid at room temperature, a property that has long been a source of fascination to people, and led to a wide range of applications in industry. Unfortunately, mercury is also a toxin that has harmful effects on both people and the environment.

In this post I’ll examine the price and global production of mercury over the last hundred years or so using data from the U.S. Geological Survey. First, let’s look at the price of mercury in constant 1998 dollars since 1900:

mercury price

You can see that prices have fluctuated quite a bit. Let’s examine the three prominent peaks in the time series and try to figure out what caused them. Now, high prices could mean increased demand, tight supply, or a combination of both. We need to look at global mercury production over the same time period to help shed light on the variations in mercury price:
global mercury production
The first price peak occurred in the late 19-teens, around the time of WWI. In fact, I would posit that it is a direct consequence of WWI. Mercury fulminate is an explosive compound that was commonly used in the last century as a primer for small arms ammunition. They probably used a lot of it during the First World War.

Incidentally, you may recognize mercury fulminate from the TV show Breaking Bad. Walt made some and used it to blow up a group of rival drug dealers. There’s even a MythBusters segment about it.

The second price spike occurred during WWII. This was likely a result of increased demand for use in fulminate explosives, and perhaps in switches and other such products for wartime equipment. Mercury production actually increased quite a bit during the war, but it was apparently not enough prevent high prices. In response to the German invasion, the Soviets moved their main center of mercury production from Nikitovka in Ukraine to Khaidarkan in Kyrgyzstan. I’ll talk about both of these places in a later post.

The last price peak occurred in the 1960s. The causes are a bit more complex. My guess is that a combination of industrial and military uses were driving up demand, and production, although increasing, could not keep up. During this time the United States was building up its national defense reserves of mercury, and other countries were probably doing the same. One defense-related use of mercury was to separate lithium isotopes for use in hydrogen bombs. Hundreds of tons of mercury were spilled at Oak Ridge National Laboratory during isotope separation, and environmental contamination remains to this day. Another use of mercury that never came to be was as a coolant (to replace water) for nuclear reactors.

These were heady days in the mercury business, before the human health and environmental impacts were widely know. This fascinating newsreel from 1955 gives you a flavor of what the times were like:

Mercury prices (and production) started dropping in the 1970s as alternatives to industrial uses were found and the health risks started to become clear. But prices have been growing rapidly in recent years. In the next post I’m going to examine this and look at the degree to which artisanal gold mining might be responsible.

DIY Animation with Census Explorer

Recently, I attended the ESRI Federal GIS conference here in Washington DC. I was canvassing the vendor exhibits looking for free pens, and maybe, if I was lucky, notebooks, when I came across the U.S. Census Bureau display. The nice people there showed me a very cool tool for viewing basic U.S. demographic data over time and at a variety of spatial scales. It’s called Census Explorer.

I have used Census data before to do some analysis (and write a post) on age and income in U.S. counties, but I had to download the data and map it myself. But Census Explorer is an online map interface. You can zoom from State to census tract level, and toggle between data from 1990, 2000, and 2012.

I zoomed in on the Milwaukee, WI metro area and looked at the percent of population age 65 and over at the census tract level. Toggling from 1990 to 2012, I could make out a clear pattern – the suburbs were becoming older at the expense of the central city – but I had no way to export this as a single image. So I went low tech. I took screenshots of each image, aligned then, and made a GIF using a free online service.

age animation

It’s not perfect, but the demographic change over time is clearly visible. Actually, I was surprised to see such a clear pattern in Milwaukee over the last 22 years. Any idea why this is happening?

Global Map of (In)tolerance

The Winter Olympics in Sochi begin today. I hope the games are safe and successful, and I also hope they serve to shine a global spotlight on anti-gay attitudes and policies in Russia.

On that note, the Martin Prosperity Institute has put together this map showing the percentage of populations surveyed who believe their country is a good place to be gay or lesbian.

Click to read about how this map was made

By Martin Prosperity Institute. Click to read about how this map was made

The authors also compared these findings with national economic and social indicators, and found that tolerance of homosexuality is correlated with all sorts of good things. For example, the correlation with economic output per person is 0.72. That’s pretty high. It’s interesting to think about why this is, and whether there is causality involved, and, if so, which way(s) it go(es). Something to ponder during the figure skating.

What if Ukraine split in two?

If you’re interested in Ukraine, you are probably aware of the country’s east-west political and enthno-linguistic divisions. I wrote about this in a couple of recent posts. Not long ago, I began to wonder what Ukraine would look like if it split into two nations. Now, I don’t think this is going to happen, nor do I think it would be in the best interest of Ukraine. But with protests continuing in Kyiv and in many of  the regions, it’s worth investigating what these two hypothetical nations would look like.

For this exercise, I used data on Ukraine’s oblasts (regions) that I had gathered for an earlier post, and plugged them into Tableau Public. First, I had to decide where to put the new border. I took the vote shares for Yanukovych in the 2010 elections for each region and plotted them in ascending order:

two ukraines vote share

There is a sharp break where the vote share jumps to above 50% – a natural place for the division. Incidentally, it is interesting and unexpected that Zakarpatskaya region, in the far west of the country, had the highest level of Yanukovych support of all the Timoshenko-majority regions. What is going on there?

Transferring that division to the map produces the following result:

two ukraines map2

Let’s look at the key features of these two imaginary countries:

two ukraines table

West Ukraine is a bit larger, and has a slightly higher population – ~24 million versus ~21 million. It’s landlocked, and shares borders with all of Ukraine’s current neighbors. East Ukraine has a higher per capita income, and occupies  all of Ukraine’s Black Sea Coast.

Sheet 6

The chart above illustrates some additional features of the countries. East Ukraine is much more urban than the west, and contains many more Russian speakers (although it has a large minority of Ukrainian speakers). West Ukraine has a much smaller minority of Russian speakers.

I encourage you to take a look at the entire interactive visualization in Tableau by clicking on the image below.

Dashboard_1

Amazingly Detailed Map of the Struggle in Kyiv

Here is an incredibly detailed map of the situation in Kyiv as of January 27. It comes from Dmitri Bortman and was published on Ilya Varlamov’s livejournal page, which has lots of on-the-ground details about what is happening on the Maidan (central square and environs) in Kyiv. If you want to read about what it’s actually like in Kyiv right now and see some amazing pictures, have a look at this recent post by Varlamov.

Basically the reddish shading shows the area occupied by the protesters, and the blue shading shows land occupied by government police forces. The red lines show barricades built by the protesters to keep riot police from clearing the demonstrations. The red dots give an idea of the density of clusters of protesters. Here’s the legend.