When it comes to putting down roots, a new study found that three Sacramento cities are among the best in California–and one Sacramento city is not only among the best, but has been named the best.

Folsom made the #1 spot in a study by Wallet Hub that examined 240 California cities across 22 key metrics that targeted family living, education, health, safety, affordability, and socioeconomic environment. Also impressively making the top ten list is El Dorado Hills (#6) and Roseville (#10).

Other Sacramento communities are not to be left out either as the top 50 included Davis (#18), Rocklin (#27), Elk Grove (#31), and Lincoln (#44).

The factors that the study considered important in determining the places most conducive to family life included the number of attractions, playgrounds, pediatricians, other families, and quality schools per capita. The rates and percentages it looked at included crime rates, unemployment and foreclose rates, high school graduation rates, percentage of two-parent/divorced families, percentage of children lacking health coverage, and percentage of families living below the poverty line. Weather, air quality, and average commute also factored into their results, as did house and living affordability.

Their findings ranked these California cities the best for families:

  1. Folsom
  2. Eastvale
  3. San Ramon
  4. Dublin
  5. Pleasanton
  6. El Dorado Hills
  7. Danville
  8. Aliso Viejo
  9. Palo Alto / Mental Park
  10. Roseville

Interestingly, only two Southern California cities (Eastvale and Aliso Viejo) made the top ten list. The rest went to Northern California cities found in Sacramento, the Bay Area, and Alameda/Contra Costa counties.

Folsom earned the top spot due in part to its #1 ranking in California for a low poverty level and high median income (adjusted for cost of living), and #2 ranking for most affordable housing. Roseville was found to have the most playgrounds per capita in California and Sacramento was named the #6 city for the highest number of attractions.

California’s largest cities didn’t get anywhere near the top spots with the highest rating going to San Jose at #78, followed by San Diego at #96 , Sacramento #130, San Francisco #178, Los Angeles #215.

Of the worst cities, all but one (Oakland) are found in Southern California, most of them near LA.