How much does where you live affect your happiness? According to a new paper, your city may be making you terribly unhappy, or, as the residents of Richmond-Petersburg, Virginia, have experienced, it could be making your life an absolute delight.

The paper, Unhappy Cities, authored by economists Edward L. Glaeser and Oren Ziv of Harvard, and Joshua D. Gottlieb of the University of British Columbia, found that residents of eastern Virginia appear to be some of the happiest people in the country, with Richmond-Petersburg, Norfolk-Virginia Beach-Newport News, and Washington, D.C., ranking as the top three happiest large cities (metropolitan areas of at least 1 million residents). Charlottesville, Virginia, ranks as the overall happiest metropolitan area. The authors determined the rankings by analyzing data compiled by the Centers for Disease Control and Prevention, and U.S. census data.

Generally, residents of the Gulf Coast states and Mountain West states are much happier, according to the survey data, than their counterparts in the Northeast and the Rust Belt.

So what makes a city happy? According to the authors, “Happiness is generated through experiences, which can be improved by spending money.” This turns out to be a function of population and income growth—as a city’s economic prospects grow, people will move to it, and in turn, its residents’ happiness grows with the city. However, the effect wears off as the growth rate increases. For example, if wages grow quickly, real estate prices also will rise, which tends to decrease happiness.

The authors note, however, that the relationship between money and happiness is tenuous, saying: “. . . The connection between money and happiness may significantly understate the connection between money and utility, because a higher opportunity cost of time causes individuals to engage in less happiness-generating leisure.”

This may be the reason everyone does not move to generally happy cities, like Richmond, Raleigh-Durham, and Nashville. They are relatively well-educated, relatively wealthy cities, but certainly not in the top tier in terms of earnings potential. The authors, ever the economists, suggest that it is a matter of trade-offs.

If we choose only that which maximized our happiness, then individuals would presumably move to happier places until the point where rising rents and congestion eliminated the joys of that locale. An alternative view is that humans are quite understandably willing to sacrifice both happiness and life satisfaction if the price is right.

According to the authors, that price takes the form of higher real wages (New York City) or lower property prices (Detroit). Happiness, which may come at the expense of lower wages and higher rents, appears to be only one factor of many that people take into account when determining their home city.