As one last bonus at the end of the video you will see that we can get this interactive reporting experience and websocket communication all on our Iphone and Ipad.
As a quick review of what is happening
- Axys runs a report called perhstsp.rep.
- Axys calls the cdataset.xlsm testd3axys macro and sends performance information.
- Excel cdataset.xlsm testd3axys macro does some very basic formatting, converts the data to JSON, creates a webpage, and opens the webpage in the default browser.
- Browser opens the webpage and d3.js generates a bar graph of performance and then a cumulative growth line chart.
- Browser provides a button to open a websocket with R and send the performance information originally calculated in Axys.
- R receives the performance data through the websocket, calculates drawdown, and then sends the drawdown calculations as JSON back to the browser.
- Browser receives the drawdown calculations and d3.js plots them as a line chart.
The next set of iterations will focus on cleaning up the d3.js charts and adding interactivity.
So far I have received no comments. Please let me know what you think about this.
The list of acknowlegements is starting to get long. I really appreciate all the fine work done by Mike Bostock on d3.js https://github.com/mbostock/d3/wiki, the dedicated authors of the R package PerformanceAnalytics http://cran.r-project.org/web/packages/PerformanceAnalytics/index.html, Bryan the author of http://illposed.net/websockets.html and the example, the author of RJSONIO http://cran.r-project.org/web/packages/RJSONIO/index.html, and Bruce McPherson at http://excelramblings.blogspot.com/ for the inspirational idea.