The 20 best places to live in America if you want to be happy at work

When it comes to being happy at work, employees in Los Angeles comes out on top.Shutterstock

A lot of factors contribute to happiness at work: flexible hours, a competitive salary, and a meaningful purpose. But where you live can also play a role in how likely you are to be satisfied at work.

Job-search website Indeed just released their job-happiness index for 2016, which included a ranking of the happiest metro areas in the US. The report ranked the 50 most populous cities in the country by average job-satisfaction rating on a scale of one to five, culled from Indeed's database of more than 10 million employee reviews.

California came on out top, with six of the top 20 cities. Los Angeles boasts the happiest employees in the country, followed by Miami and San Diego.

Read on to see the rest of the top 20 cities, with population and income data from the US Census Bureau.