Blog Archives

Dealing with a Byte Order Mark (BOM)

March 11, 2015
By
Dealing with a Byte Order Mark (BOM)

I have just been trying to import some data into R. The data were exported from a SQL Server client in tab-separated value (TSV) format. However, reading the data into R the "usual" way produced unexpected results: Those weird characters in the first record... where did they come from? They don't show up in a The post

Read more »

Book Review: R for Business Analytics

January 28, 2015
By
Book Review: R for Business Analytics

The book R for Business Analytics by Ajay Ohri sets out to look at "some of the most common tasks performed by business analysts and helps the user navigate the wealth of information in R and its 4000 packages." In my opinion it succeeds in covering an extensive range of topics but fails to provide The post

Read more »

Downloading Option Chain Data from Google Finance in R: An Update

January 13, 2015
By
Downloading Option Chain Data from Google Finance in R: An Update

I recently read an article which showed how to download Option Chain data from Google Finance using R. Interestingly, that article appears to be a close adaption of another article which does the same thing using Python. While playing around with the code from these articles I noticed a couple of things that might benefit

Read more »

Simulating Intricate Branching Patterns with DLA

December 16, 2014
By
Simulating Intricate Branching Patterns with DLA

Manfred Schroeder's book Fractals, Chaos, Power Laws is a fruitful source of interesting topics and projects. He gives a thorough description of Diffusion-Limited Aggregation (DLA) as a technique for simulating physical processes which produce intricate branching structures. Examples, as illustrated below, include Lichtenberg Figures, dielectric breakdown, electrodeposition and Hele-Shaw flow. Diffusion-Limited Aggregation DLA is conceptually

Read more »

Zacks Data on Quandl

November 8, 2014
By
Zacks Data on Quandl

Data from Zacks Research have just been made available on Quandl. Registered Quandl users have free preview access to these data, which cover the following: Earnings Estimates: forward-looking consensus forecasts; Earnings Surprises: estimated future and actual historical earnings; Earnings Announcements: predictions for earnings announcement dates, parameters, and supplementary data; Sales Estimates: analogous to earnings estimates,

Read more »

Creating More Effective Graphs

November 4, 2014
By
Creating More Effective Graphs

A few years ago I ordered a copy of the 2005 edition of Creating More Effective Graphs by Naomi Robbins. Somewhat shamefully I admit that the book got buried beneath a deluge of papers and other books and never received the attention it was due. Having recently discovered the R Graph Catalog, which implements many

Read more »

What does CNN have in common with Carmen Reinhart, Kenneth Rogoff, and Richard Tol: They all made foolish, embarrassing errors that would never have happened had they been using R Markdown

September 19, 2014
By
What does CNN have in common with Carmen Reinhart, Kenneth Rogoff, and Richard Tol:  They all made foolish, embarrassing errors that would never have happened had they been using R Markdown

Rachel Cunliffe shares this delight: Had the CNN team used an integrated statistical analysis and display system such as R Markdown, nobody would’ve needed to type in the numbers by hand, and the above embarrassment never would’ve occurred. And CNN should be embarrassed about this: it’s much worse than a simple typo, as it indicates The post

Read more »

Plotting Flows with riverplot

August 14, 2014
By
Plotting Flows with riverplot

I have been looking for an intuitive way to plot flows or connections between states in a process. An obvious choice is a Sankey Plot, but I could not find a satisfactory implementation in R… until I read the riverplot post by January Weiner. His riverplot package does precisely what I am need. Getting your

Read more »

Commitments of Traders: Moves in the Last Week

August 9, 2014
By
Commitments of Traders: Moves in the Last Week

In my previous post I gave some background information on the Commitments of Traders report along with a selection of summary plots. One of the more interesting pieces of information that one can glean from these reports is the shift in trading sentiment from week to week. Below is a plot reflecting the relative change

Read more »

Comrades Marathon: A Race for Geriatrics?

July 22, 2014
By
Comrades Marathon: A Race for Geriatrics?

It has been suggested that the average Comrades Marathon runner is gradually getting older. As an “average runner” myself, I will not deny that I am personally getting older. But, what I really mean is that the average age of all runners taking part in this great event is gradually increasing. This is not just

Read more »