How bigtoothdev/sociodata-prep works
sociodata-prep is a Google Apps Script tool for preparing Google Forms survey data in Google Sheets. Users invoke operations from a spreadsheet menu; handlers use the active sheet and supporting configuration sheets to transform, recode, sample, or analyze survey data. The graph includes documented menu actions and sampled helper calls. Several feature modules are named in the source tree but were not excerpted, so their internal behavior and connections are left unspecified.
Main entry points: main.ts SD-prep menu · trfCat.ts Categorical transform · trfDich.ts Dichotomous transform · context.ts Sheet context
Components 18
Spreadsheet entry
- SD-prep menu
src/main.ts
Survey transformations
- Categorical transform
src/functions/trfCat.ts - Dichotomous transform
src/functions/trfDich.ts - Wide-to-long pivot
src/functions/pivotWideToLong.ts - Form creation
src/functions/createForm.ts
Numeric recoding
- Wide recoding
src/functions/numRecodeWide.ts - Long recoding
src/functions/numRecodeLong.ts
Sampling and analysis
- Random sampling
src/functions/sampleRandom.ts - Response IDs
src/functions/rId.ts - Response dynamics
src/functions/dynamics.ts - Dimensions
src/functions/dimensions.ts
Shared utilities
- Sheet context
src/utils/context.ts - Selected columns
src/utils/getSelectedColumns.ts - Flag parser
src/utils/parseFlagsCell.ts - Slot header parser
src/utils/parseSlotHeader.ts - Shared constants
src/utils/constants.ts
Other components
- Spreadsheet user
- Google Sheets
Connections 26
- Spreadsheet user → SD-prep menu: opens menu
src/main.ts - SD-prep menu → Random sampling: launches
src/main.ts - SD-prep menu → Response IDs: launches
src/main.ts - SD-prep menu → Response dynamics: launches
src/main.ts - SD-prep menu → Dichotomous transform: launches
src/main.ts - SD-prep menu → Categorical transform: launches
src/main.ts - SD-prep menu → Wide-to-long pivot: launches
src/main.ts - SD-prep menu → Dimensions: launches
src/main.ts - SD-prep menu → Wide recoding: launches
src/main.ts - SD-prep menu → Long recoding: launches
src/main.ts - Categorical transform → Sheet context: gets context
src/functions/trfCat.ts - Dichotomous transform → Sheet context: gets context
src/functions/trfDich.ts - Wide recoding → Sheet context: gets context
src/functions/numRecodeWide.ts - Long recoding → Sheet context: gets context
src/functions/numRecodeLong.ts - Response dynamics → Sheet context: gets context
src/functions/dynamics.ts - Categorical transform → Selected columns: gets columns
src/functions/trfCat.ts - Dichotomous transform → Selected columns: gets columns
src/functions/trfDich.ts - Categorical transform → Flag parser: parses answers
src/functions/trfCat.ts - Dichotomous transform → Flag parser: parses answers
src/functions/trfDich.ts - Wide recoding → Slot header parser: parses headers
src/functions/numRecodeWide.ts - Long recoding → Slot header parser: parses headers
src/functions/numRecodeLong.ts - Categorical transform → Google Sheets: reads and writes
src/functions/trfCat.ts - Dichotomous transform → Google Sheets: reads and writes
src/functions/trfDich.ts - Wide recoding → Google Sheets: reads and writes
src/functions/numRecodeWide.ts - Long recoding → Google Sheets: reads and writes
src/functions/numRecodeLong.ts - Response dynamics → Google Sheets: reads and writes
src/functions/dynamics.ts