San Francisco likes to think of itself politically, socially and culturally as akin to European countries.

But when it comes to income equality - or lack thereof - we're far less Sweden and Denmark and far more Central America and sub-Saharan Africa.

In one measurement, we're about on par with Rwanda. Yes, Rwanda.

The city's Human Services Agency has released a new report filled with startling data about a rapidly changing San Francisco, where the rich are getting richer and more educated, the poor are falling further behind and the middle-class is skipping town altogether.

One way of measuring income inequality is called the Gini Coefficient, a century-old formula used by the World Bank, the CIA and other groups to measure national economies. If everybody in any given place shares wealth equally, the region scores a 0. If one person holds all the wealth, it scores a 1.

Using 2012 figures from the American Community Survey, a branch of the U.S. Census Bureau, the Human Services Agency calculated San Francisco's Gini Coefficient at .523.

According to the World Bank, Sweden scores a .25, Denmark scores a .24, and the United States as a whole scores a .45.

Rwanda actually shares wealth a little more than San Francisco, scoring a .508. But we are doing a bit better than Guatemala at .559. So there's that.

The scores are to be taken with a grain of salt since social services and charities mean it's different to be poor in San Francisco than in Rwanda or Guatemala, but they still demonstrate a quickly widening gap between our city's top and bottom earners.

The Brookings Institution recently found the income gap between San Francisco's rich and poor is growing faster than in any other city in the nation. The Human Services Agency's data further illustrate the phenomena.

-- For every 1,000 people over age 25 in San Francisco, 7.3 are worth more than $30 million - far more than in other wealthy cities, including New York, Los Angeles and Washington, D.C.

-- Census figures comparing the city in 1990 and 2010 show there are fewer households making between $25,000 and $100,000 annually (with dollars adjusted to take inflation into account). There are more earning less than $25,000 and more earning more than $100,000. The biggest leap is for those making more than $200,000 a year. More than 40,000 households made that much in 2010 compared with less than 15,000 in 1990.

-- The middle class - or those earning between 50 and 150 percent of the city's median household income of $72,500 - has shrunk from 45 percent of the city's population in 1990 to 34 percent in 2012. Both ends of the spectrum have grown.

-- The shrinking middle class has meant fewer families with children and fewer African Americans. Just 13.4 percent of the city's residents are younger than 18, the smallest percentage of any city in the country. Just 6 percent of the city is black, and the total population of African Americans is half what it was in 1950.

-- According to the U.S. Census from 2010, there are 50,652 more graduate degree holders living here than in 1990. There are 34,028 fewer people living here who don't have at least a high school diploma.

-- In 2007, 10.5 percent of San Franciscans lived in poverty. In 2012, 15 percent did. To receive state benefits and food stamps, a family has to earn less than 75 percent of the federal poverty level, which is $18,530 for a family of three. The bare minimum to be self-sufficient in San Francisco is pegged at $57,658 for a family of three, meaning many families make too much to qualify for assistance but too little to be self-sufficient.

-- Many San Francisco families are surviving by living doubled-up with another family in one unit. Among Latinos in San Francisco, 42.4 percent live this way and for Asians, 37.4 percent do. Twenty-five percent of African Americans live doubled-up, and 18 percent of whites do.

-- The changes are reshaping many San Francisco neighborhoods. The Bayview and Visitacion Valley are becoming home to far fewer African Americans and far more Asians. The Inner Mission is becoming less Latino and more white.

So why should San Franciscans care, especially because so many of them are so well educated and make so much money? After all, construction is booming, the city's coffers are full and the unemployment rate is down.

Andrew Russo is the co-founder and director of the San Francisco Family Support Network, a group of city agencies, nonprofits and private foundations that work on behalf of children and families. The network asked the Human Services Agency to compile the report for a forum on families in San Francisco.

"It really paints a stark picture beyond the glitz, where it looks like everything's going great," Russo said. "Look at the data here, and we've got some real challenges."

San Francisco has been bleeding families for decades, mostly because of the high cost of living, the high cost of housing, especially with multiple bedrooms, and concerns over the public school system. But the growing income inequality could further exacerbate that.

"It's not about knocking wealthy people for being wealthy," Russo said. "It's about looking at how do we support families of all incomes to be able to live here - that's part of the rich diversity of San Francisco.

"A city without families is a city without vibrancy and life," he continued. "A city without children seems like a weird, dystopian universe."

Trent Rhorer, director of the Human Services Agency, said his caseload isn't growing, it's just that it's harder for families receiving benefits to do anything with them in the city.

Increasingly, the city is administering rent subsidies and Section 8 housing vouchers to families who then must move to the far reaches of the East Bay or Contra Costa County to find apartments priced low enough so they can actually use them.

Gabriel Metcalf, executive director of SPUR (an urban planning think tank), called income inequality "the greatest threat to American democracy," and pointed out that it's happening all over the country in successful cities filled with well-educated people.

"The entire premise of America is that people who work hard should be able to get ahead, and if that idea fades into memory the whole project of democracy is threatened," he said.

San Francisco's income inequality is exacerbated, he said, because the city has done such a poor job of adding housing supply, meaning that as wealthy newcomers arrive, they naturally drive out lower-income people.

He said current efforts to raise the minimum wage, construct more housing and use city money to improve public transportation, public parks and public schools could go a long way.

"We should be using our wealth to make the public assets of the city incredibly robust," he said.

He said many of the forces contributing to income inequality are national and global and that one city can't find the solution on its own - but he thinks if any city is willing to try, it's San Francisco.

"I think most people in San Francisco believe in the idea of equal opportunity, believe in the idea of a public realm that's more European and less American if you will," he said.

And if the current trajectory continues unabated?

"If we keep going down this path, San Francisco might still be beautiful, and it might still be walkable and might still be loved all over the world," he said. "But it will no longer be the cradle of progressivism in America. It will no longer be a place that is dynamic culturally."

He said it could turn into a larger version of Carmel, filled with rich people and vacation homes.

Carmel with a hint of Rwanda? Now that's just plain weird.