While migrating my blog recently from WordPress to Jekyll, I looked for easy ways to post RMarkdown documents to my blog. I ended up developing two options of my own (available on GitHub):
jekyll.R provides two R functions to let you add posts or drafts to your Jekyll blog direct from the RStudio console, by knit()ing an .Rmarkdown document into markdown with the YAML “front-matter” Jekyll expects. This is probably the best option for blogs.
rmarkdown_converter.rb is a Jekyll plugin that provides an Rmarkdown “converter”. This lets write your posts in RMarkdown and save them in your site’s _drafts or _posts directory with the extension Rmd or Rmarkdown, just like you normally post standard markdown documents.
The downside here is that changes to your R environment (you get a new computer and don’t reinstall all of the packages you had before, you upgrade R and one of the packages you used to use is no longer supported, etc.) can make it impossible to build your blog (or at least some posts). It might be more useful for some non-blog sites.
I’ve been experimenting lately with Paper.js, “The Swiss Army Knife of Vector Graphics Scripting.”
My first effort is below, an interactive (try selecting lines by clicking and dragging) parallel coordinate plot.
The plot below is displaying the state.x77 dataset
built in to R; I’ll think of something more interesting to display with it eventually.
I've been asked to look into doing some kind of analysis of this Sexual Health Rankings data. The data's available as a spreadsheet providing data by state, so I'm using my preliminary, check-this-stuff-out phase, as an opportunity to check out R's xslx package and Stately.
xslx allows you to read and write Excel workbooks from R. Below, I use the high-level read.xslx function to read blocks of cells from worksheets as dataframes, which is quick and easy to work with.
Another Shiny app, this one taking data on U.S. unemployment from Quandl and generating graphs and tables describing it. I was mainly trying to update my Shiny knowledge based on the new(-ish) version 0.4.
This app is [on GitHub](https://github.com/atbradley/shiny_unemployment), so it should be possible to run it with:
We have here 1530 individual plays, with 1274 unique tracks. That already sounds like more variety than Toronto’s Virgin Radio offers–most songs on RP were only played once. This makes the kind of chart Matt did for Virgin Radio a little boring here:
It could be interesting to do this kind of analysis with soma fm. Their stations–at least all the ones I’ve checked–post their playlists to Twitter, which gives us a built-in API for importing their playlist feeds. It might also be interesting (or it might not) to use Last.fm’s API to pull a list of user-contributed tags for each song, and analyze radio stations that way (or use the data to recommend radio stations to last.fm users).
In the sub-basement of the old State, War, and Navy building in Washington, DC, there’s a door with a small, yellowing card next to it reading, in Selectriced letters, “AMERICAN HISTORICAL ASSOCIATION.” (There is, of course, an ongoing debate between the authenticity faction and the archival preservation faction over whether the card ought to be replaced with one made of acid-free paper.) Inside the room is – well, is a lot more dust than there should be, actually, but also an agglomeration of black boxes wired to a console distinguished by its steel heft and Bakelite knobs. There’s a row of lights across the top of it, each with a paper label underneath – 1941, 1942, 1943, 1944, and so on – years extending back to the dawn of the republic and forward, with the limited foresight of the original engineers, to 1976. Fortunately, that year – with a special bicentennial appropriation – the AHA was able to add an auxiliary console, carrying the lights forward to the millennium. But no further; nobody works here full time anymore.
Objective To explore the perceived wisdom that papal mortality is related to the success of the Welsh rugby union team.
Results There is no evidence of a link between papal deaths and any home nation grand slams (when one nation succeeds in beating all other competing teams in every match). There was, however, weak statistical evidence to support an association between Welsh performance and the number of papal deaths.