Want to live longer? Then move out of San Francisco, and across the bridge to Marin.

That's what the Robert Wood Johnson Foundation and the University of Wisconsin Population Health Institute would have you believe, at least. According to countyhealthrankings.org, a website created by the two groups, Marin County ranks first in California for life expectancy.

Placer County was ranked second, Santa Clara third, and San Mateo County ranked fourth. San Francisco's longevity ranking was waaaay down in the list, at number 22.

If you really want to get depressed, start rolling over this map, which shows an estimate of the years of potential life lost before age 75 per county. According to County Health Rankings, their findings are based death and birth statistics "provided by NCHS and drawn from the National Vital Statistics System (NVSS). These data are submitted to the NVSS by the vital registration systems operated in the jurisdictions legally responsible for registering vital events (i.e., births, deaths, marriages, divorces, and fetal deaths)."

Before you start heading across the Golden Gate, be warned that everything's not roses and unicorns in Marin, either. According to this study, nearly one in every four adult Marinites that researchers surveyed said they had been binge drinking in the last 30 days, one of the highest rates in the state.

In addition, an average of 32 Marin County residents died annually from drug overdoses (most of them from prescription drugs) the report notes.

There's a wealth of data in this study—seriously, you could click around on it all day. You can see an all the health and mortality rankings for California counties here, a snapshot of San Francisco mortality factors here, and there's a fun county comparison tool here.