Blog Archives

Fama/French Factors in 1 line of code

August 11, 2014
By

In the past, getting Fama/French factors from the Kenneth French dataset involved a convoluted procedure to download the zip file, unzip the file, clean the data, and convert to xts.  Now with Quandl, we can do it simply in one line of code.  Note: ...

Read more »

Refresh Old rCharts+flickr post with httr and pipeR

July 30, 2014
By

The R world keeps moving, and I noticed this old post didn’t work anymore, so I have rewritten it to use Hadley Wickham's httr instead of Rflickr for two reasons: Rflickr is not working for me anymore httr is a very helpful package for navigating the "what was scary to me" world of http and oauth In...

Read more »

Chart from R + Color from Javascript

July 22, 2014
By

Another color experiment combining resources from R and Javascript.  I just wish I could do Mean Phylogenetic Distance in Javascript like rPlotter.  I enjoyed using d3.js zoom behavior to pan and zoom the image on canvas.  Also, filedrop.js made the...

Read more »

Alternate Price Plots | ggplot2 + magrittr

July 17, 2014
By

code{white-space: pre;} pre:not() { background-color: white; } if (window.hljs && document.readyState && document.readyState === "complete") { window.setTimeout(function() { hljs.initHighlighting(); }, 0);} Just some quick experiments with ggplot2 + magrittr to plot prices differently than the traditional ways. We wi€™ll get daily data on...

Read more »

Pick a Color Site built in R with Shiny tags %$%

July 16, 2014
By

I started down the color path with yesterday’s post Palette of Colors from Image %>% ggplot2 %>% rCharts + dimple.js.  Although R has lots of tools, such as RColorBrewer and the mentioned rPlotter, javascript does too with Gregor Aisch's chroma.js and this translated-from-Perl color-scheme-js. I figured I should explore these javscript color tools but not in the easy way. ...

Read more »

Palette of Colors from Image %>% ggplot2 %>% rCharts + dimple.js

July 15, 2014
By

R should be mature and dying but now, but it is instead alive and vibrant. I experiment with some of the new developments below. It is probably best to copy/paste the intro below in case you do not see the iframe content. The five purposes of this po...

Read more »

Speed Tests for Rolling/Running Functions

July 8, 2014
By

I use rolling and running functions almost daily with financial time series. In my post A Whole New World with Chains and Pipes, I made this statement I have noticed that rolling analysis with xts can sometimes be slow. as.matrix is my favorite way to ...

Read more »

Beer and Pie | rCharts pie charts with d3pie

July 3, 2014
By

In honor of the 4th of July, I thought a quick example of a pie chart on beer using the wonderful new d3pie library would be appropriate.  The rCharts binding with d3pie is simply an experiment now, but expect more in the near future.   Using slidify...

Read more »

Open Source Playing with ggvis using rCharts, angular, uikit, ace-editor

June 24, 2014
By

Open source allows us to do amazing things.  Take me for example.  I am a below average coder, and I can hack together these incredibly powerful tools to do something like below. Some might naively say that rCharts and ggvis are competitors.  Howeve...

Read more »

A Whole New R World with Chains and Pipes

June 23, 2014
By

I think that the recent shift in the R world to chains and pipes will become permanent.  Even if not, this style of code translates well to Javascript and other languages.  I thought a finance example exploring Fama/French factors with dplyr, magritt...

Read more »