California is the nation’s sixth happiest state, according to one ranking.

The data crunchers at WalletHub looked at various demographic, economic and health factors — including some pandemic trends — to create their list. California — No. 4 on this scorecard a year ago — trailed Hawaii at No. 1 then Utah, Minnesota, New Jersey and Maryland. Most unhappy, by this math? West Virginia, Arkansas and Oklahoma.

WalletHub’s study created three subcategories tracking what the financial information website researchers saw as critical happiest factors:

Emotional/physical well-being: California got a No. 7 ranking. Tops: New Jersey, Hawaii and Maryland. Worst? West Virginia, Arkansas and Oklahoma.

Work environment: California got a No. 18 ranking. Tops: Utah, Idaho and North Dakota. Worst? Louisiana, West Virginia and Mississippi.

Community/environment: California got a No. 13 ranking. Tops: Utah, Idaho and Hawaii. Worst? Texas, Florida, and Alaska.

Sign up for The Home Stretch email newsletter filled with housing news from around the region! Subscribe here.

By the way, top-ranked in 2019 was the same three happy places: Hawaii, then Utah and Minnesota. Worst a year ago? West Virginia, Arkansas and (same) Alaska. Most improved? South Dakota (12th in 2020 from No. 27). Biggest drop? Delaware (24th from No. 16).

Rankings are certainly part science and part art — and each scorecard creator is different. Still, if nothing else, these gradings can be fodder for broader discussions.

So, since it’s a presidential election year, my trusty spreadsheet looked at the 2020 rankings based on which states supported President Donald Trump in 2016 and which did not. Trump’s “red” states averaged a below-average 31st happiness ranking. Blue states averaged a No. 18 ranking and got better average scores in the three subcategories.

Remember that “unhappiness” can be a big political motivator.