Chart of the Week: Global Crypto Adoption Index

A weekly series of quick random charts made in Python 🐍

The chart of this week is a horizontal bar chart from the article Cryptocurrencies: developing countries provide fertile ground published in Financial Times.

Emerging markets are fertile ground for cryptocurrencies, often because their own are failing to do their job. As a store of value, as a means of exchange and as a unit of account, national currencies in some developing countries too often fall short.

Financial Times

Global Crypto Adoption Index

Sometimes dismissed as a fad in advanced economies, crypto holds more appeal in countries with a history of financial instability, according to the Financial Times article. This is based on the 2021 Global Crypto Adoption Index published by Chain Analysis, a data company.

The index is made up of following three metrics:

  • 1️⃣ Total cryptocurrency value received, weighted by purchasing power parity (PPP) per capita
  • 2️⃣ Cryptocurrency retail activity, weighted by PPP per capita
  • 3️⃣ Peer-to-peer exchange trading volume, weighted by PPP per capita and number of internet users.

Chain Analysis ranks 154 countries according to each of these three metrics, take the geometric mean of each country’s ranking in all three, and then normalise that final number on a scale of 0 to 1 to give every country a score that determines the overall rankings. The closer the country’s final score is to 1, the higher the rank.  

The chart of this week shows the 20 countries with the higher index.

  • ✅ Asian countries are at the top of the ranking. Vietnam took the first place followed by India and Pakistan
  • ✅ 19 of the 20 top countries belong to the emerging markets
  • ✅ The US is the only country in the top 20 belonging to the advanced economies

Python Code

# Author: @QuantGirl
# Title: Vietnam has the highest level of crypto adoption
# Source: Financial Times
# Original plot: https://www.ft.com/content/1ea829ed-5dde-4f6e-be11-99392bdc0788?fbclid=IwAR2y6bUa6iqVHxxy5Tz-5B-8ZR9br_SslNXwO9DuNh76YNyC4JCmaNs7Wx4
# Type: Horizontal Bar Chart

import pandas as pd
import matplotlib.pyplot as plt

color_high = "#1380A1"
color_upper_middle = "#6e9eae"
color_lower_middle = "#feb2cd"
color_low = "#990000"

data = pd.DataFrame({
    'Country': ["Vietnam", "India", "Pakistan", "Ukraine", "Kenya", "Nigeria", "Venezuela", "US",
                "Argentina", "Colombia", "Togo", "Thailand", "China", "Brazil", "Phillipines", "South Africa",
                "Russia", "Ghana", "Tanzania", "Afghanistan"],
    'Index Score': [1, 0.37, 0.36, 0.29, 0.28, 0.26, 0.25, 0.22, 0.19, 0.19, 0.19, 0.17, 0.16, 0.16, 0.16, 0.14, 0.14,
                    0.14, 0.13, 0.13],
    'Income': ['Lower middle income', 'Lower middle income', 'Lower middle income',
               'Lower middle income', 'Lower middle income', 'Lower middle income',
               'Lower middle income', 'High income', 'Upper middle income', 'Upper middle income',
               'Low income', 'Upper middle income', 'Upper middle income', 'Upper middle income',
               'Lower middle income', 'Upper middle income', 'Upper middle income', 'Lower middle income',
               'Lower middle income', 'Lower middle income']
})

data['Color'] = data['Income'].map({'High income': color_high, 'Upper middle income': color_upper_middle,
                                    'Lower middle income': color_lower_middle, 'Low income': color_low})

data.sort_values('Index Score', inplace=True)

font_title = {'family': 'serif',
              'fontname': 'Apple Symbols',
              'weight': 'bold',
              'size': 20
              }

font_sub_title = {'family': 'serif',
                  'fontname': 'Apple Symbols',
                  'color': 'grey',
                  'size': 16,
                  }

font_labels = {'family': 'serif',
               'fontname': 'Apple Symbols',
               'color': 'grey',
               'size': 12,
               }

fig, ax = plt.subplots(figsize=(10, 10), frameon=True)
fig.tight_layout()

plt.text(x=0.05, y=0.9, s="Vietnam has the highest level of crypto adoption", ha="left", transform=fig.transFigure,
         fontdict=font_title)
plt.text(x=0.05, y=0.87, s="Global crypto adoption index score", ha="left", transform=fig.transFigure,
         fontdict=font_sub_title)

ax.spines[['top', 'bottom', 'right', 'left']].set_visible(False)

ax.tick_params(axis='y', direction='in', length=0, pad=10, labelsize=12)
ax.tick_params(axis='x', direction='in', which='both', bottom=False, top=True, labelbottom=False, labeltop=True,
               length=0, labelsize=12, labelcolor='grey', color='grey')

ax.set_axisbelow(True)
ax.set_facecolor('#FFF1E0')

trans = ax.get_xaxis_transform()
ax.plot([0.05, 0.12], [0.95, 0.95], color="black", linewidth=4, clip_on=False, transform=fig.transFigure)

for i in data.index:
    ax.barh(data.loc[i, "Country"], data.loc[i, 'Index Score'],
            color=data.loc[i, 'Color'], label=data.loc[i, 'Income'])

handles, labels = plt.gca().get_legend_handles_labels()
by_label = dict(zip(labels, handles))
by_label_sorted = {k: by_label[k] for k in ['High income', 'Upper middle income', 'Lower middle income', 'Low income']}
plt.legend(by_label_sorted.values(), by_label_sorted.keys(), frameon=True, fontsize=12, edgecolor='#FFF1E0',
           facecolor='#FFF1E0')

fig.set(facecolor='#FFF1E0')

plt.text(x=0.05, y=0.05, s="Sources: Chainanalysis; Financial Times", fontsize=12, ha="left", transform=fig.transFigure)
plt.text(x=0.95, y=0.05, s="@QuantGirl", ha="right",
         transform=fig.transFigure,
         fontdict={'fontsize': 16, 'fontweight': 'bold', 'family': 'sans-serif', 'fontname': 'PT Serif Caption',
                   'color': '#a70684'
                   })
plt.grid(axis='x')
plt.subplots_adjust(top=0.825, bottom=0.1, left=0.2, right=0.90)
plt.show()
Quant Girl

I write about Mathematics, Statistics, Finance, Programming, and the relationships among them. I enjoy learning, listening to music and podcasts, practicing yoga, reading magazines, and watching documentaries.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.