BUFFALO, N.Y. — The rate of prescription painkillers sent to Niagara County from 2006 through 2012 was higher than in any other county in New York State, according to a new database.

Journalists with The Washington Post and a newspaper in Charleston, W.Va. won a lawsuit, forcing the U.S. Drug Enforcement Administration (DEA) to hand over the data.

A searchable database shows, during the time period in question, more than 77 million painkillers made their way into Niagara County. That works out to 51 pills per person per year, a rate that's higher than the national average of around 35.

Erie County's rate of 48 pills per person per year was also higher than the national average.

Many counties in Appalachia were especially hard hit. In Mingo County, W.Va. — with a population of just around 24,000 people — drug companies sold more than 38 million prescription painkillers during the 7-year period.

The database includes data for every county in the country and also shows the top manufacturers, distributors and pharmacies in each county.

Laura Kelemen, director of Niagara County's Department of Mental Health and Substance Abuse Services, said the availability of opioids contributes to the crisis in the county; however, she said since the Niagara County Opioid Task Force started in 2016, the number of opioids used in the area has started to decline.