knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
The boxoffice()
function scrapes information about daily box office results of movies. It scrapes the webpage https://www.the-numbers.com/ for this information. The data it returns are the following:
In essence, it shows how well each movie performed on a given day.
movies <- boxoffice::boxoffice(date = as.Date("2015-10-31")) dim(movies) movies[1:5, ]
There are two parameters for boxoffice()
: dates
and top_n
.
dates
are simply an input dates (in Date format) that you want to get information on. In accepts either a single date or a vector of dates. All results are ordered in descending order by how much that movie made on that day. For example, the top selling movie of the day is the first value while the worst selling movie is the last value.
top_n
gives only the top N highest grossing movies for that day. If you want only the top 10 movies that day (ranked by daily movie revenue), you would set top_n
to 10.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.