(CNN) On excessively hot days, there are more likely to be fatal car accidents and food safety problems, and police officers and government food inspectors tend to do less of their duties, according to a study published Monday in the Proceedings of the National Academy of Sciences.

The Massachusetts Institute of Technology scientists, who analyzed data from across the United States, suggest that if the climate continues to change, by 2050 -- and in another 50 or so years beyond that -- our world may be less safe than it is today.

"The crux of the idea -- which is that weather affects how we perform our duties and how we go about our daily lives and the risks that we experience -- is indeed simplistic," said Nick Obradovich , co-author of the study and a research scientist at MIT's Media Lab.

What is not at all simple is that he and his colleagues used a "massive amount of data" to understand how temperature affects crucial government work, and this is the "first time, to our knowledge, that's been done."

'Bad for human functioning'

"Hot temperatures are basically bad for human functioning," Obradovich said. This is the case across "a broad suite of things" that scientists have studied: Sleep quality, mood, mental health, risk of suicide and work productivity are all "harmed by hot temperatures."

So, do hot temperatures harm government workers' ability to do their jobs?

Obradovich and his colleagues analyzed data from more than 70 million police stops between 2000 and 2017 and more than 500,000 fatal motor vehicle crashes between 2001 and 2015. They also looked at nearly 13 million food safety violations (for restaurants and food production facilities) recorded across more than 4 million inspections between 2012 and 2016.

The researchers established the usual range of temperatures for cities and states and then examined "what happens if you have, all else equal, just an unusually warm day in that range?" Obradovich explained.

"So, let's say it's summer in Columbus, Ohio, and usually that day is, say, 90 degrees Fahrenheit, but today it is 92 degrees Fahrenheit."

Next, the research team asked, "on any given day, is this facility -- is this restaurant or food production facility -- inspected or not? And the probability that a facility is inspected goes down in hot temperatures," Obradovich said. "That's one of the main findings."

The probability of an inspection being done decreases beyond a maximum temperature of 26° Celsius (nearly 79° Fahrenheit), according to the researchers. Scaled across 750,000 total facilities, approximately 8,000 fewer would be inspected per day in the range of 30° C to 40° C (86° F to 104° F), the authors estimated.

The data also showed that when facilities are inspected, "the number of violations a facility has goes up with temperature," Obradovich said; this is probably due to the fact that higher temperatures pose a greater risk to food safety because pathogens, including E. coli and salmonella, replicate faster in warmer temperatures.

A similar picture emerged when the researchers examined traffic accidents and policing.

"What you see is that fatal crash incidence goes up in hot temperatures," Obradovich said. Here, an average temperature range of 30° C to 40° C (or 86° F to 104° F) produces an amplified risk of fatal car crashes of half a percentage point, the study finds.

"It also goes up in particularly cold temperatures, but you see a sharper increase in the hot temperature range," he said.

"So people are more likely to have a fatal crash in hot temperatures, but also, the probability of traffic stops -- the number of traffic stops that are conducted in a county on a given day when it is hot -- goes down," Obradovich said.

The results show that police stops decline after a maximum temperature of 29° C (84° F). So in the range of 30° C to 40° C (86° F to 104° F) police stops are reduced by about 1.5%, according to the researchers.

In short, the effort made by public safety workers and government regulators declines at the time of greatest risk.

Not 'one or the other'

Solomon Hsiang , an associate professor at the University of California at Berkeley's Goldman School of Public Policy, wrote in an email that the study shows "the environment influences the effectiveness of political institutions, like law enforcement."

"For decades many social scientists have been locked in a polarizing battle over whether the environment or political institutions matter more for determining people's wellbeing, as if it could only be one or the other," added Hsiang, who was not involved in the new research. "What this study shows is that the environment directly affects the functioning of political institutions themselves, which in turn then matter to society.

"We've known for some time that individual cognition and productivity decline at high temperatures," said Hsiang, whose own research has demonstrated this decline.

What the new study does, then, is show "how much these effects matter for the enforcement of law and order, since we trust individuals with that responsibility on a daily basis," Hsiang said.

Obradovich and his colleagues not only looked at past trends, they hypothesized future patterns based on "very rough" projections of temperatures over time.

Get CNN Health's weekly newsletter Sign up here to get The Results Are In with Dr. Sanjay Gupta every Tuesday from the CNN Health team.

"The places that are hotter, especially during hotter times of the year, are likely to be harmed most," Obradovich said. Meanwhile, potential fixes could be "relatively simple and not all that costly." For example, police officers in increasingly warm regions of the nation might wear light-colored uniforms to deflect the heat, while food safety inspectors might limit their oversight to a smaller number of the worst violating restaurants and productions facilities instead of a larger number of lower-risk places during high-temperature days.

Ultimately, the point of the study is not to scare people but to understand exactly what the effects of extreme temperatures may be, Obradovich said, "so that we can look for opportunities to potentially adapt or to fix things that might go wrong under a changing climate."