Description Details Notes Author/Maintainer Contributors See Also Examples
Offers convenient download and transformation of Bloomberg and FRED (St. Louis Fed) data, plotting of customized charts, and saving to Powerpoint.
The chartbookR package consists of four types of functions for chartbook creation:
Data download: getBBG
and getFRED
Data transformation: Transform
Customized plotting: LineChart
, BarChart
and HiChart
Exporting to Powerpoint: makePPT
While all functions are based on existing packages, they make the chartbook creation an efficient and convenient process.
In order to use the getBBG
function, you need to have a running Bloomberg terminal session. If this is not the case, you can still use getFRED
to download freely available data from the St. Louis Fed database (https://fred.stlouisfed.org).
The HiChart
function relies on highcharts (www.highcharts.com) - a Highsoft product which is not free for commercial and Governmental use.
Kilian Reber kilian.d.reber@gmail.com
Tryggvi Thoroddsen tryggvithoroddsen@gmail.com
https://github.com/kilianreber
1 2 3 4 5 6 7 8 9 10 11 | #US Unemployment (FRED data only)
zoo <- getFRED(tickers = c('UNRATE', 'NROU'), names = c('Unemployment Rate', 'Natural Unemployment Rate'), na = FALSE)
LineChart(title = "US Unemployment", data = zoo, y1 = 'in percent', rec = TRUE)
#Global Unemployment Rates (requires Bloomberg)
zoo <- getBBG(tickers = c("EHUPUS", "EHUPEU", "EHUPGB", "EHUPJP Index"), names = c("United States", "Eurozone", "United Kingdom", "Japan"), freq = "QUARTERLY", time = "30Y")
LineChart(title = "Global Unemployment Rates", data = zoo, l1 = 1:4, y1 = "in %", y1_def = c(2,15,2), grid = TRUE, rec = TRUE)
#US Budget Balance vs. Unemployment Rate (requires Bloomberg)
zoo <- getBBG(tickers = c("EHUPUS", "EHBBUS"), na = FALSE, names = c("Unemployment", "Budget Balance"), start = as.Date("1969-01-01"))
LineChart(title = "US Budget Balance vs. Unemployment Rate", data = zoo, l1 = 1, d2 = 2, y1="Unemployment (%)", y2 = "Budget Balance (%GDP)", y2_def = c(-10,2,2), y2_rev = TRUE, leg = "top", rec = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.