PENNSYLVANIA (CBS) — Pennsylvania’s healthiest and least healthy counties are in our area, according to new rankings.

Chester County is the healthiest county in the state, according to the ninth annual county health rankings compiled by the Robert Wood Johnson Foundation and the University of Wisconsin Popluation Health Institute.

READ MORE: New Research Warns Of Alarming Firework-Related Trend In US Ahead Of Fourth Of July

The analysis looks at how long and how well residents live, says Francine Axler of the nonprofit Public Health Management Corporation.

“We know that where one lives can affect length of life and quality of life,” she tells KYW Newsradio.

The ranking lists factors including poverty, crime, access to health care and healthy food. Philadelphia is last among the state’s 67 counties.

ALSO: Doctors Find 3.5-Inch Air Pocket That Looks Like ‘Inverted Coke Bottle’ In Man’s Brain

READ MORE: Gov. Murphy Signs Legislation To Protect People Traveling To New Jersey For Abortions

“Unfortunately Philadelphia ranks lowest, for many years,” she said.

Montgomery County is fourth healthiest, Bucks is seventh and Delaware County is 49th.

Axler says the rankings are used to help identify gaps in service and address barriers to health care.

In New Jersey, the least-healthy counties are in South Jersey. Cumberland County is last among the Garden State’s 21 counties. Salem is 20th. Camden

County is 19th Gloucester ranks 15th and Burlington is the ninth-healthiest.

MORE NEWS: Fourth Of July Travel: Incoming Flights At Philadelphia International Airport Being Held At Originating Airports Until 6 P.M.

The full rankings are available at www.countyhealthrankings.org