#no R code needed ### Question 2 #no R code needed
#no R code needed
#no R code needed
library(robotstxt)
## Warning: package 'robotstxt' was built under R version 4.5.2
paths_allowed("https://en.wikipedia.org/wiki/2026_in_film")
## Warning: package 'future' was built under R version 4.5.2
## en.wikipedia.org
## [1] TRUE
library(rvest)
## Warning: package 'rvest' was built under R version 4.5.2
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.5.2
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
url <- "https://en.wikipedia.org/wiki/2026_in_film"
page <- read_html(url)
tables <- page |>
html_elements("table") |>
html_table()
tables
## [[1]]
## # A tibble: 3 × 1
## `List of years in film`
## <chr>
## 1 "… 2016\n2017\n2018\n2019\n2020\n2021\n2022\n2023\n2024\n2025\n2026\n2027\n20…
## 2 "Art\nArchaeology\nArchitecture\n\nLiterature\nMusic\nPhilosophy\nScience+..."
## 3 ".mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.m…
##
## [[2]]
## # A tibble: 19 × 1
## `Years in film`
## <chr>
## 1 ""
## 2 "19th century"
## 3 "1870s"
## 4 "1880s\n1880\n1881\n1882\n1883\n1884\n1885\n1886\n1887\n1888\n1889"
## 5 "1890s\n1890\n1891\n1892\n1893\n1894\n1895\n1896\n1897\n1898\n1899"
## 6 "1900s\n1900\n1901\n1902\n1903\n1904\n1905\n1906\n1907\n1908\n1909"
## 7 "1910s\n1910\n1911\n1912\n1913\n1914\n1915\n1916\n1917\n1918\n1919"
## 8 "1920s\n1920\n1921\n1922\n1923\n1924\n1925\n1926\n1927\n1928\n1929"
## 9 "1930s\n1930\n1931\n1932\n1933\n1934\n1935\n1936\n1937\n1938\n1939"
## 10 "1940s\n1940\n1941\n1942\n1943\n1944\n1945\n1946\n1947\n1948\n1949"
## 11 "1950s\n1950\n1951\n1952\n1953\n1954\n1955\n1956\n1957\n1958\n1959"
## 12 "1960s\n1960\n1961\n1962\n1963\n1964\n1965\n1966\n1967\n1968\n1969"
## 13 "1970s\n1970\n1971\n1972\n1973\n1974\n1975\n1976\n1977\n1978\n1979"
## 14 "1980s\n1980\n1981\n1982\n1983\n1984\n1985\n1986\n1987\n1988\n1989"
## 15 "1990s\n1990\n1991\n1992\n1993\n1994\n1995\n1996\n1997\n1998\n1999"
## 16 "2000s\n2000\n2001\n2002\n2003\n2004\n2005\n2006\n2007\n2008\n2009"
## 17 "2010s\n2010\n2011\n2012\n2013\n2014\n2015\n2016\n2017\n2018\n2019"
## 18 "2020s\n2020\n2021\n2022\n2023\n2024\n2025\n2026\n…"
## 19 "vte"
##
## [[3]]
## # A tibble: 10 × 4
## Rank Title Distributor `Worldwide gross`
## <int> <chr> <chr> <chr>
## 1 1 Cheburashka 2 † Central Partnership $79,559,272
## 2 2 28 Years Later: The Bone Temple † Sony $56,794,677
## 3 3 Send Help † 20th Century Studi… $55,900,522
## 4 4 Border 2 † AA Films $51,204,000[3]
## 5 5 Mercy † Amazon MGM Studios… $49,994,297
## 6 6 Iron Lung † Markiplier Studios $42,434,920
## 7 7 Return to Silent Hill † Iconic Events Rele… $41,586,056[4]
## 8 8 Primate † Paramount Pictures $39,722,402
## 9 9 Dracula † SND (France) $33,618,925
## 10 10 Mana Shankara Vara Prasad Garu † Gold Box Entertain… $32,225,000[5][6]
##
## [[4]]
## # A tibble: 19 × 5
## Date Event Host `Location(s)` Ref.
## <chr> <chr> <chr> <chr> <chr>
## 1 January 4 31st Critics' Choice Awards Criti… "California,… "[ci…
## 2 January 11 83rd Golden Globe Awards Golde… "Beverly Hil… ""
## 3 January 17 38th European Film Awards Europ… "Berlin, Ger… "[7]"
## 4 January 18 31st Lumière Awards Acadé… "Paris, Fran… "[8]"
## 5 January 24 13th Feroz Awards Asoci… "Pontevedra,… "[9]"
## 6 January 31 5th Carmen Awards Acade… "Granada, An… "[10…
## 7 February 7 78th Directors Guild of America Awards Direc… "Beverly Hil… ""
## 8 February 8 18th Gaudí Awards Catal… "Barcelona, … "[11…
## 9 February 21 53rd Annie Awards ASIFA… "Los Angeles… "[12…
## 10 February 22 79th British Academy Film Awards Briti… "London, UK" ""
## 11 February 26 51st César Awards Acadé… "Paris, Fran… "[13…
## 12 February 28 37th Producers Guild of America Awards Produ… "Los Angeles… ""
## 13 February 28 40th Goya Awards Acade… "Barcelona, … "[14…
## 14 March 1 32nd Actor Awards SAG-A… "Los Angeles… "[ci…
## 15 March 8 53rd Saturn Awards Acade… "Universal C… "[15…
## 16 March 8 78th Writers Guild of America Awards Write… "" ""
## 17 March 14 46th Golden Raspberry Awards Golde… "Los Angeles… ""
## 18 March 15 98th Academy Awards Acade… "Los Angeles… "[16…
## 19 March 16 34th Actors and Actresses Union Awards Actor… "Madrid, Spa… "[17…
##
## [[5]]
## # A tibble: 9 × 5
## Date Event Host `Location(s)` Ref.
## <chr> <chr> <chr> <chr> <chr>
## 1 January 2 – 12 37th Palm Springs Internati… Palm… Palm Springs… "[18…
## 2 January 22 – February 1 2026 Sundance Film Festival Sund… Park City, U… "[19…
## 3 January 29 – February 8 55th International Film Fes… Inte… Rotterdam, N… "[20…
## 4 February 4 – 14 41st Santa Barbara Internat… Sant… Santa Barbar… "[21…
## 5 February 12 – 22 76th Berlin International F… Berl… Berlin, Germ… "[22…
## 6 February 25 – March 8 22nd Glasgow Film Festival Glas… Glasgow, Uni… "[23…
## 7 March 6 – 15 29th Málaga Film Festival Mála… Málaga, Spain "[24…
## 8 May 12 – 23 2026 Cannes Film Festival Cann… Cannes, Fran… ""
## 9 August 13 – 19 79th Edinburgh Internationa… Edin… Edinburgh, U… "[25…
##
## [[6]]
## # A tibble: 43 × 8
## Month Date Name Age Country Profession `Notable films`
## <chr> <int> <chr> <int> <chr> <chr> <chr>
## 1 January 1 Arno Liiver 71 Estonia Actor SpringSummer
## 2 January 2 Con Pederson 91 US Visual Ef… 2001: A Space …
## 3 January 4 Sverre Anker Ousdal 81 Norway Actor Flight of the …
## 4 January 5 Ahn Sung-ki 74 South Kor… Actor Two CopsHansan…
## 5 January 6 John Cunningham 93 US Actor Mystic PizzaDe…
## 6 January 6 Saeid Pirdoost 85 Iran Actor The DeerKillin…
## 7 January 6 Béla Tarr 70 Hungary Director,… SátántangóThe …
## 8 January 8 Guy Moon 63 US Composer The Brady Bunc…
## 9 January 9 T. K. Carter 69 US Actor The ThingSpace…
## 10 January 9 Nessa Hyams 84 US Casting D… The ExorcistBl…
## # ℹ 33 more rows
## # ℹ 1 more variable:
## # `.mw-parser-output .tooltip-dotted{border-bottom:1px dotted;cursor:help}Ref.` <chr>
##
## [[7]]
## # A tibble: 1 × 2
## X1 X2
## <lgl> <chr>
## 1 NA This section is empty. You can help by adding to it. (February 2026)
highest_grossing <- tables[[6]]
#No R code needed
library(rvest)
library(dplyr)
library(purrr)
## Warning: package 'purrr' was built under R version 4.5.2
library(janitor)
## Warning: package 'janitor' was built under R version 4.5.2
##
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
years <- 2020:2025
hg_films <- map_df(years, function(y) {
url <- paste0("https://en.wikipedia.org/wiki/", y, "_in_film")
page <- read_html(url)
tables <- page |>
html_elements("table") |>
html_table()
highest_grossing <- tables[[6]] |>
clean_names()
highest_grossing |>
mutate(year = y)
})
hg_films
## # A tibble: 84 × 40
## category_organization x78th_golden_globe_awards_…¹ x78th_golden_globe_a…²
## <chr> <chr> <chr>
## 1 Category/Organization Drama Musical or Comedy
## 2 Best Picture Nomadland Borat Subsequent Movi…
## 3 Best Director Chloé ZhaoNomadland Chloé ZhaoNomadland
## 4 Best Actor Chadwick BosemanMa Rainey's… Sacha Baron CohenBora…
## 5 Best Actress Andra DayThe United States … Rosamund PikeI Care a…
## 6 Best Supporting Actor Daniel KaluuyaJudas and the… Daniel KaluuyaJudas a…
## 7 Best Supporting Actress Jodie FosterThe Mauritanian Jodie FosterThe Mauri…
## 8 Best Screenplay, Adapted Aaron SorkinThe Trial of th… Aaron SorkinThe Trial…
## 9 Best Screenplay, Original Aaron SorkinThe Trial of th… Aaron SorkinThe Trial…
## 10 Best Animated Film[d] Soul Soul
## # ℹ 74 more rows
## # ℹ abbreviated names: ¹x78th_golden_globe_awards_february_28_2021,
## # ²x78th_golden_globe_awards_february_28_2021_2
## # ℹ 37 more variables: x26th_critics_choice_awards_march_7_2021 <chr>,
## # producers_directors_screen_actors_and_writers_guild_awards_march_21_april_10_2021 <chr>,
## # x74th_bafta_awards_april_11_2021 <chr>,
## # x93rd_academy_awards_april_25_2021 <chr>, x <chr>, year <int>, …