CHARLOTTESVILLE, Va. (CBS19 NEWS) -- Charlottesville has been ranked one of the best cities in the country in which to live.

Livability recently released its list of the top 100 cities in the United States for 2022.

The publication says more than 2,300 cities were considered based on data concerning economic stability, housing, amenities, infrastructure, demographics, social and civic capital, and health care.

It then asks for what reasons would a person want to live in a given city, such as how accommodating is the community for remote employment.

Livability says affordability is a core value, so it looks specifically for places that are seeing growing wages and home values while also keeping an affordable cost of living.

This year’s list focuses on mid-sized cities, which are generally defined as having a population of 500,000 or lower, that are attracting more young people.

Madison, Wisconsin; Ann Arbor, Michigan; and Rochester Minnesota came in as the top three.

Charlottesville is ranked 22nd, with the publication highlighting the area's variety of craft beverage producers, diverse arts scene, and community engagement opportunities.

Livability also has a list of the top 10 cities people should visit if they are literature lovers, and Charlottesville made that list due to its association with Edgar Allan Poe.

Poe attended the University of Virginia for a time, living in a dorm room on the Lawn.