The media smart set fixates on creating a narrative that explains the big picture of events and offers gripping examples. In that spirit, then, here’s a narrative to help them understand President Trump’s recent burst of activity:

He’s serving notice that he, and not the media, sets the nation’s agenda. And that when journalists behave like opponents, he will treat them like opponents, punching back harder than they punch him.

That’s the meaning of the president’s epic press conference Thursday and his tour of the Boeing plant in South Carolina and Saturday’s rally in Florida. As Milton Friedman said in another context, everything else is detail.

The catalyst for Trump’s campaign-like barnstorming was that, after a rough week in which Democrats in Congress picked up the loony left’s impeachment mantle, the president’s team looked outgunned and outmaneuvered. The emerging media narrative was that the White House was in chaos, riven by infighting, leaks, an unhappy president and an unhappier first lady.

Trump knows better than most that perception, even if it’s wrong, can quickly harden into accepted fact. He sensed danger and decided to take matters into his own hands.

Nobody speaks for Trump better than Trump, which is not always a virtue. But Thursday, he made a wise game-day decision to do his solo version of a reset.

The official business was to announce his new nominee for secretary of labor, a choice that was well-received by the few outlets where it wasn’t ignored because of the media punch-palooza that followed. (A good trivia question: Name the new guy!)

The president was deliberate in making his points, talking for more than 20 minutes about what he’s done to keep his campaign promises and how he’s unfairly depicted.

His impressive litany of action includes canceling the Asian-Pacific trade deal, green-lighting two pipeline projects and jawboning firms like General Motors and Walmart to spend and hire. He boasted of his 55 percent approval rating in a poll and of the booming stock market.

He talked about rebuilding the military, hosting leaders from Japan, Israel, Canada and Great Britain, strengthening borders and immigrant vetting, targeting the Islamic State and nominating Judge Neil Gorsuch for the ­Supreme Court, calling him a “true defender of our laws and our Constitution.”

Even as he complained about courts blocking his travel ban and Democrats delaying his cabinet picks, Trump hailed “a tremendous surge of optimism” about the changes he’s making.

That was Trump the agenda setter. Then came Trump the media basher.

He contrasted public optimism with relentless press criticism, saying big outlets on both coasts don’t speak “for the people, but for the special interests and for those profiting off a very, very ­obviously broken system. The press has become so dishonest that if we don’t talk about [it], we are doing a tremendous disservice to the American people.”

He added: “We have to talk to find out what’s going on, because the press honestly is out of control. The level of dishonesty is out of control.”

That was the start of a sustained media attack like nothing America has ever seen. If this were football, it would be described as smash-mouth because the president plowed straight into the ­establishment powers.

He called much coverage “dishonest” and “fake news.” He accused some of “hate” and “venom” and singled out individual reporters, anchors and outlets, especially CNN, saying it now peddles “very fake news.”

It was an extraordinary use of the bully pulpit, yet accounts calling it a nonstop rant don’t do it justice. Some of it was playful and teasing, and Trump wasn’t alone in finding humor on several occasions. Many journalists clearly enjoyed the raucous informality, which included back-and-forth exchanges where some freely talked over the president.

Contrast that with the previous eight years of news conferences, where President Barack Obama generally delivered long lectures to an amen chorus.

There was contrast, too, in Trump spending 50 minutes taking more than 40 questions, all spontaneous and none arranged in advance. It was a scrum to be called on, and no topic was off-topic — he answered them all.

He also made errors, repeated himself frequently and some answers raised more questions. But the overall performance was incredibly effective at creating a very different narrative about his tenure for the TV audience — the people he cares about most.

Expect those two themes — he is putting America First and much of the media is dishonest — to be the pillars of his presidency, as they were the pillars of his campaign. That’s why he’s taking his show on the road, and likely will do so regularly.

Predictably, his prime media targets reacted with feverish claims that Trump was “unhinged” and his ­attacks were “un-American.” Some said he is a threat to the First Amendment.

On the contrary, he’s embracing it. As legendary New Yorker Ed Koch often said about his own criticisms of the press and judges, he didn’t lose his First Amendment rights when he became mayor.

So it is with Trump. He’s free, like all Americans, to speak his mind. His words carry more weight as president, but attempts to silence him are truly un-American. The White House is not a coddled college safe space.

Something else Koch said also is relevant. He once called a journalist who was a partisan critic a “politician with a press pass.”

That’s how Trump sees much of the media, and he’s more right than wrong. Many tried to block his election, and now are trying to destroy his presidency.

They have a choice: Get back to being journalists, or get used to being a piñata.

Now Blas ‘de’faces the nation

Mayor Bill de Blasio believes he’s fixed New York and is now concentrating on the rest of America. Heaven help the country.

The mayor, the focus of federal and state criminal probes, wrote to 17 banks demanding they withdraw financing from the Dakota Access oil pipeline project. His reasons read like a protester pamphlet, citing climate change, Indian tribal lands, groundwater, the banks’ balance sheets and rising sea levels.

Naturally, he rails against “the greed of a few wealthy oil industry executives.” The mayor also cites his duty to city pension funds, which are invested in some of the banks, implying the city might disinvest if the banks ignore him.

It’s tempting to tell the mayor to focus on his day job. But his divided attention, while a loss for the nation, is a win for New York.

Times, they’re not a-changin’

He’s No. 1.

New York Times columnist Tom Friedman takes the cake for writing “The Dumbest Thing Ever.” A recent anti-Trump rant included this absurdity: “Ladies and gentlemen, we were attacked on Dec. 7, 1941, we were attacked on Sept. 11, 2001, and we were attacked on Nov. 8, 2016.”

Arizona lets inmates bring their own lethal drugs to execution

How sweet, a B.Y.O.L.D. party.