Site icon R-bloggers

Changing The Presidential Election with R in the Browser

[This article was first published on Timely Portfolio, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

After I finished with the tutorial post d3 <- R with rCharts and slidify and then saw R creates d3/javascript charts in Ipython Style Notebook, a light clicked.  I could finally answer the lingering question I have had ever since I saw the NYT 512 Path to the White House brilliantly created by Mike Bostock and Shan Carter with d3.

What would happen if different states had a different number of votes?

I never dreamed that I would be able to answer my own question by live R coding in the browser in an Ipython style notebook.  I felt like I needed a screencast to prove it.  Here is the short version.

 

 

Here is the extended version with director commentary (in type).

 

 

 

< size="5">Thanks < >< size="5">Ramnath Vaidyanathan< >< size="5">, < >< size="5">Yihui Xie< >< size="5">, and < >< size="5">Mike Bostock< >< size="5">.< >

To leave a comment for the author, please follow the link and comment on their blog: Timely Portfolio.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.