💾 Archived View for gemlog.blue › users › cariboudatascience › 1613525003.gmi captured on 2024-02-05 at 12:07:09. Gemini links have been rewritten to link to archived content
View Raw
More Information
⬅️ Previous capture (2021-12-04)
-=-=-=-=-=-=-
Mental Health As Risk For Drug Dependency
- Source: http://ourworldindata.org
- Quote: "Increased risk of developing an illicit drug dependency or abuse disorder in individuals with a given mental health disorder, relative to those without. A value of 3.9 for PTSD, for example, would indicate that individuals with PTSD are 3.9 times as likely to develop drug dependency relative to those without."
Software required to recreate plot:
- Install: R language, RTools40 and RStudio (see link below)
- Packages: GGPLot2, dplyr, janitor.
- Download code and data from Github.com (see link below).
- Move R code and data to working directory
Walkthough (R Code)
Gemini Browser
Caribou Data Science(Capsule)
Run R Code:
rm(list=ls())
mental_head_risk <- read.csv("./DATA/mental-health-as-risk-for-drug-dependency.csv")
colnames(mental_head_risk) <- c("Disorder","Risk")
mental_head_risk %>% ggplot() + geom_col(aes(x=reorder(Disorder,Risk),y=Risk)) +
coord_flip() + labs(title="Mental Health as Risk For Drug Dependency",
x="Mental Disorders") +
geom_text(aes(x=Disorder,y=Risk,label=Risk),nudge_y = 0.5)
Plot Mental Health Risk
https://github.com/davidjayjackson/Gemini-content/blob/main/mental-health-as-risk-for-drug-dependency.png
Resources:
R Code, data
R Language and Rtools40 (click and "base" and "Rtools")
Download and install RStudio