Berkeley isn’t very diverse politically. It scores badly on income equality. Yet it has the most “worker diversity” in America.

That surprising ranking, from Wallet Hub, reflects the city’s unusual mix of government workers, private-sector workers and the self-employed. And while not a common measure of diversity, it’s one that could help keep the economy humming in this California city of about 117,000 on the San Francisco Bay.

“What cities need is a balance between public sector, private sector and not-for-profit jobs,” said Robert Reich, who served as secretary of labor under Bill Clinton and is now a professor at the University of California at Berkeley. “If the balance gets too out of whack in one direction or another, it can cause the local economy to become distorted or become precarious in terms of a large employer suddenly leaving or a major not-for-profit deciding to uproot.”

In most cities, 70% to 80% of the working population is in the private sector. The percentage in Berkeley, while still a majority, is far smaller. Instead, it has a higher-than-average share of residents working for the government, which includes the university and the Lawrence Berkeley National Laboratory, which employs 4,000 people. It is second only to Santa Monica, Calif. nationally in the share of those who work for themselves.

Here’s a breakdown:

Type of job Percentage of employed residents in each sector Private wage and salary workers 62.8% Government workers 24.9% Self-employed 12.2% Unpaid family workers Less than 1%

“One of the things we’ve been promoting in Berkeley is our role as an innovation hub in terms of startups and spinouts from the university,” said Michael Caplan, the city’s economic development manager.

Startups ranging from food to 3-D printing have sprung up in Berkeley. There’s SpoonRocket, a fast food delivery service that focuses on fresh, health ingredients. And there’s Twindom, which 3D-prints miniature models of yourself for $39.

“It’s kind of the perfect mix of highly employable population because of the lab, research, and the community culture,” Caplan said.

But despite having such diversity among the types of employers, Berkeley ranks No. 10 when it comes to income inequality, based on a Bloomberg ranking of more than 300 cities.

Its median household income is $65,887, according to U.S. census data, well above the national average. And the median sales price for a home in Berkeley between December 2014 and March 2015 was $760,000, according to Trulia data.

But Reich is optimistic.

“Rather than think of this as a problem, it would be more accurate to think of it as a badge of honor,” Reich said. “It’s neither becoming all rich or all poor as most cities are moving.”

It’s a city full of businesses like Chez Panisse, a restaurant owned by Alice Waters, the woman credited with kicking off the fresh local food movement in the U.S. The one-time Michelin-rated restaurant will cost diners $100 for a weekend meal.

Many of its stores reflect the liberal leanings of the city, a hotbed of political activism and hippies during the 1960s and where more than 90% of votes cast in 2012 were for Barack Obama.

Large organic grocery store Berkeley Bowl is a paradigm of Berkeley business. What started as a tiny market in an old bowling alley has since grown to become one of the city’s 10 largest employers.

The Cheese Board Collective, a cooperatively run cheese shop, bakery and pizzeria, pays its workers make $21 per hour, according to an online job posting.That’s well above the city’s minimum wage of $10, above both the minimum wage in California ($9) and the U.S. ($7.25).

Berkeley’s small business and retail sector “adds to the flavor and texture of the town,” Reich said. “It adds to the stability of the town.”

Left-wing or not, the city is actively trying to promote more mom-and-pop businesses.

Co-working space WeWork opened in February in Downtown Berkeley, and NextSpace opened in 2013.

“We want to promote companies to form here and grow here,” Caplan said. “There’s a lot of cheerleading for the entrepreneurial side.”