I hereby claim:
- I am thehausdorffmetric on github.
- I am danielprobst (https://keybase.io/danielprobst) on keybase.
- I have a public key ASAx78zoxGpy8RFqRT5I427AztO4ALheH4N7P-uBKHwYswo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # An simple function to turn an xts time series | |
| # into a ggplot calendar heatmap | |
| require(tidyverse) | |
| # The core idea is to transform the data such that one can | |
| # plot "Value" as a function of "WeekOfMonth" versus "DayOfWeek" | |
| # and facet this Year versus Month | |
| xts_heatmap <- function(x){ | |
| data.frame(Date=as.Date(index(x)), x[,1]) %>% |
| require(quantmod) | |
| require(ggplot2) | |
| require(reshape2) | |
| require(plyr) | |
| require(scales) | |
| # Download some Data, e.g. the CBOE VIX | |
| getSymbols("^VIX",src="yahoo") | |
| # Make a dataframe |
| require(quantmod) | |
| require(ggplot2) | |
| require(reshape2) | |
| # The standard definitions of boxplots are non-obvious to interpret for non-statisticians. | |
| # A "the box is fifty percent, the line 95% and there you have 5% outlier points" is | |
| # typically more easily swallowed by practitioners. | |
| # I therefore define two functions which will change the boxplot appearance below. | |
| myBoxPlotSummary <- function(x) { |