Happiness may come from within, but external factors can still play a role in how happy you feel.

Even if you’re a glass-half-full kind of person, factors like financial security, access to healthcare, and community can also impact your well-being.

A recent WalletHub study ranked all 50 states based on metrics that measure residents’ happiness.

All states were compared across three categories: emotional and physical well-being, work environment, and community and environment. These dimensions were broken down into 30 metrics, graded on a 100-point scale to create a happiness score.

The most heavily weighted category was emotional and physical…