WASHINGTON, D.C. -- American public opinion changed in significant ways over the course of Barack Obama's eight years in the White House, including on issues such as the economy, race relations, and the level of confidence the public has in different aspects or actors in the government. Many of these changes were the result of social and cultural forces that would have occurred regardless of who was president. Others can be more directly attributed to the Obama presidency.

But whatever their provenance, a look at how attitudes have shifted over the Obama years can be important. These shifts help explain the current political climate and provide a context for President Donald Trump's attempts to pursue his agenda now that he is in the White House.

In the following sections, we review changes since 2009 in five major areas of public opinion.

1. Views of the U.S. Government

In his farewell address, Obama said that widespread disillusionment with the political system can "weaken the ties" that bind the nation. And indeed, marking one of the most significant shifts in public opinion over the past eight years, Americans are losing faith in all aspects of their government, from its political leaders, to long-standing institutions, to many of the agencies that provide public services.

Several measures relating to the public's confidence in government recorded historic lows at some point over the Obama presidency, while others flirted with this landmark. These include:

Americans' trust in the nation's political leaders struck its lowest level in the final year of Obama's presidency, standing at 42%. In 2009, the figure was 49%.

Confidence in the Supreme Court and Congress sunk to record lows in 2014, at 30% and 7%, respectively.

Throughout the past eight years, Congress continuously received dismal approval ratings, dropping to a yearly low of 14% approval in 2013. By December 2016, little improvement had taken place, with approval standing at 17%.

Obama's job approval rating tended to fare better than that of Congress, as typically is the case when comparing the president to the Congress. But Obama's average approval rating over his two terms ranks among the lowest in Gallup history.

Though Obama often spoke of bipartisanship, the president was a highly polarizing figure. The difference in his job approval rating among Democrats and Republicans is the largest in Gallup polling history. This is the continuation of an in-progress trend; Obama's immediate predecessor, George W. Bush, was also the most polarizing president ever when he left office.

But Americans did not just lose confidence in elected officials -- they also lost confidence in the electorate. In 2016, prior to that year's presidential election, a new low of 56% of Americans said they had trust and confidence in their fellow citizens when it comes to making decisions in our democratic process. In 2009, 73% had such trust and confidence.

Bottom Line: Obama said many times before he left office, including in his last State of the Union address, that he regretted making no progress in reducing the divisiveness that has come to define American politics since at least the Bush presidency. The lack of confidence in political (and other) institutions helped contribute to Trump's victory, based on his positioning as a change candidate who consistently derided many government institutions as ineffective or corrupt. It seems Obama understood the problem facing American democracy but was unable to provide an immediate solution.

2. Social and Values Issues

The number of Americans who consider themselves "liberal" or "very liberal" on social issues rose markedly over Obama's eight years. In 2009, about a quarter of Americans saw themselves as liberal on social issues, a figure in line with those observed in past years. By 2016, closer to a third (32%) identified as socially liberal, the highest since Gallup began asking this question in 1999.

The broad acceptance of legal gay marriage is perhaps the best specific example of this shift to more liberal social positions. In 2009, 40% of the country said same-sex marriages should be recognized as valid throughout the U.S., while a majority (57%) -- including President Obama -- disagreed. By 2016, the year after the Supreme Court made its landmark ruling legalizing gay marriage, a clear majority of 61% believed such marriages should be valid throughout the country.

Additionally, Americans' views of a number of once-controversial behaviors as "morally acceptable" rose, especially with issues such as divorce, sex between an unmarried man and woman, having a baby outside of marriage, and gay or lesbian relations. Americans also became slightly more tolerant of sex between teenagers and suicide, although these behaviors remained morally unacceptable to a large part of the population.

In Obama's final year in office, a record 60% of Americans said marijuana should be legal. In 2009, by contrast, that figure stood at 44%. Among Democrats, the level of support nearly doubled over about a 10-year period.

Bottom Line: Whether directly related to his presidency or not, the Obama era saw a rise in social liberalism across a number of moral and values-related issues.

3. Economic Issues

The Obama administration, taking office at one of the worst economic times in U.S. history, focused heavily on measures designed either to prevent economic conditions from worsening or to strengthen the economic recovery when it came. By most measures, Americans' views of the economic situation improved significantly over the eight years of Obama's presidency.

In Obama's first year as president (2009), 23% of Americans said they were better off financially than the year before. In 2016, over four in 10 (44%) said so. This 21-point shift represents one of the largest shifts in public responses among all the questions examined in this review.

Gallup's measure of Americans' confidence in the economy via its Economic Confidence Index improved significantly over Obama's tenure, though unevenly. The index registered -54 in January 2009 when Obama took office and climbed to +9 by December 2016.

American workers' reports of hiring and firing at their places of employment improved significantly over the eight years of the Obama presidency. This U.S. Job Creation Index stood at -3 in January 2009, and by December 2016 it had improved to +33.

The percentage of Americans mentioning any economic issue (e.g., jobs, the economy in general, etc.) as the most important problem facing the nation dropped from 79% in January 2009 to 29% in December 2016.

Bottom Line: Although Trump's campaign focused in large part on what he portrayed as an economically ravaged country, most tracking indicators relating to the economy showed marked improvement from 2009 to 2016.

4. U.S. Position in the World

Under the Obama presidency, more Americans came to believe that the U.S. is seen favorably by the rest of the world -- 45% thought so in 2009 compared with 54% in 2016. Americans, however, were no more satisfied with the position of the U.S. in the world under Obama than they had been in the late years of the Bush presidency. Less than four in 10 Americans (36%) were satisfied with the position of the U.S. in the world in 2016, essentially equivalent to the first reading in the Obama years (35% in 2011) and marginally better than the 30% in 2008, Bush's final year in office.

Americans' views of the military position of the U.S. deteriorated during the Obama years. In 2010, 64% said that the U.S. was the No. 1 military power in the world. By 2016, that number had dropped to 49%. In similar fashion, the share of Americans who said the government spends "too little" on defense climbed 13 percentage points to 37% from 2009 to 2016.

The public gradually lost confidence in the federal government to handle international problems over Obama's tenure. In 2009, 62% had confidence in the federal government's ability to handle international problems. This fell as low as 45% in 2015 before recovering slightly to 49% in 2016.

One of the most controversial aspects of Obama's foreign policy was his choice to engage in diplomatic relations with two nations with which the U.S. had officially been incommunicado: Cuba and Iran. With respect to Cuba, Obama and the Cuban government agreed to take measures to normalize relations between the two countries for the first time since 1961; Iran reached a deal with the U.S. and five other world powers regarding its nuclear program.

These efforts seem to have paid off for Cuba, in terms of that nation's image with the American people. In 2009, less than a third of Americans had a favorable view of Cuba. In 2016, a majority (54%) saw Cuba favorably.

But opinions of Iran remained largely unchanged after the 2015 deal -- 14% had a favorable view in 2016, compared with 11% the year before and 12% in 2009.

Other countries saw their images among the American people improve, but likely for reasons unrelated to Obama. France, once deeply unpopular for its decision not to participate in the 2003 invasion of Iraq, saw its favorable rating zoom to a new high of 87% in 2016. France's favorable rating was 64% in 2009.

Meanwhile, two countries saw their images decline over the Obama years. In 2009, 28% of Americans had a favorable opinion of Iraq; in 2016, with American troops back in the country to advise Iraqi forces in their fight against terrorist groups, 15% had a favorable rating.

Russia, a country the Obama administration would come to accuse of interfering with the 2016 presidential campaign, saw its favorable rating decline 10 points from 2009 (40%) to 2016 (30%).

5. Race Relations

Former President Obama will occupy a place in history as the nation's first African-American president. But while his election would seem to signal that American society has overcome its past history of racial discrimination and tension, Americans' views of race relations in fact became far less harmonious during Obama's tenure in office.

In 2010, slightly more than one in 10 Americans said they worried about race relations "a great deal" (13%). By 2016, 35% of Americans said they worried about race relations, following a number of high-profile cases involving police officers shooting unarmed black men and several instances of white police officers being targeted by blacks.

More Americans over the past eight years came to believe that Obama's election and his presidency made race relations "worse" in the U.S. rather than better, with 46% believing the former in 2016 and 29% saying the latter. This represented a sharp reversal of opinion from 2009, when 41% of Americans believed Obama's election and presidency made race relations better and 22% said worse.

Relatedly, Americans became less certain about whether Obama's presidency in and of itself represented "one of the most important advances" for black Americans. In 2009, 71% of blacks and 56% of whites thought this; by 2016, the figure had fallen to 51% for blacks and 27% for whites.

Bottom Line: Many spoke of Obama's election ushering in a new "post-racial" period in America. But as even Obama himself admitted in his farewell address, this has not been the case. If anything, his presidency appears to have illuminated the previously hidden fault lines that still exist in U.S. race relations.