Mark Wahlberg has come a long way since his troubled early days, working his way up from seedy beginnings making “Entourage” and going on to become an icon of the fast-casual hamburger scene in and around Boston.

All right, we’re playing around here, but Mark Wahlberg’s career is fascinating. He’s had a remarkable life — a tough childhood, jail time for racially motivated assaults, then a turnaround into a checkered music career and a steady two-decade rise to legitimate stardom that has also enabled him to become a television producer whose projects include exciting HBO programming like “Boardwalk Empire” and “Ballers.”

With “Deepwater Horizon” out this week and getting mostly positive reviews, I wanted to see what the man’s film career has looked like. As I’ve done in the past, I plotted his domestic box office gross according to the database The Numbers against the critic score from Rotten Tomatoes to see how his career has played out.

A Gambler

“How come we only ask ourselves the really big questions when something bad happens?” — Tommy Corn, “I Heart Huckabees”

Films: “The Basketball Diaries” (1995), “Fear” (1996), “The Big Hit” (1998), “The Corruptor” (1999), “The Yards” (2000), “Rock Star” (2001), “I Heart Huckabees” (2004), “Four Brothers” (2005), “Shooter” (2007), “We Own The Night” (2007), “Date Night” (2010), “Contraband” (2012), “Pain & Gain” (2013), “2 Guns” (2013), “The Gambler” (2014), “Ted 2” (2015).

These films reflect the core Mark Wahlberg persona: what happens when you try to pull a “My Fair Lady” on a Boston street tough and everything somehow works out in the end, even though your subject doesn’t actually transform. He’s pulled off something that fellow actors Ben Affleck and Matt Damon never could, which is to maintain his brusque Bostonian diction and Masshole reputation despite his longtime residence in California and having millions of dollars he could spend to help lose the accent, if he wanted to.

Given his down-to-earth man-off-the-street vibe, it’s interesting that in this batch of moderately well-received films, Wahlberg plays two major types: the crook and the law.

Sometimes he plays a guy who moved beyond his criminal past only to get dragged back in (“Contraband” and “The Yards” are prime examples), and other times he plays a guy who slowly falls into felonious ways to get out of a bad beat (“Pain & Gain” and “The Big Hit,” for example). His more upstanding roles are more diverse, though: In “We Own The Night,” “Shooter” and “I Heart Huckabees,” his characters are a cop, a former soldier chasing bad guys and a firefighter.

If you’re a casting director, you’d read these parts and say, “We need a real Mark Wahlberg type here.” If you can’t afford Wahlberg’s fee, you call Ryan Gosling.

Max Pain

“I don’t believe in heaven. I believe in pain. I believe in fear. I believe in death.” — Max Payne, “Max Payne”

Films: “Renaissance Man” (1994), “The Truth About Charlie” (2002), “The Happening” (2008), “Max Payne” (2008), “The Lovely Bones” (2009), “Broken City” (2013), “Entourage” (2015).

For much of his career, Mark Wahlberg has only been as good as his collaborators. He has often been one half of a good movie, and if you can’t cast the other half — a George Clooney, Will Ferrell or Seth MacFarlane — it won’t work. These are films where he was left on his own and couldn’t hold a movie together, although each movie has its own reason for falling apart. “The Happening” didn’t work because nobody believed Mark Wahlberg could be a science teacher. “The Lovely Bones” didn’t work because Peter Jackson is good at directing movies with placid hobbits in them, and there is nothing on this earth more unlike a hobbit than Mark Wahlberg. “Entourage” didn’t work because it was a movie that continued the saga of “Entourage.”

One movie worth highlighting: “Renaissance Man,” Wahlberg’s first film. It’s the movie Danny Devito wanted to be his “Dead Poets Society.” It did not work. Wahlberg played a Southerner in this, which is like casting Steve Buscemi to play Helen of Troy.

More Than Meets The Eye

“What do you think being human means? That’s what we do. We make mistakes. Sometimes, out of those mistakes come the most amazing things. … When I fixed you, it was for a reward. That was it. That was why. The money. And it was me making a mistake.” — Cade Yeager, “Transformers: Age of Extinction”

Films: “The Perfect Storm” (2000), “Planet of the Apes” (2001), “Ted” (2012), “Transformers: Age of Extinction” (2014), “Daddy’s Home” (2015).

Mark Wahlberg is one of the most bankable actors in the movie business, and these films are a big reason why. They crushed it at the box office — Transformers films are a guaranteed payday — despite being of varying quality, and Wahlberg played a range of roles in them. In some he even played an intellectual — he was an inventor in “Transformers” and an astronaut in “Planet of the Apes,” a film that left unresolved how far Mark Wahlberg got with the chimpanzee played by Helena Bonham Carter.

I mean, ask yourself this: If NASA announced a mission to a space station and Mark Wahlberg was the lead primate researcher, how many people at NASA do you think would get fired? It’s the only situation where Bruce Willis getting sent into orbit seems sensible by comparison.

Invincible

“See? God’s looking out for us.” — Marcus Luttrell, “Lone Survivor”

Films: “Traveller” (1997), “Boogie Nights” (1997), “Three Kings” (1999), “The Italian Job” (2003), “Invincible” (2006), “The Departed” (2006), “The Other Guys” (2010), “The Fighter” (2010), “Lone Survivor” (2013).

We’ve had some fun with Wahlberg here. Sure, his attempts to launch his immediate family into show-business careers haven’t worked out — Donnie Wahlberg makes Stephen Baldwin look like Luke Wilson — but the guy has put in some fantastic performances.

Each of these films was, in their own way, a milestone for Wahlberg. “Boogie Nights” — one of my top-five favorite movies ever — surrounded him with an all-star cast and let him grow into a leading-man role. Almost 10 years later, he showed he can still do a serious dramatic role in “The Departed.” All that led up to his role in the best-picture-nominated “The Fighter,” where he held his own alongside Very Serious Actor Christian Bale, who won an Oscar for that performance. And then in “Lone Survivor” — spoiler alert? — Wahlberg held down a blockbuster completely on his own for the first time. He’s often struggled to carry films when he doesn’t have a strong supporting cast to lean on — just check out the first two sections. Every film in this grouping is one in which he demonstrated serious growth as an actor.

And then there’s his most difficult role of all time, “Invincible,” in which he needed to make a Philadelphia Eagles fan a likable character. That’s an essentially impossible task, as everyone in America knows, but somehow, he made it work.

Based on early reviews of the movie and Wahlberg’s performance, “Deepwater Horizon” seems to fall into this final group. He’s playing a roughneck, which is a term that can be used to describe someone who works in the oil and gas business but could just as easily be applied to Mark Wahlberg’s general aesthetic. It’s another chance for him to step out, “Lone Survivor”-style, in a competently made film about a type of character that he’s honed to perfection.

Gosh, how far he’s come.