You’re settling into your window seat, bound for a summer vacation, when the flight attendant wishes you a happy birthday or commiserates about the lousy weather that delayed the last leg of your trip.

It might feel like the flight crew has been scouring your recent social media posts, but at some airlines, that wouldn’t be necessary.

Carriers like United Airlines, Delta Air Lines and Southwest Airlines are giving gate agents and flight attendants access to more customer data in hopes of giving passengers more personalized service.

Still, there’s only so much a birthday greeting can do to make up for a lost bag or late arrival, particularly when airlines want to steer clear of conversations that feel too personal. While in-cabin recognition might be the most visible way airlines are working to do more with the troves of data they collect, behind-the-scenes efforts to mine stats on everything from collisions between airport vehicles to turbulence touch almost every piece of a passenger’s trip.

Most of the data they’re working with is the sort of information airlines have long collected. And there’s no shortage: a Boeing 787 generates half a terabyte of information per flight, said JJ DeGiovanni, a managing director with United’s corporate safety team. The challenge is figuring out how to use it in ways that are meaningful for the airline and its passengers.

When it comes to personalized service, just how meaningful today’s programs are depends on whom you ask.

Jay Sorensen, president of airline consulting firm IdeaWorks, said he’s skeptical that employees would have the right kind of information — or the time — to add real value for flyers, outside of a handful of cases, like helping passengers at risk of missing a connecting flight get off the plane first. Even if an airline could anticipate your drink order, placing it isn’t a strenuous task, he said, and flight attendants have other tasks to juggle.

“In coach, it’s just not going to happen,” Sorensen said.

But passengers do seem to appreciate the personal touch, said Allison Ausband, Delta’s senior vice president of in-flight service. Delta aims to have those personal interactions with about 20 travelers per flight, either in conversations or through postcards flight attendants can hand-deliver. Priority goes to those who had some type of disruption on a recent flight, such as a lengthy delay.

“They want us to know them and know what’s happening to them when they’re doing business with us,” Ausband said.

For now, most of the passenger information flight attendants can access to personalize in-flight service is the sort of thing airlines already track, like frequent flyer status, or details included in every booking, like a passenger’s date of birth and connecting flight.

But both Delta and United said they’re experimenting with adding additional information, such as food and beverage preferences.

“The trick to all of this is how to provide good, relevant information that’s easy to use and doesn’t get in the way of their primary job of safety and service,” said Linda Jojo, United’s chief digital officer.

Southwest Airlines is testing a similar program that would help customer service agents spot “key customers” at the gate, where they can try to resolve a problem or just wish the passenger a happy birthday, spokesman Dan Landson said.

Giving flight attendants and gate agents access to that information wasn’t practical until they began carrying mobile devices that do double duty, accepting payments for in-flight purchases and tracking which passengers are entitled to perks like a drink or meal, said Robert Mann, a New York-based airline industry consultant.

At United, those devices also can issue immediate compensation for in-flight issues like a broken entertainment system. Options can include free food or drink, frequent flyer miles or another form of credit, Jojo said.

Airlines also say they’re trying to strike a balance between a welcome personal touch and getting a little too personal. What one traveler considers great service, another might find invasive.

“No one wants to feel like they have Big Brother watching us,” said Scot Hornick, partner at consulting firm Oliver Wyman.

That’s less of a concern with data-driven programs that aren’t as visible but still have an impact passengers can feel — literally, in the case of one tool Delta developed for its pilots.

The app provides information about weather hazards like turbulence, lightning or hail that’s more accurate and easier to interpret than pilots used to be able to get after takeoff, said Tom Staigle, Delta’s chief technical pilot.

Even if a plane’s crew doesn’t adjust its route to avoid turbulence, knowing when to expect it helps prevent injuries and limits the amount of time passengers must be seated with belts fastened, Staigle said.

Other carriers say they’re mining data on aircraft damage and worker

injuries.

Efforts to analyze causes of preventable aircraft damage, like collisions with vehicles at the airport, might not sound like something a passenger should care about. But that kind of damage often results in a cancellation unless the airline can quickly swap in another airplane, which still typically involves a delay, Mann said.

“It’s very expensive and disruptive and entirely preventable,” he said.

United began working on a data visualization initiative in 2015 with interns from the University of New Haven’s criminal justice program. The students had been working on projects like mapping spheres of influence of gangs in Mexico or criminal activity in West Haven, Conn.

But Michael Quiello, United’s vice president of corporate safety, said he saw that the same techniques could be used to help the airline’s corporate safety team tackle employee injuries and aircraft damage. The goal: Link all information related to those incidents and present it visually in a way that makes it easy for employees to spot clusters of incidents or links connecting them.

Incidents of preventable aircraft damage are down 25 percent from 2015, and employee injuries have dropped by 13 percent, according to United.

The airline had been tracking and issuing reports on both damage and injuries long before the data visualization program began. But when information was listed in a spreadsheet, it was harder for employees to figure out what it meant, said DeGiovanni, of United’s corporate safety team.

Southwest has been taking a similar approach to linking safety data and presenting it in easier-to-understand ways for the past six years, said Don Carter, a manager in safety and security at Southwest.

“It lets us tie apparently unrelated things together and look for connections,” Carter said.

He credits that work with reducing employee injuries and the kinds of minor incidents, like failures to follow procedure, that can contribute to bigger hazards.

While the gains are real, the underlying idea — mapping incidents to spot clusters or trends — is hardly new.

Industry experts said improvements in computing power and the platforms airlines use to present the data in an interactive, easy-to-read way likely helped the idea catch on.

“It’s not that the data didn’t exist, but instead of calling up a colleague in IT and getting told they can create the report but it’s No. 78 on the priority list, you can do it yourself,” said Hornick, of consultancy Oliver Wyman.

Airlines also simply have more ways of capturing data in real time, whether from equipment on the aircraft or via the mobile devices a growing share of employees carry as they scan bags, perform maintenance or work with customers.

“When you start to accumulate more data that’s granular and in real time … you start to see more, and you see it earlier,” Mann said.