What makes the best county in each state? Often it's a good mix of opportunities for fun outdoor activities and cultural attractions. Throw in some historical sites, good schools, job opportunities, and affordable housing, and the county will most likely have happy residents.

Stacker compiled a list of the best places to live using 2020 data from Niche. Niche ranks counties based on various factors, including public schools, jobs, and living costs. You can read more about Niche and the way they determine the best counties in each state by looking at their methodology.

The places on this list include an Alaskan borough whose bay remains open year-round, which keeps its economy humming. Huntsville, Alabama was nicknamed Rocket City for the work people in town did to get spaceships to the moon. Others, such as Fairfield County, Connecticut, have drawn on financial services to fund their tax base. One of the wealthiest of the counties is in California, its fate tied up with Silicon Valley.