A very simple shiny application

Raphael Cóbe
22/12/2015

Goals

User input

  • Parameters Input:
    • A Slide bar to select the time frame for the analysis;
    • A set of checkboxes for selecting the Movie Genre or combination of Genres;
      • A movie can belong to more than one genre;

user input

Output: Plot 1 - Number of Movies over the years

As response, a plot with the distribution of movies over the years is generated

imdb <- filterByGender(NULL,imdb)
selectedDataset <- aggregate(imdb$Count, by = list(year = imdb$year), FUN = sum)
filteredData <- filter(selectedDataset, year > minDate & year < maxDate)
plot <- nPlot(x ~ year, data = filteredData, type = "multiBarChart")

Output: Plot 1 (Result)

plot$show('inline', include_assets = TRUE, cdn = TRUE)

Output: Plot 2 - Comparison Between Budget and Ratings (averaged)

The third tab show a chart that compares the growth on budget compared with the average movies rating:

h <- Highcharts$new()
h$xAxis(categories = filteredData$year, tickInterval=5, width=480)
h$yAxis(list(list(title = list(text = 'Budget'))
             , list(title = list(text = 'Ratings'), opposite = TRUE))
)
h$series(name = 'Budget', type = 'spline', data = filteredData$x)
h$series(name = 'Ratings', type = 'spline', data = filteredData$rating,
         yAxis = 1)

Output: Plot 2 - Result

h$show('inline', cdn = TRUE, include_assets = TRUE)

Conclusion

  • Developing data Products with shiny os quick;
  • Making presentations using RStudio Presentation tool is also quick;
  • Both interfaces look nice and can be used from a simple browser;
  • The publishing tools are also easy to use;