TV shows rated by episode as a Shiny App

May 1, 2013
By

[This article was first published on PremierSoccerStats » R, 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.

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

24

.  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

  1. I used the the readHTMLTable from the XML package as the data is contained in a tabular form
  2. 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
  3. 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)

To leave a comment for the author, please follow the link and comment on their blog: PremierSoccerStats » R.

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.



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)