Publications by klr

ggplot2 with Noam Ross theme

26.07.2013

When I first saw Noam Ross’ blog post “The null model for age effects with overdispersed infection”, I immediately liked the look of his ggplot2 graphs. I was even more delighted when I discovered that he has made his theme available on github. Even though I am all into rCharts, I still love a beautiful publication quality R graphic. Below ...

1010 sym R (987 sym/1 pcs) 2 img

Slidify Did That… and That… and…

31.07.2013

In my exuberance for rCharts, I have not expressed my equal love for its older sibling slidify.  I adopted slidify a little more slowly than other R bloggers Create elegant, interactive presentations from R with Slidify Interactive slides with googleVis on shiny because I failed to realize that slidify does way more than just slideshows.  It a...

1894 sym

I Want ggplot2/lattice and d3 (gridSVG–The Glue)

06.08.2013

I really like interactive graphics, especially when they come straight from R.  I posted a lot about rCharts, but it is not the only way.  In my mind there are three types of glue to link R to SVG/HTML/Javascript: Let R do the data and then send the data to Javascript to create the SVG graphics. This is the process employed by rCharts, clickm...

2208 sym 2 img

ggplot2 meet d3

07.08.2013

With great libraries, just a couple lines of code can do amazing things.  For instance, let’s limit ourselves to less than 10 lines of code and see what ggplot2 and d3 can do.  We will use gridSVG as discussed in yesterday’s post I Want ggplot2/lattice and d3 (gridSVG–The Glue) to expose ggplot2 to d3.  Thanks Hadley Wickham, Mike Bostoc...

914 sym R (1075 sym/1 pcs)

R on Your iPhone (Not the Way You Think)

08.08.2013

If you really love R, you should put it on your iPhone.  Apple gives the measurements for its products here. Let’s use a little grid magic with ggplot2 to make a chart for the back of your iphone similar to this.require(grid) require(ggplot2) # thanks for the Apple measurements # https://developer.apple.com/resources/cases/ x11( height = as...

830 sym R (974 sym/3 pcs) 8 img

R/gridSVG/d3 Line Reverse Data Bind

08.08.2013

I veer from finance to tech, so let’s use some data from FRED/OECD this time.  I do not think I need to comment much on what has happened to New Car Registrations in Greece. Reverse data binding a line plot from ggplot2 or lattice is slightly more difficult than what we saw in the last post I Want ggplot2/lattice and d3 (gridSVG–The Glue). ...

911 sym 2 img

PIMCO Rolling Correlation, d3, R, gridSVG, lattice | Gets An Axis

09.08.2013

Where else will you hear Pimco, rolling correlation, R, gridSVG, lattice, and d3 all in one post?  Let’s mix them all together to see what might happen.  For those here for the geekery, we will add a d3 axis for our y and it will follow the mouse.  For those who care nothing about d3 and R, you might like the chart too since it plots the 90 ...

998 sym 2 img

Stocks and Bonds Behavior by Decade

13.08.2013

I struggled with whether or not I should even post this.  It is raw and ugly, but it might help somebody out there.   I might use this as a basis for some more gridSVG posts, but I do not think I have the motivation to finish the analysis. Code: require(latticeExtra)require(quantmod)require(PerformanceAnalytics) getSymbols(“SP500″,src=”...

2204 sym 8 img

gridSVG Multi-line Data Bind with d3–US Treasury Yields

14.08.2013

If you have not read the other posts on gridSVG and d3, I recommend reading those before progressing to this one. Facets or strips are one of my favorite features of lattice and ggplot2, so of course I want to extend our d3 reverse data bind to support these small multiples.  Let’s see one way of accomplishing this.  For a short explanation o...

895 sym 2 img

Applications of Interactivity to Finance

28.08.2013

Of the nearly infinite ways of using crossfilter and dc.js in finance, the 2 that immediately came to my mind are signal analysis in system building and money manager analysis in due diligence.  My first very basic experiment explores a commonly known signal (RSI) on the daily S&P 500 since 1950.  Interactivity adds a lot to the experience.  I...

992 sym 4 img