Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
A few days ago there was an interesting R based article by diffuseprior on the decline and fall in the quality of The Simpsons
The author scraped results from GEOS, an online survey of TV programs, and applied the R package changepoint to offer an analysis of the show over time
This seemed a candidate for a Shiny App, as there are another gross of shows on GEOS. 24 follows a similar pattern to ‘The Simpsons’ although this well-defined decline is by no means universal
. Although using this app multiplies the quantity of charts available, its automation precludes some of the difficult-to-accomplish, data munging done in the original post e.g excluding specials. This will cause some distortion
I have adapted diffuseprior’s code in a few respects
- I used the the readHTMLTable from the XML package as the data is contained in a tabular form
- I used ggplot for the graph rather than base plot. This took a bit more work but enabled me to display visually the relative number of voters for each episode of a show
- It is now available as a Shiny App , covering 145 shows, with any new GEOS votes incorporated in real-time
The code is available as a gist 5498431 (2903)
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.