Those cramped subway rides might be a pain, but urban planning experts say living in dense New York City could pay off in the end.

A study released by the nonprofit research group Smart Growth America Wednesday found that NYC is the most compact and connected city in the U.S. because of the the huge population and the region's well constructed economic and transportation infrastructure.

Dr. Reid Ewing, a professor of city and metropolitan planning at University of Utah and the study's lead researcher, said dense cities offer benefits for residents including access to better jobs, cleaner air, healthier lives and safer roads, and the Big Apple leads the way.

"[New York] is unlike any other metropolitan area," he said.

The study looked at a variety of factors using data from the latest census, which showed that the city reached 8.3 million residents. Ewing and his team spent the last three years dissecting the data, looking at employment, zoning, street accessibility and census figures to come up with their index scores.

New York, which beat out second-place San Francisco, came in at No. 1 because of the city's low transportation costs and ease of travel to work, home and entertainment venues, which offsets the high costs of housing, Ewing said.

"You have alternatives to driving more so than the average metropolitan area. The cost of transportation out of the family budget is much less," he said.

Ana Drew, a lifelong Harlem resident, agreed, saying that the ease of travel is what keeps her in the city.

"If I have to get to the store, I can walk there, no problem," the 36-year-old merchandiser said. "I went to visit my sister in North Carolina and it's a mission just to get milk."

The study said less car use resulted in less pollution in the Big Apple and a lower average obesity rate compared to other, more sprawling cities.

Being active is contagious, said Rosemary Wakeman of Fordham University, and New Yorkers value fitness highly because their fellow city dwellers do an above-average amount of daily walking.

"[It's] easier to build that culture in a dense scale environment," she said.

Wakeman agreed with the study's analysis that dense cities help foster job growth and creation, especially since New York's diverse economic structure opens up more opportunities for people. "That richness is important. If there is a downturn in one industry someone can adapt to another one easily here," she said.