Day 13: Sometimes I doubt my commitment to sparklines

by Danielle Navarro, 09 May 2018

The children are in bed. I am browsing the gallery of htmlwidgets. There is a sparkline widget. Sparklines look cute. I don’t know what I would use them for. I install it anyway. I load it.


I look at the sparkline documentation. I create a few small data sets.

x <- rnorm(100)
y <- dnorm(seq(-3,3,length.out = 100))
h <- hist(x,plot = FALSE)$counts
v <- seq(0,4*pi,length.out = 100)

I try some commands. They don’t work. I realise that because this is blogdown, my sparklines need to be wrapped inside a call to frameWidget. I try the commands again. They appear to work. I upload the post. They no longer work. I remove the references to frameWidget. I check the blogdown documentation. I create a custom footer. I add an exclude_jquery parameter. I modify the YAML header to the post. I upload again. Do my sparklines work?

They are cute. I am pleased. But that was more work than it should have been. Sometimes I doubt my commitment to sparklines.