About five years ago, a series of tragedies had left the residents of Santa Monica, California, on edge. In the months that followed, city officials sought ways to bolster the community.
They began by asking the city's youth lots of questions.
From preschoolers to teenagers, researchers asked how satisfied they were with their lives: Did they feel happy? Sad? Stressed? In addition to the questions, researchers analyzed social media data, like Foursquare check-ins, to measure things like park usage and other activities.
Some of the findings were startling: Half of the eleventh graders surveyed reported using drugs or alcohol over the previous month, a rate about 10% above the average for Los Angeles County. Nearly one-quarter (26%) of middle and high school students reported significant periods of extreme sadness, and 17% of high school students reported having suicidal thoughts.
As a result of the survey, the city launched a "youth resource team" to help its most vulnerable youth connect to services like job placement and health clinics.
"There are many services available, but people couldn't access them," said Julie Rusk, Santa Monica's assistant director of community and cultural services.
Related: How immigrants can revive America's blighted neighborhoods
Those early efforts helped Santa Monica win a $1 million prize from the Bloomberg Philanthropies' Mayors Challenge -- a competition among cities that submit solutions to their biggest problems -- in 2012. "We saw that as an opportunity to take the work we were doing around youth well-being and scale it to measure well-being across the entire community," Rusk said.
The city teamed up with nonprofit research firm RAND Corp. and U.K.-based New Economics Foundation (NEF) and launched the Wellbeing Project to measure the quality of life for all of its residents, accounting for factors such as health, economic opportunity, education and stress.
In its first round of data gathering, the city found that while its young people were struggling to get by, its seniors were thriving. And while many residents felt good about where they lived and where they were heading in life, many didn't. Income inequality was also an issue, with median household income below $50,000 in one zip code and almost triple that amount in another.
And the cost of living was also high. More than 25% of the city's residents in their 20s were concerned about being able to pay the rent or the mortgage. And, in some neighborhoods, the unemployment rate was well above the national rate, while in others it was well below.
Santa Monica has since implemented solutions for some of the issues the survey unearthed.
In parts of Santa Monica, for example, researchers found that fruit and vegetable consumption was lower than what is considered necessary for good physical health.
By cross-referencing that information with food stamp usage, they discovered that fresh produce was being consumed less in neighborhoods where there was a high concentration of residents using food stamps. The project also noted that there was an underused farmer's market nearby.
"The farmer's market is a great gathering place, but it's expensive," Rusk said. "Yet, we have a program there where you can take food stamps and double their value."
Related: How Latinos are saving this former Pennsylvania mining town
Few people in the area knew that, though. So the county's department of public and social services now staffs a booth at a popular neighborhood park once a week to sign people up for food stamps and raise awareness that the stamps can be used at the farmer's market.
The city also discovered that there were a troubling number of children who were physically, socially, or emotionally ready for kindergarten.
"We were surprised to find that only one-third of our five-year-olds were ready for kindergarten," Rusk said.
Last year, the city launched Building Blocks to Success, a program aimed at helping local children prepare for kindergarten.
The Santa Monica Public Library now incorporates kindergarten readiness materials in its weekly library story time programs, child care and early education providers have pledged to address kindergarten readiness with families and the city has also reached out to local doctors and community clinics.
Related: The worker shortage facing America's farmers
"We have started to see some moving of the needle where kids are more ready, so that's been really exciting," Rusk said.
In partnership with RAND and Santa Monica Community College, the city is also building an early childhood education facility for residents and area workers. The site will also serve as a lab school for college students studying to become early childhood teachers.
"The new facility will serve 110 children and hundreds of college students learning to be preschool teachers," Rusk said.
Rusk hopes that the Wellbeing project will eventually help city agencies refine their practices in "almost real time."
She says she's been contacted by organizations from other cities like Philadelphia and Toronto and is working to produce a playbook to help other communities.