Turns out there might be some benefits to escaping the big city.

A study by the University of British Columbia and McGill University has found that people who live in rural areas are happier than their city counterparts.

Using census reference maps, it looked at the 1,215 communities that make up Canada, revealing how happiness levels can swing even between tightly clustered communities in the Greater Toronto Area

"I wouldn't say we were too surprised by these results," Ryan O'Connor, an urban planner and director of programs with the organization 8 80 Cities, said on CBC's All Points West.

"Our built environment has huge impacts on our overall health and happiness in our communities."

Lower density, higher happiness score

Researchers studied data from two national Canadian surveys that ask respondents how satisfied they are with their life, on a scale of one to 10.

They drew from 400,000 responses dating back to 2010.

It turns out that Canadians are pretty happy. The average responses across the country ranged from 7.04 to 8.96.

The study looked at why those responses varied. It matched the life-satisfaction data with census variables, such as income and education.

One variable that stood out was population density.

The 20-per-cent least happiest communities had eight times the density of the happiest areas.

Construction workers stand on rebar for concrete pillars at a condo tower under construction in Vancouver, B.C., on Tuesday, August 15, 2017. (Darryl Dyck/Canadian Press)

"Life is significantly less happy in urban areas," the researchers concluded.

That might seem counterintuitive, given the greater likelihood of connecting with people in cities.

But O'Connor cited social isolation as a key issue among urban dwellers.

Impact of housing, commuting

Still, urban dwellers typically enjoy higher incomes, lower unemployment rates and higher education. Shouldn't they be happier?

Housing plays a role. Happiest communities had smaller shares of their population that spent more than 30 per cent of their incomes on housing.

"People may need to work long hours to afford the lifestyle of being in a bigger city," O'Connor said.

Drivers should expected long delays on the Lions Gate Bridge overnight Saturday as crews begin maintenance repairs Saturday, Nov. 16. (Darryl Dyck/Canadian Press)

That means more time commuting. Rural areas averaged 15 minutes in commuting time, versus 22 minutes in cities, which means more leisure time.

Rural communities exhibited a greater sense of community and a smaller foreign-born population share.

Urban dwellers are more likely to have moved recently and less likely to have ties to their communities.

Immigrants, for instance, might face difficulties integrating in cities and, in turn, report a lower happiness score.

With files from CBC's All Points West