This function collects data from the-numbers’ list of movies ordered by how much money they made. This list is ordered by the total sales in one of three jurisdictions: American(usually called domestic), international, and worldwide (domestic+international). The first parameter, type
, lets you choose which of these jurisdictions you want the data ordered by. The data scraped is the name of the movie, its rank based on the order in the list type you select, and how much it made for all three jurisdictions. The second and only other parameter, ranks
lets you select movies in certain ranks - e.g. the top 10 movies, #s 100-105, etc.
type
The parameter type
lets you choose if you want the list of top grossing movies ordered by sales in “American”, by “international” sales, or “worldwide” sales. As some movies do better out of the America, this results in slightly differed ordering. The default selection is America.
# America
movies <- boxoffice::top_grossing(type = "American")
#> Please note that these numbers are not adjusted for inflation.
head(movies)
#> rank movie year_released
#> 1 1 Star Wars Ep. VII: The Force Awakens 2015
#> 2 2 Avengers: Endgame 2019
#> 3 3 Avatar 2009
#> 4 4 Black Panther 2018
#> 5 5 Avengers: Infinity War 2018
#> 6 6 Titanic 1997
#> american_box_office international_box_office total_box_office
#> 1 936662225 1131561399 2068223624
#> 2 858373000 1939427564 2797800564
#> 3 760507625 2029197650 2789705275
#> 4 700059566 646853595 1346913161
#> 5 678815482 1369544272 2048359754
#> 6 659363944 1548844451 2208208395
# International
movies <- boxoffice::top_grossing(type = "international")
#> Please note that these numbers are not adjusted for inflation.
head(movies)
#> rank movie year_released
#> 1 1 Avatar 2009
#> 2 2 Avengers: Endgame 2019
#> 3 3 Titanic 1997
#> 4 4 Avengers: Infinity War 2018
#> 5 5 Furious 7 2015
#> 6 6 Star Wars Ep. VII: The Force Awakens 2015
#> american_box_office international_box_office total_box_office
#> 1 760507625 2029197650 2789705275
#> 2 858373000 1939427564 2797800564
#> 3 659363944 1548844451 2208208395
#> 4 678815482 1369544272 2048359754
#> 5 353007020 1165715774 1518722794
#> 6 936662225 1131561399 2068223624
# Worldwide
movies <- boxoffice::top_grossing(type = "worldwide")
#> Please note that these numbers are not adjusted for inflation.
head(movies)
#> rank movie year_released
#> 1 1 Avengers: Endgame 2019
#> 2 2 Avatar 2009
#> 3 3 Titanic 1997
#> 4 4 Star Wars Ep. VII: The Force Awakens 2015
#> 5 5 Avengers: Infinity War 2018
#> 6 6 The Lion King 2019
#> american_box_office international_box_office total_box_office
#> 1 858373000 1939427564 2797800564
#> 2 760507625 2029197650 2789705275
#> 3 659363944 1548844451 2208208395
#> 4 936662225 1131561399 2068223624
#> 5 678815482 1369544272 2048359754
#> 6 543624567 1111810064 1655434631
The ranks
parameter accepts a vector of numbers indicating which rank(s) you want returned. For example using 1-5 will return only the top 5 movies. The default selection is to return ranks 1-100.
movies <- boxoffice::top_grossing()
#> Please note that these numbers are not adjusted for inflation.
head(movies)
#> rank movie year_released
#> 1 1 Star Wars Ep. VII: The Force Awakens 2015
#> 2 2 Avengers: Endgame 2019
#> 3 3 Avatar 2009
#> 4 4 Black Panther 2018
#> 5 5 Avengers: Infinity War 2018
#> 6 6 Titanic 1997
#> american_box_office international_box_office total_box_office
#> 1 936662225 1131561399 2068223624
#> 2 858373000 1939427564 2797800564
#> 3 760507625 2029197650 2789705275
#> 4 700059566 646853595 1346913161
#> 5 678815482 1369544272 2048359754
#> 6 659363944 1548844451 2208208395
#
movies <- boxoffice::top_grossing(ranks = 1)
#> Please note that these numbers are not adjusted for inflation.
head(movies)
#> rank movie year_released
#> 1 1 Star Wars Ep. VII: The Force Awakens 2015
#> american_box_office international_box_office total_box_office
#> 1 936662225 1131561399 2068223624
# Worldwide
movies <- boxoffice::top_grossing(ranks = c(1000, 34, 1, 55, 64))
#> Please note that these numbers are not adjusted for inflation.
head(movies)
#> rank movie year_released
#> 1 1 Star Wars Ep. VII: The Force Awakens 2015
#> 2 34 Jumanji: Welcome to the Jungle 2017
#> 3 55 The Lord of the Rings: The Two Towers 2002
#> 4 64 Batman v Superman: Dawn of Justice 2016
#> 5 1000 Earthquake 1974
#> american_box_office international_box_office total_box_office
#> 1 936662225 1131561399 2068223624
#> 2 404508916 559987277 964496193
#> 3 342548984 592150661 934699645
#> 4 330360194 537140087 867500281
#> 5 79700000 NA 79700000