CSO data can be downloaded from the CSO webpage or accessed directly in R Studio by installing the csodata package and then using the cso_get_date()function. Table 1 provides a breakdown of suicides in Ireland between 2021 and 2024 by age category and gender. Figure 1 shows the change in incidence by quarter for males and females.
Figure 2 provides a heat-map of incidence by quarter for each age category and Figure 3 provides a bar-chart, stacked by gender over each quarter and faceted by age category.
tbl1<-cso_get_data("VSD45")%>%filter(Cause.of.Death=="Suicide and intentional self harm (X60-X84)")prepared_data<-tbl1%>%filter(Age.Group!="All ages")%>%# Exclude "All ages"select(Age.Group, Sex, `2022Q1`:`2024Q2`)%>%pivot_longer(cols =`2022Q1`:`2024Q2`, names_to ="Quarter", values_to ="Deaths")%>%group_by(Age.Group, Sex)%>%summarise(Total_Deaths =sum(Deaths, na.rm =TRUE), .groups ="drop")%>%# Aggregate deathspivot_wider(names_from =Sex, values_from =Total_Deaths, values_fill =0)%>%# Reshape dataarrange(Age.Group)%>%select(Age.Group, Male, Female, "Both sexes")prepared_data%>%mutate(`Both sexes (Value)` =`Both sexes`)%>%# Create a separate column for numeric valuesgt(rowname_col ="Age.Group")%>%fmt_number( columns =c(Male, Female, `Both sexes (Value)`), decimals =0)%>%gt_theme_pff()%>%gt_plt_bar( column =`Both sexes`, # Add the bar only to the "Plot" column color ="#70d2cd")%>%cols_move( columns =`Both sexes (Value)`, # Move the numeric value column before the bar column after =Female)%>%cols_label( Male ="Males", Female ="Females", `Both sexes (Value)` ="Both Sexes", `Both sexes` ="Plot")%>%tab_header( title ="Suicide Deaths by Age Group and Sex", # Add a centered title subtitle ="Data from 2022Q1 to 2024Q2")%>%tab_style( style =cell_text(align ="center"), # Center the column values locations =cells_body(columns =everything()))%>%tab_style( style =cell_text(align ="center"), # Center the title locations =cells_title(groups ="title"))%>%tab_style( style =cell_text(align ="center"), # Center the subtitle locations =cells_title(groups ="subtitle"))
Suicide Deaths by Age Group and Sex
Data from 2022Q1 to 2024Q2
Males
Females
Both Sexes
Plot
Under 1 year
0
0
0
1 - 4 years
0
0
0
5 - 14 years
3
2
5
15 - 24 years
87
18
105
25 - 34 years
121
32
153
35 - 44 years
133
36
169
45 - 54 years
127
25
152
55 - 64 years
105
32
137
65 - 74 years
66
15
81
75 - 84 years
23
7
30
85 years and over
4
1
5
Table 1: Suicide by age and gender
Show the code
tbl1_long<-tbl1%>%pivot_longer( cols =starts_with("202"), # Select columns with quarterly data names_to ="Quarter", values_to ="Deaths")%>%filter(!is.na(Deaths)&Sex!="Both sexes")%>%# Remove rows with missing values and exclude 'Both sexes'group_by(Sex, Quarter)%>%summarise(Cumulative_Deaths =sum(Deaths), .groups ="drop")# Calculate cumulative deaths for each quarter by sex# Plot the dataline_graph<-tbl1_long%>%ggplot(aes(x =Quarter, y =Cumulative_Deaths, color =Sex, group =Sex))+geom_line(size =1.2)+geom_point(size =2)+scale_x_discrete(guide =guide_axis(angle =45))+# Tilt x-axis labels for readabilityscale_color_manual(values =c("Male"="lightblue", "Female"="lightpink"))+# Set line colorslabs( title ="Suicide Deaths in Ireland", subtitle ="2021 to 2024 by quauter", x ="", y ="", color ="")+theme_minimal()+theme( plot.title =element_text(size =16, color ="#1a5276", hjust =0.5), plot.subtitle =element_text( color ="#1a5276", hjust =0.5), axis.text.x =element_text(size =10), axis.title =element_text(size =12, color ="#1a5276"), legend.position =c(0.85, 0.95), legend.background =element_rect(fill="white", color ="white"))# Display the plotprint(line_graph)
Figure 1: Suicide incidence rates
Show the code
# Assuming your filtered data is in a data frame called `tbl1`# Reshape the data for plottingheatmap_data<-tbl1%>%pivot_longer( cols =starts_with("202"), # Select columns with quarterly data names_to ="Quarter", values_to ="Deaths")%>%filter(!is.na(Deaths)&Sex!="Both sexes"&Age.Group!="All ages")%>%# Remove rows with missing values, exclude 'Both sexes' and 'All ages'group_by(Age.Group, Quarter)%>%summarise(Total_Deaths =sum(Deaths), .groups ="drop")# Calculate total deaths for each age group by quarter# Plot the heat mapheat_map<-ggplot(heatmap_data, aes(x =Quarter, y =Age.Group, fill =Total_Deaths))+geom_tile()+scale_fill_gradient(low ="white", high ="#d63f38")+# Set color gradient from white to redlabs( title ="Suicide Deaths by Age Group", subtitle ="2022 to 2024 by quauter", x ="", y ="", fill ="Deaths")+theme_minimal()+theme( plot.title =element_text(size =16, color ="#1a5276", hjust =0.5), axis.text.x =element_text(size =10, angle =45), # Tilt x-axis labels for readability axis.title =element_text(size =12), panel.grid =element_blank(), plot.subtitle =element_text( color ="#1a5276", hjust =0.5))# Display the plotprint(heat_map)
Figure 2: Heatmap of deaths by age and date
Show the code
# Assuming your filtered data is in a data frame called `tbl1`# Reshape the data for plottingbar_data<-tbl1%>%pivot_longer( cols =starts_with("202"), # Select columns with quarterly data names_to ="Quarter", values_to ="Deaths")%>%filter(!is.na(Deaths)&Sex!="Both sexes"&Age.Group!="All ages")%>%# Remove rows with missing values, exclude 'Both sexes' and 'All ages'group_by(Sex, Quarter, Age.Group)%>%summarise(Total_Deaths =sum(Deaths), .groups ="drop")%>%# Calculate total deaths for each sex, quarter, and age groupmutate(Sex =factor(Sex, levels =c("Female", "Male")))# Ensure females are on top# Create a stacked bar chart for each quarter with segments colored by sex and facets by age groupstacked_bar_chart<-ggplot(bar_data, aes(x =Quarter, y =Total_Deaths, fill =Sex))+geom_bar(stat ="identity", position ="stack", color ="white")+scale_fill_manual(values =c("Male"="lightblue", "Female"="lightpink"))+# Set colors for male and femalefacet_wrap(~Age.Group, scales ="fixed")+# Create facets for each age group with the same y-axis scalelabs( title ="Suicide Deaths by Sex, Quarter, and Age Group", x ="", y ="", fill ="")+theme_bw()+theme( plot.title =element_text(size =16, color ="#1a5276", hjust =0.5), axis.text.x =element_text(size =6, angle =45, hjust =1), # Tilt x-axis labels for readability axis.title =element_text(size =12), legend.position ="top",)# Display the plotprint(stacked_bar_chart)
Figure 3: Age and sex distribution by year
Comparisons
Figure 4 compares suicide incidence with death from transport accidents and drowning and highlights the fact that there are more than twice the number of suicides than transport accidents and drowning combine. This data includes figures from 2015 to 2021.
Figure 5 shows suicide incidence over time by country and allows for selected comparisons between counties. Note that these are absolute numbers and not per capita rates.
# Time Series Analysis for Intentional Suicide and Transport Accidents# Ensure all years are included during pivotingtbl2<-cso_get_data("VSA112")long_data<-tbl2%>%pivot_longer( cols =starts_with("20"), # Matches all column names starting with '20' names_to ="Year", values_to ="Deaths")%>%mutate(Year =as.integer(Year))# Replace NA values in Deaths with 0long_data<-long_data%>%mutate(Deaths =ifelse(is.na(Deaths), 0, Deaths))# Filter the dataset for intentional self-harm, transport accidents, and accidental drowning, excluding 'Ireland' from County and 'Both sexes' from Sexselected_causes<-long_data%>%filter(Cause.of.Death%in%c("Intentional self-harm (X60-X84)", "Transport accident (V01-V09)", "Accidental drowning and submersion (W65-W74)"),County!="Ireland",Sex!="Both sexes")%>%mutate(Cause.of.Death =recode(Cause.of.Death,"Intentional self-harm (X60-X84)"="Intentional self-harm","Transport accident (V01-V09)"="Transport accident","Accidental drowning and submersion (W65-W74)"="Accidental drowning"))# Create a time series for deaths by year and cause of death (both sexes combined)time_series_plot<-selected_causes%>%group_by(Year, Cause.of.Death)%>%summarise(Total_Deaths =sum(Deaths, na.rm =TRUE), .groups ="drop")%>%mutate(Cause.of.Death =factor(Cause.of.Death, levels =c("Intentional self-harm","Transport accident","Accidental drowning")))%>%ggplot(aes(x =Year, y =Total_Deaths, color =Cause.of.Death))+geom_line(alpha =0.4, size =1.2)+scale_x_continuous(breaks =seq(min(selected_causes$Year), max(selected_causes$Year), by =1))+labs( title ="Deaths in Ireland by cause", subtitle ="2015-2021", color ="")+annotate("text", x =2017, y =350, label ="Intentional self-harm accounts for\nmore than twice the deaths of\ntransport accidents and drowning\ncombined", hjust =0, color ="#1a5276")+annotate("segment", x =2017.5, xend =2017.5, y =410, yend =510, arrow =arrow(type ="open"), color ="#1a5276", size =0.4)+annotate("segment", x =2017.5, xend =2017.5, y =290, yend =190, arrow =arrow(type ="open"), color ="#1a5276", size =0.4)+theme_minimal()+theme( plot.title =element_text(hjust =0.5, color ="#1a5276", size =14), plot.subtitle =element_text(hjust =0.5, color ="#1a5276", size =12), axis.title =element_blank(), legend.position.inside =c(2019.5, 300))# Note:# Replace `tbl2` with your actual dataset name.# Adjust column names if needed to match your data structure.# Visualizeprint(time_series_plot)
Figure 4: Comparison with traffic accidents and drownings
Show the code
library(plotly)# Filter for rows where Cause.of.Death is 'Intentional self-harm (X60-X84)', excluding Ireland and Both sexesfiltered_df<-tbl2%>%filter(Cause.of.Death=="Intentional self-harm (X60-X84)",County!="Ireland",Sex!="Both sexes")# Aggregate the data by County and Yearaggregated_df<-filtered_df%>%pivot_longer( cols =`2015`:`2021`, names_to ="Year", values_to ="Incidents")%>%group_by(County, Year)%>%summarise(Incidents =sum(Incidents, na.rm =TRUE), .groups ="drop")%>%mutate(Year =as.integer(Year))# Create the interactive time series plot with counties in the legend, defaulting to no counties visiblefig<-plot_ly( data =aggregated_df, x =~Year, y =~Incidents, color =~County, type ='scatter', mode ='lines', colors =scales::hue_pal()(length(unique(aggregated_df$County))), # Use a scalable color palette from scales visible ="legendonly"# Default all lines to be hidden)%>%layout( title ="Intentional Self-Harm Incidents by County (2015-2021)", xaxis =list(title =""), yaxis =list(title =""), legend =list(title =list(text =""))# Add legend for counties)# Display the plotfig
Figure 5: Suicide rates over time by county
Suicide prevention
Suicide prevention in Ireland has been a significant public health priority, driven by the recognition of the profound impact of suicide on individuals, families, and communities. The government’s national suicide prevention strategy, Connecting for Life, launched in 2015, provides a framework for reducing suicide and self-harm by promoting mental health and enhancing support systems. The strategy emphasizes collaboration across sectors, including healthcare, education, and community organizations. Key initiatives include improving access to mental health services, implementing early intervention programs, and reducing the stigma surrounding mental illness. A critical component has been the development of suicide surveillance systems to monitor trends and inform targeted interventions. Community-based programs, like those run by Pieta House and Samaritans, offer direct support to individuals in crisis, emphasizing the importance of accessible, non-judgmental care.
Despite these efforts, challenges remain. Suicide rates in Ireland, while declining in some demographics, continue to pose significant concerns, particularly among young men and rural populations. Factors such as economic pressures, social isolation, and limited access to mental health resources in certain areas exacerbate the issue. Additionally, barriers like stigma and underfunding of mental health services hinder progress. Addressing these challenges requires sustained commitment to enhancing mental health literacy, ensuring equitable access to care, and fostering environments where seeking help is normalized and encouraged. By building on current efforts and addressing gaps, Ireland can continue to make strides in reducing suicide and supporting those affected.