The US box office bounced back in a big way this summer with revenue spiking 12.8% over this time last year, when it suffered the worst haul in two decades.

This summer's offerings of superhero movies, documentaries and films that ushered in a new era in on-screen representation has been the "perfect antidote" to last year's "abysmal" ticket sales, according to Paul Dergarabedian, senior media analyst at comScore (SCOR).

"Last summer gave short-sighted naysayers ammunition to declare the death of movie going," he said. "However, the cyclical nature of the industry was proven once again with a strong summer that had slate of films that offered everything from cinematic fast food to cinematic fine dining."

Here's how the US box office rebounded this summer:

Diversity

Hollywood finally got the message about representation. Films with diverse casts or ones that touch on race relations resonated with movie fans this summer.

"Ocean's 8," an all-female sequel to "Ocean's Eleven," topped the box office on its opening weekend in June. The film has since gone on to make $138 million domestically, which places it in the top ten highest-grossing films this summer.

Boots Riley's $3 million movie "Sorry to Bother You" has brought in roughly five times that amount since opening last month.

Spike Lee's "BlacKkKlansman" has made $26 million over its first two weeks, which is the most for a Lee film since 2006's "Inside Man."

And "Crazy Rich Asians," the first major studio film since "The Joy Luck Club" 25 years ago to feature a predominately Asian cast, exceeded expectations at the big box office as one of the biggest rom-coms in recent years. A sequel is in early development at Warner Bros.

Related: 'Crazy Rich Asians' exceeds expectations, takes top spot at box office

Documentaries

The summer movie season is not typically known for documentaries, but that wasn't the case this year.

"Three Identical Strangers," the Ruth Bader Ginsburg documentary "RBG" and the Mr. Rogers documentary "Won't You Be My Neighbor?" all made more than $10 million. "Won't You Be My Neighbor?" made a staggering $22 million. All three appeared in less than a 1,000 theaters during their theatrical runs.

This summer's docs were outliers because it's not a genre that is typically popular at the box office. The top documentary last year was Disney's nature film, "Born In China," which made $13.8 million, and the top documentary that was shown in less than a 1,000 theaters last year was "I Am Not Your Negro," which made $7.1 million.

"When people are fatigued by the news, by negativity, a divided country and sensationalism, a simple true story of one person overcoming huge obstacles to do good becomes almost soothing for adults to watch in the theater," Fandango correspondent Nikki Novak told CNN.

Related: From 'Solo' to 'Incredibles 2': How Disney moves on from a box office setback

Disney

The mouse was mighty this summer with three of the top five highest grossing films in the box office.

"The Incredibles 2" is at the top with "Solo: A Star Wars Story" and Marvel's "Ant-Man and the Wasp" coming in fourth and fifth, respectively.

Disney accounts for roughly a 35% market share of the overall box office this summer, according to comScore. That doesn't include the record opening weekend of "Avengers: Infinity War," which premiered a few days before the season began in May.

Even the studio's biggest disappointment this summer was somewhat successful. May's "Solo," which brought in lackluster returns for a "Star Wars" film, still made $213 million.

"Studios are stepping up their game to compete with not only each other but with streaming services like Netflix," Novak added. "What this summer really showed is that people still love going to the movies."