The buddy cop films have a plot with two conflicting personalities who are out to solve a crime or defeat some criminals. The partners always seem to be of different ethnicity and I wanted to see what was the most popular.


The movie list was gathered from the Buddy cop film Wikipedia page, specifically the American buddy cop films. Since sequels are popular (Rush Hour, Die Hard, Bad Boys, etc.), only the first movie will be considered, although buddies may change in subsequent films.


page <- read_html("")
amFilms <- page %>% html_nodes("ul:nth-child(13) i a")
movTitle <- amFilms %>% html_text # Western Films
wikiLink <- paste0("",amFilms %>% html_attr("href")) <- data.frame(title=movTitle,, stringsAsFactors=F)

# Need to remove sequels - though buddies may change in sequels (Die Hard), I'm going to say that they dont <-[-which($title == "Bad Boys II"),] <-[-which($title == "22 Jump Street"),] <-[-which($title == "Another 48 Hrs."),] <-[-which($title == "Ride Along 2"),] <-[-which($title == "Die Hard with a Vengeance"),] <-[-which($title == "Live Free or Die Hard"),]

To get the actor/actress in the movie, the link obtained above will be used to visit the film page and the first two in “Starring” will be used as buddy 1 and buddy 2. Since the buddies are the main stars, they are listed on the movie poster which the ‘movie infobox’ on Wikipedia uses. Unfortunately, using a table does not work for all pages as the format is slightly different between a few of the movie pages and caused to many issues. The way below captures most of the data needed after making a few edits to the respective Wikipedia page. Some manual edits will be needed for buddy animal movies such as K-9 and Turner and Hooch where the animal is not always listed but another actor/actress.

# put in buddies$buddy.1 <- NA$buddy.2 <- NA
base.node <- "#mw-content-text > table.infobox.vevent > tr"
for (k in 1:nrow( {
  page <- read_html($[k])
  star.node <- grep("Starring\n", page %>% html_nodes(base.node) %>% html_text) # Get node to create further
  buddies <- page %>% html_node(paste0(base.node, ":nth-child(", star.node, ")")) %>% html_nodes("a") %>% html_text # Extract buddies$buddy.1[k] <- buddies[1]$buddy.2[k] <- buddies[2]

# Fix a few movies$buddy.2[$title == "The Other Guys"] <- "Will Ferrel"$buddy.2[$title == "Skiptrace"] <- "Jimmy Fallon"

The following actor/actoress are given:

  title buddy.1 buddy.2
1 In the Heat of the Night Sidney Poitier Rod Steiger
2 Coogan’s Bluff Clint Eastwood Lee J. Cobb
3 Hickey & Boggs Bill Cosby Robert Culp
4 Brannigan John Wayne Richard Attenborough
5 The Gauntlet Clint Eastwood Sondra Locke
6 48 Hrs. Nick Nolte Eddie Murphy
8 Partners Ryan O’Neal John Hurt
9 City Heat Clint Eastwood Burt Reynolds
10 Beverly Hills Cop Eddie Murphy NA
11 Murphy’s Law Charles Bronson Carrie Snodgress
12 Armed and Dangerous John Candy Eugene Levy
13 Running Scared Gregory Hines Billy Crystal
14 Lethal Weapon Mel Gibson Danny Glover
15 Dragnet Tom Hanks Christopher Plummer
16 The Hidden Michael Nouri Kyle MacLachlan
17 Stakeout Richard Dreyfuss Emilio Estevez
18 Another Stakeout Richard Dreyfuss Emilio Estevez
19 Midnight Run Robert De Niro Charles Grodin
20 Shoot to Kill Sidney Poitier Tom Berenger
21 Heart Condition Bob Hoskins Denzel Washington
22 Colors Sean Penn Robert Duvall
23 Red Heat Arnold Schwarzenegger James Belushi
26 A Good Day to Die Hard Bruce Willis Jai Courtney
27 Alien Nation James Caan Mandy Patinkin
28 Taxi Queen Latifah Jimmy Fallon
29 Collision Course Jay Leno Pat Morita
30 K-9 James Belushi Mel Harris
31 Renegades Kiefer Sutherland Lou Diamond Phillips
32 Loose Cannons Gene Hackman Dan Aykroyd
33 Turner & Hooch Tom Hanks NA
34 Black Rain Michael Douglas Andy García
35 Tango & Cash Sylvester Stallone Kurt Russell
36 Downtown Anthony Edwards Forest Whitaker
37 I Come in Peace Dolph Lundgren Brian Benben
38 Marked for Death Joanna Pacula Keith David
39 The Rookie Clint Eastwood Charlie Sheen
40 Kindergarten Cop Arnold Schwarzenegger Penelope Ann Miller
41 The Hard Way Michael J. Fox James Woods
42 A Gnome Named Gnorm Anthony Michael Hall Jerry Orbach
43 Point Break Patrick Swayze Keanu Reeves
44 Showdown in Little Tokyo Dolph Lundgren Brandon Lee
45 The Last Boy Scout Bruce Willis Damon Wayans
46 Stop! Or My Mom Will Shoot!_Or_My_Mom_Will_Shoot Sylvester Stallone Estelle Getty
47 Last Action Hero Arnold Schwarzenegger F. Murray Abraham
48 Cop and a Half Burt Reynolds Ray Sharkey
49 Hellbound Chuck Norris Calvin Levels
50 Bad Boys Martin Lawrence Will Smith
52 Top Dog Chuck Norris NA
53 Seven Brad Pitt Morgan Freeman
54 Theodore Rex Whoopi Goldberg Armin Mueller-Stahl
55 The Rock Sean Connery Nicolas Cage
56 Bulletproof Damon Wayans Adam Sandler
57 Maximum Risk Jean-Claude Van Damme Natasha Henstridge
58 The Glimmer Man Steven Seagal Keenen Ivory Wayans
59 Metro Michael Wincott Donal Logue
60 Men in Black Tommy Lee Jones Will Smith
61 Rush Hour Jackie Chan Chris Tucker
62 The Negotiator Samuel L. Jackson Kevin Spacey
63 The Corruptor Chow Yun-fat Mark Wahlberg
64 Wild Wild West Will Smith Kevin Kline
65 The Bone Collector Denzel Washington Angelina Jolie
66 Blue Streak Martin Lawrence Luke Wilson
67 Shanghai Noon Jackie Chan Owen Wilson
68 Shanghai Knights Owen Wilson Donnie Yen
69 15 Minutes Robert De Niro Edward Burns
70 The Breed Adrian Paul Bokeem Woodbine
71 Osmosis Jones Chris Rock Laurence Fishburne
72 Replicant Jean-Claude Van Damme Michael Rooker
73 Training Day Denzel Washington Ethan Hawke
74 National Security Martin Lawrence Steve Zahn
75 Cradle 2 the Grave Jet Li DMX
76 Hollywood Homicide Harrison Ford Josh Hartnett
77 The Rundown The Rock Seann William Scott
78 Starsky & Hutch Ben Stiller Owen Wilson
79 White Chicks Jaime King Frankie Faison
80 Kiss Kiss Bang Bang Robert Downey, Jr. Val Kilmer
81 16 Blocks Bruce Willis Mos Def
82 Miami Vice Colin Farrell Jamie Foxx
83 The Pink Panther Kevin Kline Jean Reno
84 Righteous Kill Robert De Niro Al Pacino
85 Sherlock Holmes Robert Downey Jr. Jude Law
86 Cop Out Bruce Willis Tracy Morgan
87 The Grace Card Louis Gossett, Jr. Michael Jeffrey Joiner
88 The Other Guys Mark Wahlberg Will Ferrel
89 Big Mommas: Like Father, Like Son,_Like_Son Martin Lawrence Brandon T. Jackson
90 Dredd Karl Urban Olivia Thirlby
91 End of Watch Jake Gyllenhaal Michael Peña
92 Bullet to the Head Sylvester Stallone Sung Kang
93 21 Jump Street Jonah Hill Channing Tatum
95 The Heat Sandra Bullock Melissa McCarthy
96 R.I.P.D. Jeff Bridges Ryan Reynolds
97 2 Guns Denzel Washington Mark Wahlberg
98 Ride Along Kevin Hart John Leguizamo
100 Let’s Be Cops Damon Wayans, Jr. Jake Johnson
101 Hot Pursuit Reese Witherspoon Sofía Vergara
102 Zootopia Ginnifer Goodwin Jason Bateman
103 Bastille Day Idris Elba Richard Madden
104 The Nice Guys Russell Crowe Ryan Gosling
105 Central Intelligence Dwayne Johnson Kevin Hart
106 Skiptrace Jackie Chan Jimmy Fallon

To be Continued

In another post the movie, buddies, or buddy interaction will be classified to look into the movies.