Using R and Motion Charts to analyze financial data

July 15, 2011
By

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

We've noted before that with the RGoogleVis package, it's easy to make motion charts in R, and create a web-based interactive chart that reflects the synchronous movements of two or three variables over time. R user Jeffrey Breen has a great new blog post showing exactly how easy it is, which is best summarized in this tweet:

Breen-tweetI wanted to follow up and note a couple of examples on the Web of using such charts to visualize complex financial data. The first comes from Jeffrey Breen himself, in his role as a renowned airline industry analyst. The chart below (a screenshot, so click through to play with it) tracks the performance of airlines over time. It's interesting to drag the time slider at the bottom and watch American (AA), Delta (DL) and Southwest (WN) jockey for primacy in market share and revenue per mile:

Airline-financials
The second example comes from insurance titan Lloyds, which provides research about insured companies to their paying subscribers. Included is a Motion Chart created with RGoogleVis that subscribers can use to visualize the data:

Lloyds-financials
Unfortunately the real data is only available to paying subscribers, but you can play with the anonymized version above to see how it works. Lloyds explains:

The chart above can be used to visualise Syndicate Summary Financial Statements from the Lloyd’s Accounts section of Statistics Relating to Lloyd's. This example defaults to show Outwards Reinsurance (RI) spend versus Gross Premiums Written (GPW) over time, but the chart contains numerous other dimensions that you can select from. The data used in this chart is based upon a random set of syndicates that have been anonymised (syndicates have been labelled A to J).  

It's great to see these richer, interactive visualizations made available to a wider audience. Thanks to the authors of RGoogleVis, Markus Gesmann and Diego de CastilloMarch, for making it possible.

Jeffrey Breen: One-liners which make me love R: Make your data dance (Hans Rosling style) with googleVis #rstats

To leave a comment for the author, please follow the link and comment on his blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , , , ,

Comments are closed.