README.md

R

Big Mac Dataset

Originally from the Economist, great interactive explanation of which can be found here. This package makes that data available and recalculates adjusted index figures on different IMF GDP data to increase coverage from 2000-2020 from 2011-2020.

Dimensions of the dataset are 1329x25, covering 55 countries from April 2000 to July 2020 and 33 unique dates.

Codebook

Name Description date Date iso_a3 Three-character ISO 3166-1 country code currency_code Three-character ISO 4217 currency code name Country name local_price Price of a Big Mac in the local currency dollar_ex Local currency units per dollar gdp_dollar GDP per person, in dollars imf_gdp_dollar GDP per person (IMF), in dollars adj_price GDP-adjusted price of a Big Mac, in dollars imf_adj_price GDP-adjusted price of a Big Mac (IMF), in dollars usd_raw Implied premium/discount of local currency to USD vs market exchange rate eur_raw Implied premium/discount of local currency to EUR vs market exchange rate gbp_raw Implied premium/discount of local currency to GBP vs market exchange rate jpy_raw Implied premium/discount of local currency to JPY vs market exchange rate cny_raw Implied premium/discount of local currency to CNY vs market exchange rate usd_adjusted Implied premium/discount adjusted for GDP (Economist) eur_adjusted Implied premium/discount adjusted for GDP (Economist) gbp_adjusted Implied premium/discount adjusted for GDP (Economist) jpy_adjusted Implied premium/discount adjusted for GDP (Economist) cny_adjusted Implied premium/discount adjusted for GDP (Economist) imf_usd_adjusted Implied premium/discount adjusted for GDP (IMF) imf_gbp_adjusted Implied premium/discount adjusted for GDP (IMF) imf_jpy_adjusted Implied premium/discount adjusted for GDP (IMF) imf_cny_adjusted Implied premium/discount adjusted for GDP (IMF)

Usage

Install and load:

library(devtools)
install.github("danielnjoo/bigmacdata")
library(bigmacdata)

The below example shows a lineplot comparing IMF-GDP adjusted Big Mac USD Premia/Discount.

library(bigmacdata)
bigmacdata %>%
   filter(date==max(bigmacdata$date)) %>%
   mutate(over=ifelse(imf_USD_adjusted>0, 1, 0)) %>%
   ggplot(aes(
            factor(name, levels=name[order(imf_USD_adjusted)]),
            imf_USD_adjusted,
            col=as.factor(over))) +
  geom_linerange(aes(ymin=0, ymax=imf_USD_adjusted)) +
  geom_point() +
  coord_flip() +
  theme(
       axis.title.x = element_blank(),
       axis.title.y = element_blank(),
       legend.position = "none") +
  labs(title="IMF GDP adjusted Big Mac USD Premia/Discount, July 2020")



danielnjoo/bigmacdata documentation built on Dec. 31, 2020, 11:10 p.m.