Marin is no longer the healthiest county in California.

After being ranked No. 1 for seven consecutive years, the county slipped to No. 2 behind San Mateo County in a new report released Tuesday.

The rankings, done by the Robert Wood Johnson Foundation and the University of Wisconsin Population Health Institute, compare counties on more than 30 factors that influence health including length of life, quality of life, health behaviors, access to health care, socioeconomic factors and physical environment. The years of data used to create the rankings varies widely by data category.

“Our scores did not change dramatically from last year,” said Dr. Matthew Willis, the county’s public health officer, in a statement. “San Mateo has made substantial progress and that’s good news. No one is backsliding here: San Mateo is raising the bar and it’s up to us to meet the challenge.”

Board of Supervisors President Judy Arnold said in a release, “We have a lot to be proud of, but major challenges remain in the areas of income inequality, affordable housing, binge drinking and prescription drug abuse.”

Despite the loss of its throne, Marin continues to rank near the top in most categories. It continues to lead the state in overall access to health care. According to the report there is one primary care physician for every 700 Marin residents and one mental health provider for every 150 Marin residents. Only San Francisco County posts higher numbers in this category.

And only 9 percent of Marin residents under the age of 65 lack health insurance, which is the second-lowest percentage in the state.

PREMATURE DEATH

Statewide, one of the major findings of the report was that more Americans are dying prematurely — before the age of 75. The report found that premature death increased most among individuals ages 15 to 44 with drug overdose and other injury deaths being major contributors to the rise.

Willis said the number of accidental drug overdoses spiked in Marin during the period evaluated in the report, which may have contributed to the county’s incremental drop in the rankings. From 2013 through 2015, there were 76 drug poisoning deaths in Marin.

“Compared to other counties, we lose points for having higher rates of adult binge drinking, drunk driving deaths, and drug overdose rates,” Willis said in a release. “This is another sign that these are issues we need to take seriously.”

A grassroots initiative, RxSafe Marin, was founded in 2014 to address prescription drug abuse, and has received support from the county’s Department of Health and Human Services and other county departments.

“We’ve made some progress since 2014, and we’re losing fewer people to overdoses, but we have a long way to go,” Willis said.

Marin, however, had the second-lowest rate of premature death in the state, once again bested only by San Mateo County. Marin’s drug overdose rate of 10 deaths per 100,000 residents was the third-lowest on the state.

INCOME DISPARITIES

Marin continues to rate near the top in socioeconomic factors. Seventy-five percent of Marin residents have at least some college education. Marin’s violent crime rate, included in this category, is the second-lowest in the state. Twenty-four percent of the county’s children live in single-parent households, compared with 32 percent statewide.

But Willis said health disparities due to income in Marin remain a challenge. A closer look at Marin’s low rate of children in poverty, 9 percent, reveals these disparities. The report breaks that number down to show that while only 4 percent of white children in Marin live in poverty, 24 percent of Hispanic children and 30 percent of African-American children live in poverty.

Marin County does not rate quite so highly in the category of health behaviors. It is particularly challenged when it comes to alcohol. According to the report, 18 percent of Marin adults reported binge or heavy drinking in 2015; San Francisco was the only county with a higher percentage. From 2011 to 2015, 34 percent of driving deaths in Marin involved alcohol, compared with 25 percent in San Mateo and 29 percent statewide.

The report found that 10 percent of Marin’s adult residents were smokers in 2015, compared with 9 percent in San Mateo and 12 percent statewide.

ACTIVE RESIDENTS

On the plus side, however, Marin had the lowest percentage of adults age 20 and over in the state reporting no leisure-time physical activity — just 12 percent. And Marin had the third-lowest adult obesity percentage in the state.

The category in which Marin fares the poorest is what the report describes as “physical environment.” Rather than focus on how picturesque a community is, this category includes such factors as “severe housing problems, driving alone to work and air pollution.”

Marin falls in the middle of the pack when it comes to the percentage of households with at least one of four housing problems: overcrowding, high housing costs, or lack of kitchen or plumbing facilities. According to the report, by this definition 24 percent of Marin households have severe housing problems, the same percentage as in San Mateo County; statewide the number is 28 percent and in Los Angeles it is 35 percent.

The report found that 65 percent of Marin’s workforce drives to work alone and that 41 percent of them spend at least 30 minutes in their car. Statewide, 73 percent of the workforce drives to work alone and 39 percent spend at least 30 minutes in their car.

And Marin County’s air is far from perfect. According to the report, 19 other counties in the state have less fine particulate matter in the air than Marin does.