AOUSDOHtools

Tools for Analyzing AOU SDOH Survey Data

https://github.com/zhd52/aousdohtools

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Tools for Analyzing AOU SDOH Survey Data

Basic Info
  • Host: GitHub
  • Owner: zhd52
  • License: other
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 2.04 MB
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 1 year ago · Last pushed 10 months ago
Metadata Files
Readme License

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# AOUSDOHtools



[![R-CMD-check](https://github.com/zhd52/AOUSDOHtools/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/zhd52/AOUSDOHtools/actions/workflows/R-CMD-check.yaml)



```{r, echo=FALSE, out.width="30%", fig.align="center"}
knitr::include_graphics("man/figures/Hex_Sticker.jpg")
```

## Overview

`AOUSDOHtools` is an R package designed to process and analyze **Social Determinants of Health (SDOH)** Survey data from the ***All of Us (AOU)*** Research Program (). It provides tools to streamline common survey data tasks, including recoding, score calculation, and variable creation. The package is ideal for researchers and analysts working with SDOH survey data within the All of Us Research Hub Researcher Workbench, a cloud-based platform supporting AOU data analysis ().

This package is developed in conjunction with a published user guide:

-   Theresa A Koleck, Caitlin Dreisbach, Chen Zhang, Susan Grayson, Maichou Lor, Zhirui Deng, Alex Conway, Peter D R Higgins, Suzanne Bakken, *User guide for Social Determinants of Health Survey data in the All of Us Research Program*, Journal of the American Medical Informatics Association, Volume 31, Issue 12, December 2024, Pages 3032–3041, .

The package enables users to calculate health and well-being scores for 14 key social determinants of health constructs assessed in the *All of Us* Social Determinants of Health Survey (AOUSDOH).

**Supported Constructs and Functions**

1.  **Neighborhood Cohesion** - `calc_cohesion`

2.  **Neighborhood Disorder** - `calc_disorder`, `calc_physical_disorder`, `calc_social_disorder`

3.  **Neighborhood Environment** - `calc_density`, `calc_spa`, `calc_crime_safety`, `calc_nei`

4.  **Social Support** - `calc_social_support`, `calc_ins_support`, `calc_emo_support`

5.  **Loneliness** - `calc_loneliness`

6.  **Perceived Everyday Discrimination** - `calc_edd_situation`, `calc_edd_frequency`, `calc_edd_chronicity`

7.  **Perceived Discrimination in Health Care Settings** - `calc_hcd_ever`, `calc_hcd_count`, `calc_hcd_sum`, `calc_hcd_mean`

8.  **Food Insecurity** - `calc_food_insecurity`

9.  **Housing Insecurity / Instability** - `calc_housing_insecurity`, `calc_num_moves`

10. **Housing Quality** - `calc_housing_quality`

11. **Perceived Stress** - `calc_stress_sum`, `calc_stress_category`

12. **Daily Spiritual Experiences** - `calc_spirit`

13. **Religious Service Attendance** - `calc_religious_attendance`

14. **English Proficiency** - `calc_other_language`, `calc_english_level`, `calc_english_proficient`

This package simplifies data processing for AOU researchers, ensuring consistent, reproducible analyses of SDOH factors.

## Installation

You can install the published version of `AOUSDOHtools` from CRAN, or the development version from GitHub, using the following steps:

```{r installation, eval=F}
# Install AOUSDOHtools from CRAN
install.packages("AOUSDOHtools")

# Install AOUSDOHtools from GitHub
devtools::install_github("zhd52/AOUSDOHtools")
## Install devtools if necessary
install.packages("devtools")

# Confirm the installation
library(AOUSDOHtools)
```

## Example

Once installed, you can use the package by loading it into your R session:

```{r example}
library(AOUSDOHtools)

# Example: Calculating Neighborhood Cohesion Score

## Create a sample survey data frame
survey_df <- data.frame(
  person_id = c(1, 1, 1, 1, 2, 2, 2, 2),
  question_concept_id = c(40192463, 40192411, 40192499, 40192417,
                          40192463, 40192411, 40192499, 40192417),
  answer_concept_id = c(40192514, 40192455, 40192524, 40192408,
                        40192514, 40192455, 40192422, 40192408)
  )

## Compute neighborhood cohesion scores
cohesion_scores <- calc_cohesion(survey_df)
head(cohesion_scores)
```

## Merge

After computing all the scores, you can merge the resulting scores using this code:

```{r merge, eval=F}
# Merge the computed scores together

## Create a list for all the scores
scores.list <- list(
  cohesion_scores,                                                       ### Neighborhood Cohesion
  disorder_scores, physical_disorder_scores, social_disorder_scores,     ### Neighborhood Disorder 
  density_scores, spa_scores, crime_safety_scores, nei_scores,           ### Neighborhood Environment
  social_support_scores, ins_support_scores, emo_support_scores,         ### Social Support 
  loneliness_scores,                                                     ### Loneliness
  edd_situation_scores, edd_frequency_scores, edd_chronicity_scores,     ### Perceived Everyday Discrimination
  hcd_ever_scores, hcd_count_scores, hcd_sum_scores, hcd_mean_scores,    ### Perceived Discrimination in Health Care Settings
  food_insecurity_scores,                                                ### Food Insecurity
  housing_insecurity_scores, num_moves_scores,                           ### Housing Insecurity / Instability
  housing_quality_scores,                                                ### Housing Quality
  stress_sum_scores, stress_category_scores,                             ### Perceived Stress
  spirit_scores,                                                         ### Daily Spiritual Experiences
  religious_attendance_scores,                                           ### Religious Service Attendance
  other_language_scores, english_level_scores, english_proficient_scores ### English Proficiency
)

## Merge the scores
SDOH_scores <- reduce(scores.list, full_join, by = 'person_id')
head(SDOH_scores)
```

Owner

  • Name: Zhirui Deng
  • Login: zhd52
  • Kind: user
  • Location: Pittsburgh
  • Company: University of Pittsburgh, School of Nursing

JOSS Publication

AOUSDOHtools: An R Package for Social Determinants of Health Survey data in the All of Us Research Program
Published
December 01, 2025
Volume 10, Issue 116, Page 9306
Authors
Zhirui Deng ORCID
School of Nursing, University of Pittsburgh, Pittsburgh, PA, United States
Theresa A. Koleck ORCID
School of Nursing, University of Pittsburgh, Pittsburgh, PA, United States
Chen Zhang ORCID
School of Nursing, University of Rochester, Rochester, NY, United States
Peter D.r. Higgins ORCID
School of Medicine, University of Michigan, Ann Arbor, MI, United States
Caitlin Dreisbach ORCID
School of Nursing, University of Rochester, Rochester, NY, United States, Goergen Institute for Data Science, University of Rochester, Rochester, NY, United States
Editor
Nick Golding ORCID
Tags
Social Determinants of Health All of Us Research Program

GitHub Events

Total
  • Watch event: 6
  • Push event: 17
  • Create event: 7
Last Year
  • Watch event: 6
  • Push event: 17
  • Create event: 7

Packages

  • Total packages: 1
  • Total downloads:
    • cran 815 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: AOUSDOHtools

Analyzing AOU SDOH Survey Data

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 815 Last month
Rankings
Dependent packages count: 26.9%
Dependent repos count: 33.2%
Average: 49.0%
Downloads: 87.0%
Maintainers (1)
Last synced: 11 months ago

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • R >= 4.0.0 depends
  • dplyr * imports
  • covr * suggests
  • devtools * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests
  • usethis * suggests