FILE - In this March 9, 2016 file photo, the latest generation of SunPower solar panels are stacked in Positive Energy Solar's warehouse in Albuquerque, N.M. Mostly unnoticed amid the political brawl over climate change, America has undergone a quiet transformation in how and where it gets its energy during Barack Obama’s presidency, slicing the nation’s output of polluting gases that are warming Earth.   (AP Photo/Susan Montoya Bryan, File)
FILE - In this March 9, 2016 file photo, the latest generation of SunPower solar panels are stacked in Positive Energy Solar's warehouse in Albuquerque, N.M. Mostly unnoticed amid the political brawl over climate change, America has undergone a quiet transformation in how and where it gets its energy during Barack Obama’s presidency, slicing the nation’s output of polluting gases that are warming Earth. (AP Photo/Susan Montoya Bryan, File) Credit: Susan Montoya Bryan

HANGZHOU, China — Mostly unnoticed amid the political brawl over climate change, the United States has undergone a quiet transformation in how and where it gets its energy during Barack Obama’s presidency, slicing the nation’s output of polluting gases that are warming Earth.

As politicians tangled in the U.S. and on the world stage, the U.S. slowly but surely moved away from emissions-spewing coal and toward cleaner fuels like natural gas, nuclear, wind and solar. The shift has put the U.S. closer to achieving the goal Obama set to cut emissions by more than a quarter over the next 15 years, but experts say it is nowhere near enough to prevent the worst effects of global warming.

The overlooked changes took center stage Saturday in China. Obama and Chinese President Xi Jinping entered the world’s two worst polluters into a historic agreement to ratchet down heat-trapping pollution. Obama hailed “the investments that we made to allow for incredible innovation in clean energy.”

U.S. Department of Energy statistics show jolts in where America gets its volts:

In 2008, 48 percent of America’s electricity came from coal, the dirtiest power source; now it’s about 30 percent.

There are now more than three solar power jobs in the U.S. for every job mining coal.

In just the first five months of 2016, more solar power was generated than 2006 through 2012.

In 2008, the U.S. imported about two-thirds of its oil. Now, America imports less than half its oil.

U.S. emissions of carbon dioxide — the main greenhouse gas — are down more than 10 percent.

“There were gigantic changes happening in the energy world, gigantic tectonic changes,” said Peter Fox-Penner of the Boston University Institute for Sustainable Energy. “It’s a sea change. There is no question.”