If mass shootings are a kind of Suicide, what is driving changes in Suicide?

THIS ANALYSIS IS STILL VERY EARLY STAGES FOR NOW ITS JUST GRAPHS OF SUICIDE RATES

To answer this, let’s look at CDC Wonder data for suicide, by year, age group, state, and sex. First we downloaded the data by manually requesting it on CDC Wonder:

This is data on all suicides (not just guns) in the US by year, state, sex, and 10 year age group.

using Pkg
Pkg.activate(".")

using CSV, DataFrames, DataFramesMeta, StatsPlots, GLM


suicdet = CSV.read("data/cdc-suicide-by-year-age-state-sex.csv",DataFrame; normalizenames=true,missingstring="Unreliable",footerskip=12723-12657+1)



let pl = []
    for st in unique(suicdet.State)
        p = @df @subset(suicdet,:Gender_Code .== "M" .&& :State .== st) plot(:Year,:Deaths ./ :Population .* 100_000,group=:Ten_Year_Age_Groups_Code,title="$st",ylim=(0,100))
        push!(pl,p)
        if length(pl) == 3
            display(plot(pl...; size=(1000,250),layout=(1,3)))
            empty!(pl)
        end
    end
    if length(pl) > 0
        display(plot(pl...; size=(1000,250),layout=(1,length(pl))))
    end
end
  Activating project at `~/Consulting/LakelandAppliedSciLLC/CriminologyGuns`

Relevant to the question of disaffected young males following in the footsteps of a script written by the perpetrators of the Columbine event, the suicide rate for males in the ranges 15-24 and 25-34 is of particular interest.

let pl = []
    for st in unique(suicdet.State)
        p = @df @subset(suicdet,:Gender_Code .== "M" .&& :State .== st .&& in.(:Ten_Year_Age_Groups_Code,Ref(["15-24","25-34"]))) plot(:Year,:Deaths ./ :Population .* 100_000,group=:Ten_Year_Age_Groups_Code,title="$st",ylim=(0,100))
        push!(pl,p)
        if length(pl) == 3
            display(plot(pl...; size=(1000,250),layout=(1,3)))
            empty!(pl)
        end
    end
    if length(pl) > 0
        display(plot(pl...; size=(1000,250),layout=(1,length(pl))))
    end
end