Open-source Python and R scripts for local-first qualitative analysis: transcription on your own machine, AI-suggested coding under full human review, and publication-ready qualitative summaries. Apache-2.0 — include them freely in journal supplements, review packages, and repositories.
These scripts are the analysis engine of QualiVahti Local, a paid Obsidian vault (forskai by Vahtian) that packages them with templates, dashboards, an evidence-aware Canvas, and a complete demo study. The scripts are open so that any study using them can meet journal code-availability requirements and so reviewers can inspect exactly what the AI was allowed to do. The rule throughout: models suggest structure; the researcher decides interpretation.
The design follows the shift from AI as coder to AI as interlocutor: the model surfaces candidate structure; the researcher retains interpretive authority. This is the position argued in Nguyen-Trung & Friese (2026), Towards a methodologically congruent framework for GenAI use in nonpositivist qualitative research (Int. J. Social Research Methodology, 10.1080/13645579.2026.2703248, open access) — the AI assists, the human interprets. The scripts fit medium-Q traditions best (framework, matrix, template, and codebook thematic analysis); they support reflexive work through human review, memos, and the second-opinion chat, and they deliberately do not automate coding or theming.
| Folder | Contents |
|---|---|
python/ |
local Whisper transcription (+ folder watcher), transcript cleaning, AI code suggestion via a local Ollama model, quote extraction, co-occurrence network, Obsidian note export, evidence-map canvas builder, local RAG chat with cited sources |
r/ |
coding summary, code frequency table + chart, code × participant matrix, theme × participant matrix, co-occurrence network drawing, descriptive tables with honest captions, AI-use disclosure paragraph generator, pre-flight defensibility check |
prompts/ |
the AI prompt files, each with hard provenance rules (only provided text, no invented details, uncertainty marked, contradictions reported, human judgment named) |
Design invariants a reviewer can check in the code:
localhost (the scripts talk to a local Ollama). No research data can leave the machine.accepted or edited are counted in any output.install.packages("qualivahti", repos = "https://heidihelena.r-universe.dev")
The package (in rpkg/) ships the R scripts and thin runners: qv_coding_summary("~/MyVault"), qv_code_frequency(), qv_code_by_participant(), qv_theme_matrix(), qv_cooccurrence_network(), qv_results_tables(), qv_ai_disclosure(), qv_preflight(). Same scripts, callable from an R session; qv_scripts_path() shows where they live.
Python ≥ 3.10 (pip install -r python/requirements.txt — faster-whisper, requests), Ollama with any local model, and R with tidyverse + igraph (ggraph and ragg used when present). The scripts expect the QualiVahti vault folder layout; standalone use mostly works with --vault <folder> pointing at a folder using the same structure.
Andersén HH. QualiVahti analysis scripts (version 1.0) [computer software]. Apache-2.0. Zenodo. https://doi.org/10.5281/zenodo.21274892 (this version) · https://doi.org/10.5281/zenodo.21274891 (all versions)
See CITATION.cff — GitHub's "Cite this repository" button uses it.
Apache License 2.0 (see LICENSE). The QualiVahti Local vault that packages these scripts is sold separately under a personal license at vahtian.com/qualivahti-local.