boxoffice: Download Information on Box Office Results for Movies

Description Usage Arguments Value Examples

View source: R/main_function.R

Description

Download Information on Box Office Results for Movies

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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")))

boxoffice documentation built on May 2, 2019, 3:26 p.m.