AMHERST — In an attempt to understand cannabis use in the state before recreational marijuana sales soon begin, the Massachusetts Department of Public Health released a “marijuana baseline health study” on Friday.

The study — an effort conducted in no small part by University of Massachusetts researchers — provides a snapshot of patterns of and perceptions of marijuana use, the prevalence of hospitalizations and impaired driving, and the economic impacts of cannabis for state and local government.

The study was mandated by lawmakers in 2017, and will give researchers a baseline from which they can analyze future data — something other states that have legalized marijuana have struggled with.

“It’s pulling together a bunch of different data sources, and I think that it’s really important that this study was done, and done at the time that it was done,” said Jennifer Whitehill, a public health researcher at UMass Amherst who worked on the study. “It was a unique moment in time.”

That’s because the study was done after the state legalized recreational marijuana, but before stores are selling marijuana to state residents. In order to get at some of the questions at hand, researchers designed a survey of around 3,000 adults, meant to be representative of the state.

Among the results of the study that made for splashy headlines were that 21 percent of adult residents who took part in the survey had used cannabis within the last 30 days. For 18- to 25-year-olds, that number climbs to more than 50 percent.

In a regional breakdown, residents of western Massachusetts reported the highest prevalence of past 30-day marijuana use at around 30 percent.

Whitehall is an injury-prevention researcher by trade, focused on substance use as a risk factor for serious injury. She led research in the study on hospital visits and impaired driving, and was heavily involved in studying the patterns of use, general perceptions of marijuana and methods of use.

“I think this study definitely makes a contribution that can help with other pieces, other ongoing efforts and things to come,” she said.

The survey also found that more than 34 percent of marijuana-using adults reported that they had driven under the influence of cannabis. That accounts for just over 7 percent of the state’s adult population.

“Retrospective evaluations of fatal crash data suggest that drivers who died in a fatal crash are much more likely to have had their blood tested for marijuana, than drivers who survived a crash in which there was at least one fatality,” the study reads.

Other findings are that marijuana-related treatment accounts for a small portion of overall substance use disorder treatment episodes, and that no survey respondents reported marijuana-related emergency room or urgent care visits.

Looking at regional poison control center data, the study concludes that marijuana-related calls to those centers have been increasing over time, with the majority of calls related to 10- to 19-year-olds and/or exposure to dried marijuana flower.

Whitehill said there are some limitations to the study, and she hopes that, when revenue is coming in from marijuana sales, the state will use some of that money for continuing to study the public health impacts of legalized marijuana in order to answer some of the unanswered questions from this research.

“This was a study that did have to come together very quickly, relative to the usual pace that a lot of academic research happens,” Whitehill said of the 18-month timeframe for the study. “Replicating a study like what we did, maybe even enhancing it when there is revenue coming in from marijuana to hopefully support research, I think that would be really good future steps. And continuing to look back at these data sources.”