Americans take into consideration a number of factors when deciding where to live, including the quality of schools, the strength of the local economy and job market, the area’s safety and culture, as well as its climate. Cities that perform well by these measures are more likely to attract new residents, and those that do not tend to drive residents away.

Comparing entire cities to each other can be problematic, particularly since living conditions can vary from one neighborhood to the next. Still, as much as a city can be judged on the whole, some cities face widespread problems that detract from residents’ overall quality of life.

9. Florida
> Worst city to live: Miami Beach
> Population: 92,311
> Median home value: $460,000
> Poverty rate: 15.1%
> Adults with at least a bachelor’s degree: 48.1%

While Miami Beach has some of the most expensive homes in country, a large share of city residents earn poverty wages. Miami Beach has a long history of segregation, which has contributed to income inequality throughout the city. While 9.9% of households in Miami Beach earn less than $10,000 annually, 13.7% of households earn at least $200,000 — each larger than the corresponding national shares.

The typical household in Miami Beach earns $50,937 annually, slightly less than the $55,775 national figure. Adjusted for the city’s high cost of living, however, area incomes are far lower. The typical home in Miami Beach costs $460,000, nine times the city’s median household income. In addition to being one of the least affordable cities in Florida and the U.S., Miami Beach is one of the most dangerous. There were 1,077 violent crimes per 100,000 residents in 2015, among the most of any city and more than double the statewide violent crime rate. There were also 9,717 property crimes per 100,000 Miami Beach residents, the highest property crime rate among large cities nationwide.

American cities are often held to the standards of national averages, or against all of the other cities in a country. However, for the residents that actually live in these places, a more appropriate point of comparison are those cities that can be found nearby, in the same state.

To determine America’s worst cities to live in each state, 24/7 Wall St. reviewed data on the largest U.S. cities. Based on a range of variables, including crime rates, employment growth, access to restaurants and attractions, educational attainment, and housing affordability, 24/7 Wall St. identified the worst city to live in each state.

Click here to see the worst city to live in every state.
Click here to see our detailed findings and methodology.