BARCELONA, Spain -- Ernesto Valverde had a question for Javier Fernandez. Were Barcelona transitioning too quickly? Would they be able to create more space by slowing down and letting the opposition retreat first? Fernandez got to work. Eventually, he came up with an answer. It was relayed back via multiple visualisations. Valverde liked what he saw and put the information into practice. The coach passed the message on to his players, more or less, by drawing two lines on a tactics board. It had taken Fernandez weeks of analysis to come up with his response.
So, what was the solution?
"There was a range of time which was ideal to spend in each zone to allow defensive line backtracking -- too little or too much was counterproductive," Fernandez tells ESPN FC. "This also depends on many contextual factors, but the bottom line idea was to transition more smartly from one zone to another, spending the right amount of time and reading the spaces."
Fernandez is Barca's head of sports analytics and one of a growing number of data scientists involved in football. His background is in computer science. He's worked building systems, infrastructure and mobile apps. He has a master's degree in artificial intelligence. Now, as the head of a team of six, he works for one of the world's biggest football teams, in his words, "trying to get closer to understanding the game better."
On a weekly basis, he meets with the coaching staff at the Spanish club. Not just Valverde and his staff, but also coaches from the B team, the U19s and the women's team. He's there to help anyone.
"It's been a long process," Fernandez says of the ongoing information exchange with the coaching staff. "But now, after two years, our coaches have started to develop the algorithms verbally. For example [they say]: 'For me, high pressure is this number of players in this zone and this movement with velocity.'
"Basically, they're understanding what they can do with data. It's better for us because we know what [adds] value for them and they practically provide the algorithm in words so we can go and start mapping the first base of knowledge regarding what you can do in data and then grow from there."
Getting to the bottom of what Fernandez actually does with data -- even after speaking to him for 40 minutes -- is not simple. It's advanced work carried out by intelligent people. William Spearman, who performs a similar role for Liverpool, has a PhD from Harvard in high energy particle physics. Ravi Ramineni, Seattle Sounders' director of analytics, worked for Microsoft as a program manager for seven years before moving into football.
It's safe to say, though, that what they're dealing with is more state of the art than the statistics most supporters are familiar with: possession, shots, crosses, winning streaks.
In contrast to other sports, there's been a reluctance from parts of football to embrace this more nuanced data. An article in the Guardian last week, referring to new scouting methods, mocked that "you can place your faith in data analysis, but don't be surprised if you end up with a load of donkeys."
Even xG (expected goals), a relatively simple metric, was criticised when it first emerged. Last season, though, it was introduced by the BBC's flagship football show Match of the Day as part of their post-match statistics. So while some may turn their noses up at the wider uptake of data analysis, the fact clubs like Barca are embracing it suggests it's here to stay.
Fernandez has certainly not noticed any resistance at Camp Nou. His work has been warmly received by coaches at the club. One of the keys, he says, is in the presentation.
"If we can't fit the information we want to transmit on one page, we don't fully understand the concept yet," he explains. "We don't want four pages. For us, using video is also fundamental. We start from the video to get the data. You get the first feedback from the video. Then we do a process of data and try to get the answers. Finally, we go back to the video because it's an amazing communication tool.
"Through the video analysts, [the coaches] say 'We're very interested in this kind of marking' or 'We're interested in knowing the dynamics of this match, can you validate this,' or 'We're interested in knowing if we're spending too much time in certain zones because it has no impact.' We can validate those things.
"It's rarely to do with huge changes or individual players. That's not what we're trying to do. It's more general patterns of how we are playing, how the team is behaving. Are we following what we want to do? How do we face this opponent? Is the opponent pressing differently than we thought?"
It feels significant that Barca are striving to make advances in this area. This is a club that has won five European Cups but perhaps more significantly have one of the most defined styles in the game, popularised by Johan Cruyff and Pep Guardiola, Xavi Hernandez and Andres Iniesta. The use of analytics could suggest they're looking to get the best from the talent they have, which may not necessarily mean sticking to their roots.
However, Fernandez is not so sure this is a case of Barca looking outside their own four walls for inspiration. His discourse includes phrases you'd typically hear from Valverde -- "Barca DNA," "the opposition also play" -- and some of the work he does focuses on validating the good things the team do (or finding ways to improve what they do). A large focal point, for example, is space creation. Through a 2017 study, he found that Lionel Messi creates more space by standing still or jogging than any other player on the Barca team does by running.
"Is it better to run more or to run better?" is a question he poses, perhaps rhetorically.
In that sense, Fernandez argues that finding ways to quantify off-the-ball actions will prove important in terms of improving performances moving forward.
"There's this phrase from Cruyff that I like very much," he says. "It seems simple, but it hides some important things: It's been proven that players have the ball three minutes on average. So it matters more what you do with the remaining minutes when you don't have the ball. So, off-the-ball actions and off-the-ball performance is an area that has a huge opportunity to exploit.
"We really need to understand about spaces and off-the-ball movement. It's tricky to analyse, but it's possible. We've done some studies on space creation and it's interesting that with more or less basic knowledge you can start grasping stats about how players are behaving. You can start seeing how the team is moving to reach certain things that are interesting for a team, like moving the opponent to one side or the other.
"But one of the most important things [about data analysis] is that it's always related with context. If we're doing a buildup and we're having high pressure, it's not the same as a buildup with no pressure. So that changes that phase of the game and the things you want to analyse.
"It's about movement of players, it's about positioning, it's about controlling space, it's about the lines of formation of the different teams. It's how we move the ball around to create spaces and then if we are recognising those spaces and playing there. It's really trying to grasp those things that are really connected to a possession-like playing style which is very close to Barca's DNA."
Barca are almost unique in that they're not a closed shop. They believe that the knowledge base they're building should be shared to help the sport improve collectively. That's why they have created the Barca Innovation Hub, which held a conference last week with speakers from some of Europe's biggest clubs sharing information, tools and experiences.
So, what next? Can we expect Barcelona to run away with more La Liga titles and win a string of Champions Leagues because of their investment in data?
"I don't think that we should look at this as we want to be better than anyone and win the most points possible," Fernandez says. "What we want to do now is share with different clubs -- with every club in Spain, if possible -- and say that we have developed some basic algorithms. We would like to share this, discuss football, because we think right now our competitive advantage is our coaching staff, our players, our institution in general ... not really that extra percent you can add with data.
"If we try to grow behind closed doors, we won't grow as we want. That's why we want to lead that path of introducing data into football by communicating with clubs because those other clubs really understand football. They may have different models but they like football, they work in football and they want to understand more about football.
"So when we can develop these things and grow together, imagine the whole league growing together and making the sport more competitive. It's going to be better for our own team, for the league, for the Champions League, for everyone probably. Then it will impact the World Cup somehow and the sport really grows."