knitr::opts_chunk$set(echo = TRUE) library(tidyverse) library(Rblpapi) blpConnect()
tmp <- rbind(bdp("GDBR10 Index", "Chg_Net_5D"), bdp("USGG10YR Index", "Chg_Net_5D")) tmp %>% rownames_to_column() %>% ggplot(aes(x = rowname, y = Chg_Net_5D, fill = rowname)) + geom_col()
tmp <- rbind(bdp("SPX Index", "Chg_Pct_5D"), bdp("SX5E Index", "Chg_Pct_5D"), bdp("UKX Index", "Chg_Pct_5D")) tmp %>% rownames_to_column() %>% ggplot(aes(x = rowname, y = Chg_Pct_5D, fill = rowname)) + geom_col()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.