Americans spend an average of 7.7 hours a day working, according to a new U.S. Department of Labor survey. But how much they enjoy said work varies widely depending on where they live, a study by the jobs and careers site Glassdoor.com found. The site factored in how happy workers are with their salary, their bosses, and the local job outlook. At the top of the list was San Jose. Sometimes called the Capital of Silicon Valley, San Jose is a hub for researchers, techies and artists. Top employers in the area include Stanford University and tech giant Google. Not surprisingly, software engineer is one of the most in-demand jobs, according to Glassdoor.com. New York City, by comparison, ranked 32nd nationally. Here’s a look at some other cities with happy workers.

See also: Silicon Valley vs. Wall Street in talent war.

— By Jonnelle Marte

Shutterstock

San Francisco

Likewise known for its startup culture, San Francisco was next on the list. With a still-booming tech sector, the city ranked high for its job outlook, with more than 6,400 employers hiring, according to the site — nearly three times as many as are hiring in Hartford, Conn., and Louisville, Ky., for instance. “All technology hubs are doing well economically,” says Allyson Willoughby, head of human resources for Glassdoor. That helps explain why workers in San Francisco are optimistic, with 50% of employees saying they expect business to get better over the next six months — the second highest proportion or employees saying so among the 50 cities ranked by the site.

See also: The 10 happiest countries in the world.

Shutterstock

Seattle

Unlike some other happy locales on the list, Seattle isn’t exactly known for its sunny weather, but workers seem willing to put up with the rainfall in exchange for proximity to the strong tech — and coffee — industries. Amazon is headquartered here, and Microsoft is in nearby Redmond. And given that Seattle is America’s latte capital (and home to Starbucks), it’s perhaps little wonder that barista made the list of most in-demand positions. Other popular positions include software engineer and sales associate.

Salt Lake City

The University of Utah is ranked as one of the top universities to work for in the U.S. by the employees who post on Glassdoor.com. Health care and science are big industries for the area: Intermountain Healthcare, a health-care network headquartered in Salt Lake City, is one top employer. Employees gave companies in the city top marks for providing opportunities for advancement and help maintaining a good work-life balance, according to the site.

Shutterstock

Washington, D.C.

While primarily known for politics and government, the nation’s capital is also a draw for nurses, program managers and software engineers, the survey finds. Of course, many people living inside the beltway work for the government, with the U.S. Army being one of the highest rated employers by the districts’ residents. Government agencies have also been snapping up Silicon Valley-type workers, including data analysts and programmers, who can help them with national security programs. Investor networking site Motley Fool and Georgetown University also got high ratings on the site. Opportunities are expected to grow, with nearly 7,500 employers hiring, according to the report.