Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.
Objective
The objective of the data visualisation was to compare the relative performance of a number of asset classes over a 40 year period, from 1978 to 2017.
The target audience was retail investors, in particular those considering investing in gold or other precious metals as well as those interested in the relative performance of various asset classes over a long timespan.
The visualisation chosen had the following three main issues:
References
Barchart.com, Inc 2021, CRB CCI Index Futures, StoneX Financial, Inc, viewed September 15, 2021, https://www.danielstrading.com/education/markets/stock-indices/crb-cci-index-futures
BlackRock Investments, LLC 2021, iShares MSCI EAFE ETF, BlackRock Investments, LLC, viewed September 15, 2021, https://www.ishares.com/us/literature/fact-sheet/efa-ishares-msci-eafe-etf-fund-fact-sheet-en-us.pdf
BullionVault Ltd. 2019, Annual asset performance comparison, 1980-2019, BullionVault Ltd, retrieved August 30, 2021, https://www.bullionvault.com/gold-guide/annual-asset-performance-comparison
Federal Reserve Bank of Minneapolis 2021, Consumer Price Index, 1913-, Federal Reserve Bank of Minneapolis, retrieved September 15, 2021, https://www.minneapolisfed.org/about-us/monetary-policy/inflation-calculator/consumer-price-index-1913-
S&P Dow Jones Indices LLC 2021, S&P CoreLogic Case-Shiller U.S. National Home Price NSA Index, S&P Dow Jones Indices LLC, viewed September 16, 2021, https://www.spglobal.com/spdji/en/index-family/indicators/sp-corelogic-case-shiller/sp-corelogic-case-shiller-composite/#overview
The following code was used to fix the issues identified in the original.
library(ggplot2)
library(readxl)
library(tidyr)
# Load data files
USData = read_excel("USData.xlsx")
Rankings = read_excel("USData-Ranking.xlsx")
# Adjust all values for inflation that year
for (j in c(2:41)) {
for (i in c(1:4, 6:10)) {
USData[i, j] <- (USData[i, j] - USData[5, j])
}
}
# Remove the inflation variable as it is no longer needed
USData_corrected <- USData[-c(5), ]
# Convert data to long format
longData1 <- gather(USData_corrected, key = "Year", value = "Return", "1978":"2017")
longRankings <- gather(Rankings, key = "Year", value = "Rank", "1978":"2017")
# Add rankings to data
for (i in c(1:360)) {
longData1[i, 4] <- longRankings[i, 3]
}
longData1$Rank <- factor(longData1$Rank, levels = c(1:9), ordered = TRUE)
# Convert the Year variable to numeric type
longData1$Year <- as.numeric(longData1$Year)
# Produce plot
p <- ggplot(data = longData1, aes(x = Year, y = Return, fill = Rank))
p <- p + geom_col(data = longData1, aes(x = Year, y = Return)) +
scale_fill_brewer(type = "seq", palette = 1, direction = -1, aesthetics = "fill") +
labs(title = "US Dollar Asset Class Performance",
subtitle = "1978-2017 annual returns (adjusted for inflation) and asset ranking each year",
x = "", y = "Return %") +
facet_grid(. ~ Asset) +
theme_dark() +
theme(plot.title = element_text(size = rel(2)),
plot.subtitle = element_text(size = rel(1.4)),
legend.title = element_text(face = "bold", size = rel(1.1)),
legend.margin = unit(0,"mm"),
strip.background = element_rect(colour = "white", fill = "white"),
strip.text = element_text(colour = "black", face = "bold", size = rel(1.1)),
panel.grid.minor = element_blank())
Data References
BlackRock Investments, LLC 2021, iShares MSCI EAFE ETF, BlackRock Investments, LLC, retrieved September 15, 2021, https://www.ishares.com/us/products/239623/ishares-msci-eafe-etf#/
Board of Governors of the Federal Reserve System (US) 2021, 3-Month Treasury Bill: Secondary Market Rate [DTB3], Federal Reserve Bank of St. Louis, retrieved September 15, 2021, https://fred.stlouisfed.org/series/DTB3
BullionVault Ltd. 2019, Annual asset performance comparison, 1980-2019, BullionVault Ltd, retrieved August 30, 2021, https://banners.bullionvault.com/en/us-annual-asset-performance-comparison-1978-2017.pdf
Damodaran, A n.d., S&P Earnings: 1960-Current, Stern School of Business, retrieved September 16, 2021, http://pages.stern.nyu.edu/~adamodar/New_Home_Page/datafile/spearn.htm
Federal Reserve Bank of Minneapolis 2021, Consumer Price Index, 1913-, Federal Reserve Bank of Minneapolis, retrieved September 15, 2021, https://www.minneapolisfed.org/about-us/monetary-policy/inflation-calculator/consumer-price-index-1913-
ICE Benchmark Administration Limited 2021, Gold Fixing Price 10:30 A.M. (London time) in London Bullion Market, based in U.S. Dollars, Federal Reserve Bank of St. Louis, retrieved September 15, 2021, https://fred.stlouisfed.org/series/GOLDAMGBD228NLBM#0
ICE Data Indices, LLC 2021, ICE BofA US Corporate Index Total Return Index Value [BAMLCC0A0CMTRIV], Federal Reserve Bank of St. Louis, retrieved August 30, 2021, https://fred.stlouisfed.org/series/BAMLCC0A0CMTRIV
National Association of Real Estate Investment Trusts 2021, Annual Index Values & Returns. National Association of Real Estate Investment Trusts, retrieved August 30, 2021, https://www.reit.com/data-research/reit-indexes/annual-index-values-returns
S&P Dow Jones Indices LLC 2021, S&P/Case-Shiller U.S. National Home Price Index [CSUSHPINSA], Federal Reserve Bank of St. Louis, retrieved September 16, 2021, https://fred.stlouisfed.org/series/CSUSHPINSA
Trading Economics 2021, CRB Commodity Index, Trading Economics, retrieved September 15, 2021, https://tradingeconomics.com/commodity/crb
The following plot fixes the main issues in the original.