Blog Archives

Financial Charts | Pan and Zoom

February 3, 2015
By

The htmlwidget for Week 2 over at Building Widgets claims to add pan and zoom interactivity to almost all R charts.  Since their were no tests on financial charts, I thought I would try it out on a couple.  It really does work.  Here is an example ...

Read more »

Widgets For Christmas

December 30, 2014
By

For Christmas, I generally want electronic widgets, but after six months of development, all I wanted this Christmas was htmlwidgets, and Santa RStudio/jj,joe,yihui and Santa Ramnath delivered early with this RStudio tweet on December 17th. htmlwidget...

Read more »

Out of Nowhere–Explore Text on a Path

December 11, 2014
By

I had not really stopped to think of this until I listened to this The Web Ahead podcast with Sara Soueidan.  What is really interesting about the tech world is how experts can seemingly pop up out of nowhere and become the authority on a topic.  In the podcast, this was the case with the interviewee Sara Soueidan.  We...

Read more »

Much Better Animated Paths | Christmas SVG

December 2, 2014
By

Just after I made my really ugly animated turkey sketch (see post), I saw this much better set of Christmas icons in the Smashing Magazine Article Freebie Christmas Icon Set from Manuela Langella.  While I still remember how to do this, I thought I wo...

Read more »

Happy Thanksgiving | More Examples of XML + rvest with SVG

November 26, 2014
By

I did not intend for this little experiment to become a post, but I think the code builds nicely on the XML + rvest combination (also see yesterday’s post) for working with XML/HTML/SVG documents in R. It all started when I was playing on my iPhone i...

Read more »

Slightly Advanced rvest with Help from htmltools + XML + pipeR

November 26, 2014
By

Hadley Wickham’s post “rvest: easy web scraping with R” introduces the fine new package rvest very well.  For those now yearning a slightly more advanced example with a little help from pipeR + htmltools + XML, I thought this might fill your yea...

Read more »

Secret to Making Things Appear in RStudio Viewer

November 24, 2014
By

I am by no means an authoritative source on this, but I think I found out the secret behind htmltools html_print that chooses the RStudio Viewer browser rather than your default browser like utils::browseURL. Here is a quick code snippet that hopefully...

Read more »

Pipeline to Plot Annual % Change

November 24, 2014
By

Pipes in R make my life incredibly easy, and I think my code easier to read.   Note, there are a couple different flavors of pipes (see magrittr and pipeR).  For now, I choose pipeR.library(quantmod)library(pipeR)library(ggplot2)getSymbols("^GSPC",from="1900-01-01",auto.assign=F) %>>% #get S&P 500 from Yahoo!Finance ( . ) %>>% #get end of year ROC( type="discrete", n=1

Read more »

Update on JGBs versus USTs

November 5, 2014
By

Given the recent selloff in the Yen, I thought now would be a good time to update my favorite chart from Intended or Unintended Consequences. For a true currency death spiral, rates need to move up rather than down.  It appears we are long way from t...

Read more »

Postive Feedback in R with a Little Javascript

October 22, 2014
By
Postive Feedback in R with a Little Javascript

Let’s face it, sometimes the struggle in R can become frustrating, depressing, daunting, or just monotonous.  For those moments when you need a little positive feedback, some encouragement, or a pat on the back, I thought this might help.  Maybe I ...

Read more »