Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.

Original


Source: Howmuch.net, The Bitcoin Wealth Distribution.


Objective

Objective: The Main objective of this chart is to explain how wealth is distributed of the Bitcoin over Addresses.

Target Audience: General Public.

The visualisation chosen had the following three main issues:

  • Issue 1: Pie chart is used instead of bar chart for summary; here to represent the summary of wealth distribution a very fancy pie chart is used, which makes really hard to make any comparison between them.
  • Issue 2: Color Coding is not consistant: Here shades of blue and green are used which does’nt represent size of pie, green is very unfriendly to colorblind people information from colourblindawareness. moreover a pitch black color is also used to show very samll percentage of address.
  • Issue 3: Pie chart use area distributation and due to that 0.01% has no visible block on chart at all

Reference

Code

The following code was used to fix the issues identified in the original.

library(ggplot2)
library(dplyr)

# Creating dataframe using values of Addresses and BTC
Addresses <- c("0.94%", "0.10%", "0.01%", "0.00088%", "3.06%", "9.41%", "0.00000748%", "19.61%", "24.94%", "41.93%")
BTC <- c(28.02, 21.90, 20.47,17.49, 7.92, 2.84, 0.73, 0.53, 0.09, 0.01)

df <- data.frame(Addresses, BTC)

# Genrating ggplot as p
p <-  ggplot(df, aes(x=reorder(Addresses, BTC), y=BTC, fill=BTC)) +
        
        # assingin bar as a charts
        geom_bar(position="dodge",stat="identity", width=0.50) +
  
        # assinging color to gradient scale
        scale_colour_gradient(  
            low = "#132B43",
            high = "#56B1F7",
            space = "Lab",
            na.value = "grey50",
            guide = "colourbar",
            aesthetics = "colour"
          ) +
  
        # assinging level position and values
        geom_text(aes(label = paste(BTC,"%",sep="")),nudge_y = 2.5, nudge_x = 0) +
        labs(title = "Bitcoin Wealth Distribution, Date: Sep, 12th, 2017", x = "% of Addresses", y = "% Bitcoin") + 
        theme_minimal() +
        
        # handling axis labels 
        theme(axis.text.x = element_text(face="bold", size=10),
              axis.text.y = element_text(face="bold", size=10)) +
  
        # forcing y axis to enlarge
        scale_y_continuous(limits = c(0,36)) + 
  
        # adding extra annotations
        annotate("text", x = 5, y = 28, label = "95.89% of Add. owns 3.47% BTC") +
        annotate("text", x = 6, y = 28, label = "4.11% of Add. owns 96.53% BTC") +
  
        # creating horizontal line to divide the plot in half 
        geom_vline(xintercept = 5.5, color = "brown", size=1.5) + 
  
        # used to convert verticle bar to horizontal bar chart
        coord_flip()

Data Reference

Reconstruction

The following plot fixes the main issues in the original.