For residents of Philadelphia, it's the fifth year in a row that the county has been rated the least healthy in Pennsylvania.

The rankings come from the Robert Wood Johnson Foundation, which provides two overall rankings—one for health outcomes and another for health factors—to let counties know how where they stack up within their respective state.

The health outcomes score incorporates information about low birth weight and the number of sick days people take, but half the score is devoted to how long residents live. On this measure, Philadelphia also ranked last, losing nearly 10,500 years of potential life for each of its 100,000 residents. There is good news: the trend is improving.

In an email, Philadelphia Department of Health spokesman Jeff Moran noted that the low score was not too surprising given that a big portion of the score is based on the underlying socioeconomic status of its residents. Philadelphia is the poorest of the 10 largest American cities. Moran said in recent years Philadelphia had made strides in combating obesity and lowering the smoking rate.

Two bright spots for Philadelphia were a relatively high number of available physicians and a number one ranking in terms of the physical environment. The city had no drinking water violations, lower than average air pollution, and the fewest number of residents driving solo to work.

Neighboring Chester County was ranked second in the state for overall health outcomes and first in health factors. Bucks and Montgomery counties also fared well.

In the Garden State, North Jersey fared better than the South, with Cumberland rated the least healthy. Like much of the rest of the country, health was strongly related to wealth. The three highest earning counties—with Hunterdon leading the pack—took the top three spots for both health outcomes and factors.

Jim Marks is the senior vice president at the Robert Wood Johnson Foundation.

"But it's not only about wealth."

Marks said there are other factors to consider.

"It is about eating well and being active and not smoking. There are many things that don't cost a lot that are important, and even the healthiest counties also have things they can improve on, and even the most challenged areas are doing better."

In Delaware, New Castle beat out Sussex for first place, leaving Kent as the least healthy by both measures. All counties had fewer smokers and fewer people in poor or fair health than the national average, but they also had a larger percentage of auto accidents as a result of drunk driving than the national average.

The rankings are meant to help residents understand what factors influence their health, and to encourage a positive community response.

Stephanie Carey is the President of the New Jersey Association of County and City Health Officials.

"We're using the rankings to support smart policy choices such as smoke-free parks, walkable streets, and safe routes for our kids to walk to school."