Reasons to be cheerful. Photo: Tom Williams/CQ-Roll Call,Inc.

Last Friday, President Trump grudgingly signed into law an enormous, $1.3 trillion omnibus spending bill, which he threatened to veto at the last minute because it allotted only $1.6 billion to his beloved border wall — a pittance compared to his asking price of $25 billion.

The bill did include a significant increase in defense spending, cuts to the State Department’s budget, and no permanent solution for Dreamers. Still, border security was hardly the only area where the president and his most ardent fans had reason to feel slighted. In fact, the bill, which will fund the government through September, ended up looking less like a Republican wish list than a Barack Obama fever dream — a far cry from the draconian version of government the Trump administration proposed in its official budget last month.

Here are five areas in which Democrats got more than they might have expected out of the deal:

1) Clean Energy Gets a Boost

President Trump’s proposed budget hit the Environmental Protection Agency with a 31 percent budget cut, and Republicans had attached more than 80 anti-environment riders in various drafts of the House and Senate bills as they wound their way through Congress.

In the end, the EPA retained its current funding level of $8.1 billion, while the Office of Energy Efficiency and Renewable Energy, which Trump had vowed to chop by a staggering 70 percent, actually saw a funding boost of 12.5 percent. The riders, which would have blocked implementation of the Interior Department’s methane venting and flaring rule, among other things, were mostly dropped. And many of the clean-energy policies pushed by President Obama in his 2009 stimulus bill were generously funded, like TIGER, a grant program for transportation projects, and ARPA-E, an energy research agency.

2) PBS Lives

For culture-warrior Republicans, national arts programs are perpetual bogeymen to be held up as misbegotten liberal priorities, even though they constitute a tiny sliver of the federal budget. The Trump administration is no different. In its budget, it proposed eliminating funding altogether for the National Endowment for the Arts and the National Endowment for the Humanities

But after an intense lobbying push on Capitol Hill, the budget Trump signed boosted funding for both of them by $3 million each, to $153 million apiece for the fiscal year. The Corporation for Public Broadcasting, which Trump had also threatened with the ax, retained its $445 million budget. And Congress financed other, smaller priorities, like upgrading the public broadcasting interconnection system.

“The legislation reaffirms that federal funding for public media is an investment that continues to deliver proven value and service to the American people,” said Patricia Harrison, the head of the CPB.

3) No Crisis at the CDC

President Trump had called for slashing funding for the Centers for Disease Control and the National Institutes of Health, but the omnibus mandates a budget increase for both agencies, to $8.3 billion for the CDC and $37 billion for the NIH. The 8.8 percent increase for the latter agency’s funding is the biggest in 15 years. Specific priorities, like Alzheimer’s research and the development of a universal flu vaccine, were generously funded to the tune of tens to hundreds of millions of dollars.

Democrats also trumpeted a rollback of the CDC’s research ban on guns, though public-health experts say not much is likely to change on that score.

4) Trump Subsidizes His Least Favorite Infrastructure Project

President Trump was personally interested in blocking federal funding for the New York–New Jersey mega-infrastructure project, as Transportation Secretary Elaine Chao admitted in congressional testimony earlier this month. Why he is so vehemently opposed to the project — which would install a much-needed tunnel between Manhattan and New Jersey, among other improvements — isn’t entirely clear, but petty personal grievances with Chuck Schumer and other New Yorkers is a safe bet.

Thanks in large part to his opposition, funding for the tunnel was not earmarked in explicit terms. But local legislators are confident that about $540 million in infrastructure dollars included in the bill will end up going to Gateway. There are legitimate reasons to oppose the project, but President Trump appears to have lost this battle, at least for now.

5) The Census Is Funded (Though Still in Trouble)

On Monday night, the Commerce Department announced that it would add a citizenship question to the 2020 census, an ominous development for an accurate count of U.S. residents. But there was some good news for the survey in last week’s bill. It had been an open question as to whether a Republican Congress that had shown little interest in ramping up funding ahead of the count, which has been the traditional fiscal process for decades. On that point, at least, Democrats can breathe a sigh of relief. The omnibus funds the 2020 census at a rate of $2.814 billion, double the number for 2017. Experts warn that the number will have to jump again next year to keep pace with organizational requirements, but for now, they’re pleasantly surprised. “When I found out about it yesterday I almost fell out of my chair,” John Thompson, who resigned from the Census Bureau over funding struggles last May, told the Washington Post.