boxoffice (version 1.3.0)

boxoffice: Download Information on Box Office Results for Movies

Description

Download Information on Box Office Results for Movies

Usage

boxoffice(dates, site = c("mojo", "numbers"), top_n = NULL)

Arguments

dates

A vector of dates to scrape

site

Whether you want to get data from boxofficemojo.com or the-numbers.com. Accepts inputs of "numbers" (default) or "mojo".

top_n

The number of results to return for each day. If NULL (default) returns all results, otherwise just top n results (e.g. top_n = 5, returns 5 top movies per date).

Value

Data frame returning info on the name of the movie, its daily gross, gross-to-date, and gross-per-theater for each date inputted.

Examples

Run this code
# NOT RUN {
# Uses the-numbers.com website.
boxoffice(dates = as.Date("2017-12-25"))

# Uses boxofficemojo.com website.
boxoffice(dates = as.Date("2017-12-25"), site = "mojo")

# Returns only top 10 (daily) grossing movies
boxoffice(dates = as.Date("2017-12-25"), top_n = 10)
# Uses the dates of Christmas and New Years Eve 2017
boxoffice(dates = as.Date(c("2017-12-25", "2017-12-31")))

# }

Run the code above in your browser using DataCamp Workspace