On Saturday, a gunman opened fire in a Walmart in El Paso, Texas, killing 22 people. Less than 24 hours later, a man shot and killed nine people in Dayton, Ohio.

Data from the Centers for Disease Control and Prevention shows that 39,773 people in the US die from firearms every year.

Despite some restrictions on gun control research, scientists have evaluated how certain policies affect gun deaths.

Strict background checks, limiting access to assault weapons, and prohibiting domestic abusers from owning weapons are all policies associated with reduced rates of gun violence.

Visit Business Insider's homepage for more stories.

On Saturday, a gunman opened fire in a Walmart in El Paso, Texas, killing 22 people and injuring dozens of others before being arrested. The incident is being investigated as an act of domestic terror.

Less than 24 hours later, a man in Dayton, Ohio killed nine people, including his own sister, and wounded 27 others before he was killed by police.

Last weekend, a 19-year-old killed three people (including two children) and injured 13 before fatally shooting himself at a garlic festival in Gilroy, California.

Already in 2019, the US has seen 255 mass shootings, according to the Gun Violence Archive, a non-profit organization that tracks these incidents. Thus far, 8,787 people have died and 17,463 people have been injured by firearms this year across the country.

President Donald Trump has suggested that poor mental health and violent video games could be to blame for the actions of the two gunmen this weekend, but scientific research doesn't support those claims. Experts have repeatedly shown that mental-health issues are not predictive of violence, and while some evidence does link video games with aggression, that's not the same as violence.

What science has demonstrated, however, is that the number of gun deaths in the US is much higher than in other nations with similar rates of gun ownership (like Switzerland), and that certain policies can help prevent these fatalities. Studies have linked stricter background checks, rules prohibiting domestic abusers from owning weapons, and secure locks on firearms in the home with decreased rates of gun-related deaths.

Read More: Switzerland has a stunningly high rate of gun ownership — here's why it doesn't have mass shootings

Here's what the data shows.