There's no shortage of web sites listing the current medal standings at Sochi, not least the official Winter Olympics Medal Tally. And here's the same tally, rendered with R:
Click through to see a real-time version of the chart, created with RStudio's Shiny by Ty Henkaline. (By the way, does anyone know if it's possible to embed a live version of the chart in a blog post like this?) If you're looking to create similar real-time charts of Web-based tables, be sure to check out the underlying code by Tyler Rinker that grabs the medal table from the Sochi website, cleans up the data, and plots the medal tally as a chart.
[Updated: The interactive chart by Ty Henkaline was mistakenly attributed to Ramnath Vaidyanathan. Apologies for the error.]
TRinker's R Blog: Sochi Olympic Medals
Now that Canada is up to 9 medals (hurray!), the horizontal scale (in the Shiny app) has switched to ticks at 0, 2.5, 5, 7.5. This is not ideal for numbers that must be integers.
I don't think the underlying ggplot code is using the pretty() function to find tick locations, because I can't seem to force it to pick those numbers. Maybe it should, or Tyler's code should?
Posted by: Duncan Murdoch | February 11, 2014 at 04:22
I think you are incorrect when you say @Ramnath Vaidyanathan created the shiny version. He's created a lot of nifty things but I think credit goes to Ty Henkaline.
Posted by: Tylerrinker | February 11, 2014 at 06:46
You can absolutely put a live version on the blog. Take a look at the source for the base example on http://www.rstudio.com/shiny/ (I have no idea if the paste I'm going to do will be processed well by your blogging setup):
<iframe id="example1" src="http://glimmer.rstudio.com/rstudio/faithful/" style="border: none; width: 440px; height: 500px"></iframe>
It's just a matter of using iframes.
It's best if you use minimal adornment (to be able to fit it easier on a page) but the iframe solution works pretty well, especially if it's same-origin (i.e. being loaded from the same domain). Some extensions block non-same-origin iframes by default (iframes are the bane of us security-fold) but they can be used for good as well as evil.
Posted by: Bob Rudis | February 11, 2014 at 08:59