This repository provides the public code and documentation used in the open-science release accompanying the paper "Using AI-led semi-structured interviews to explore the connection between Carbon Tax narratives and climate anxiety", co-authored by Matéo Dib, Thibaut Arpinon, and Bérangère Legendre.
The repository is designed for transparency: it documents how the coding and harmonization were conducted, and it provides reusable applications for other qualitative projects. It does not publish the interview databases, participant responses, coder workbooks, or agreement reports, because these materials may contain sensitive participant-level information.
These applications are not only topic-coding tools. They help researchers create DAG-compatible qualitative codings: ordered topic sequences that preserve narrative mechanisms, causal chains, definitions, trade-offs, priorities, coexistence relations, information sources, and actor-specific scope qualifiers.
The resulting coding can be read qualitatively and can also be translated into graph-like representations of participants' reasoning.
apps/manual_topic_coding_app.py: Streamlit app for coder-level manual coding.apps/topic_harmonization_app.py: Streamlit app for comparing coder sequences and producing a harmonized sequence.apps/coding_utils.py: shared parsing, configuration, workbook, backup, and validation utilities.docs/coding_protocol.md: the main document for understanding how to code and how to build DAG-compatible sequences.docs/harmonization_workflow.md: the workflow from independent coding to harmonized DAG-compatible coding.docs/data_protection.md: the data-exclusion policy for the open-science release.templates/private_workbook_schema.md: the expected local workbook structure.scripts/privacy_check.py: a guardrail to prevent sensitive workbooks and outputs from being committed.CITATION.cffandCITATION_POLICY.md: citation metadata and reuse expectations.
For learning how to code, start with docs/coding_protocol.md, then read docs/harmonization_workflow.md, then check templates/private_workbook_schema.md.
The public repository does not include data. Locally, the workflow uses three private Excel workbooks:
coding_interview_base.xlsx: input for the manual coding app. It contains at leastquestionandresponse; coder columns are created or filled by the manual app.harmonization_interview_base.xlsx: a copy ofcoding_interview_base.xlsxafter the N coders have added their coding columns.harmonized_interview_base.xlsx: the final output produced by the harmonization app, with the harmonized topic/DAG-compatible sequence.
By default, the apps look for these files in a local private_workbooks/ folder inside the repository. This folder is ignored by Git.
The number of coders is configurable.
Use a count:
export TOPICS_CODER_COUNT=3This creates or expects:
Topics_Coder_1
Topics_Coder_2
Topics_Coder_3
Or provide explicit column names:
export TOPICS_CODER_COLUMNS="Topics_Coder_1,Topics_Coder_2,Topics_Coder_3,Topics_Coder_4"The harmonization app requires all configured coder columns to be present in harmonization_interview_base.xlsx.
The apps are prefilled with the ending nodes used in the paper:
acceptability
unacceptability
ambivalent_acceptability
They can be enabled, disabled, or edited directly in the app sidebar. For reuse in another project, you can also configure them before launch:
export ENABLE_REQUIRED_ENDING_NODES=1
export REQUIRED_ENDING_NODES="acceptability,unacceptability,ambivalent_acceptability"To disable them by default:
export ENABLE_REQUIRED_ENDING_NODES=0If your private workbooks are stored elsewhere:
export INTERVIEW_WORKBOOK_DIR="/absolute/path/to/private/workbooks"
export CODING_INTERVIEW_BASE="coding_interview_base.xlsx"
export HARMONIZATION_INTERVIEW_BASE="harmonization_interview_base.xlsx"
export HARMONIZED_INTERVIEW_BASE="harmonized_interview_base.xlsx"You can also configure the question, response, and harmonized columns:
export TOPICS_QUESTION_COL="question"
export TOPICS_RESPONSE_COL="response"
export TOPICS_HARMONIZED_COL="Topics_Harmonized"These instructions install the software needed to run the Streamlit applications. They do not download or expose any interview data, participant responses, private coding workbooks, or agreement reports.
You need:
- Git, to clone the repository;
- Python 3.10 or newer, with Python 3.11 recommended;
- a terminal application;
- a web browser, because Streamlit opens the apps locally in the browser.
A GitHub account is not required to clone and run this public repository. It is only needed if you want to fork the repository or push changes.
-
Open Terminal.
-
Install Apple's command-line developer tools, which include Git:
xcode-select --installIf Git is already installed, this command may report that the tools are already available. You can check with:
git --version- Check whether Python 3 is already installed:
python3 --versionIf Python 3.10 or newer is not available, install Python from https://www.python.org/downloads/ or, if you use Homebrew, run:
brew install python- Clone the repository and enter the project folder:
git clone https://github.com/MateoDib/Manual_Coding_App.git
cd Manual_Coding_App- Create and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activateAfter activation, your terminal prompt usually shows (.venv).
- Upgrade
pipand install the required Python packages:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt- Verify the installation:
python -c "import streamlit, pandas, openpyxl; import streamlit_sortables; print('Installation OK')"
streamlit --version- Create the private workbook folder used by the apps:
mkdir -p private_workbooksPlace private Excel workbooks in private_workbooks/ only on your local machine. This folder is ignored by Git.
The recommended Windows shell is PowerShell.
- Install Git for Windows.
Using winget in PowerShell:
winget install --id Git.Git -e --source wingetAlternatively, download Git from https://git-scm.com/download/win. After installation, open a new PowerShell window and check:
git --version- Install Python 3.10 or newer, with Python 3.11 recommended.
Using winget:
winget install --id Python.Python.3.11 -e --source wingetAlternatively, download Python from https://www.python.org/downloads/windows/. During installation, select Add Python to PATH if the installer offers this option.
Check the installation:
py --version- Clone the repository and enter the project folder:
git clone https://github.com/MateoDib/Manual_Coding_App.git
cd Manual_Coding_App- Create a virtual environment:
py -3 -m venv .venv- Activate the virtual environment:
.\.venv\Scripts\Activate.ps1If PowerShell blocks activation because script execution is restricted, allow scripts for the current PowerShell session only, then activate again:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\.venv\Scripts\Activate.ps1After activation, your terminal prompt usually shows (.venv).
- Upgrade
pipand install the required Python packages:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt- Verify the installation:
python -c "import streamlit, pandas, openpyxl; import streamlit_sortables; print('Installation OK')"
streamlit --version- Create the private workbook folder used by the apps:
New-Item -ItemType Directory -Force private_workbooksPlace private Excel workbooks in private_workbooks\ only on your local machine. This folder is ignored by Git.
If you already cloned the repository, open a terminal in the local Manual_Coding_App folder and run:
git pull
python -m pip install --upgrade pip
python -m pip install -r requirements.txtOn Windows, the same commands work in PowerShell once the virtual environment is activated.
Before adding or committing any file, check that private study material remains outside version control:
git status
python3 scripts/privacy_check.pyOn Windows, use:
git status
python scripts/privacy_check.pyThe repository's .gitignore excludes private_workbooks/, Excel workbooks, data exports, outputs, logs, and common database formats. This is a guardrail, not a substitute for human review.
Manual coding:
streamlit run apps/manual_topic_coding_app.pyHarmonization:
streamlit run apps/topic_harmonization_app.pyBoth apps create local timestamped backups before overwriting an existing workbook.
This repository is released to make the coding procedure inspectable, reproducible, and adaptable. The apps can be reused in other qualitative projects if the coding grammar, workbook schema, and topic labels are adapted to the new research context.
Any reuse, adaptation, redistribution, teaching use, or scholarly use of this app must cite the repository and the associated paper. See CITATION_POLICY.md and CITATION.cff.
Required repository citation:
Dib, M. (2026). Adaptive Manual Coding Application for Qualitative Research. GitHub repository.
Do not commit:
- interview transcripts or participant responses;
coding_interview_base.xlsx;harmonization_interview_base.xlsx;harmonized_interview_base.xlsx;- coder workbooks;
- agreement reports;
- JSONL checkpoints;
- database exports.
Before publishing changes, run:
python3 scripts/privacy_check.pyThis check is a guardrail, not a substitute for human review.