Skip to content

Commit 5446b07

Browse files
Release v0.9.5: reproducible Colab-from-GitHub notebook + pinned online version
- On Colab the notebook now self-installs: it clones the pinned release tag (v0.9.5) into a tag-specific folder and verifies the checkout is exactly that tag before importing, so the online notebook and the function/ package always come from the same version. This is a no-op outside Colab (local runs unaffected). - Point the Open-in-Colab badge and links (README, paper, notebook) at the pinned tag so the online version is reproducible rather than tracking a moving branch. - Add a note for users importing from ATLAS.ti / NVivo / MAXQDA (CMAP QDPX Converter). - Widen supported torch to <2.9 so it runs on the current Colab torch (2.8). - Add CITATION.cff.
1 parent 2b5da49 commit 5446b07

6 files changed

Lines changed: 90 additions & 7 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ __marimo__/
148148
!README.md
149149
!visualization_toolkit_final.ipynb
150150
!LICENSE.md
151+
!CITATION.cff
151152
# PNG files are now ignored
152153
*.png
153154
!environment.yml

CITATION.cff

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
title: "CMAP Visualization Toolkit"
4+
type: software
5+
authors:
6+
- family-names: "Abramson"
7+
given-names: "Corey M."
8+
affiliation: "Rice University"
9+
- family-names: "Nian"
10+
given-names: "Yuhan (Victoria)"
11+
affiliation: "Rice University"
12+
version: "0.9.5"
13+
date-released: "2026-07-18"
14+
doi: "10.5281/zenodo.17162829"
15+
license: "BSD-3-Clause"
16+
repository-code: "https://github.com/Computational-Ethnography-Lab/cmap_visualization_toolkit"
17+
url: "https://github.com/Computational-Ethnography-Lab/cmap_visualization_toolkit"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
An easy-to-use toolkit for visualizing patterns in qualitative data, helping researchers see and share connections between words, concepts and themes alongside in-depth accounts.
44

5-
[![GitHub release](https://img.shields.io/github/v/release/Computational-Ethnography-Lab/cmap_visualization_toolkit?include_prereleases)](https://github.com/Computational-Ethnography-Lab/cmap_visualization_toolkit/releases)
5+
[![GitHub release](https://img.shields.io/github/v/release/Computational-Ethnography-Lab/cmap_visualization_toolkit?include_prereleases)](https://github.com/Computational-Ethnography-Lab/cmap_visualization_toolkit/releases) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Computational-Ethnography-Lab/cmap_visualization_toolkit/blob/v0.9.5/visualization_toolkit_final.ipynb)
66

77
## Table of Contents
88
- [Overview](#overview)
@@ -44,7 +44,7 @@ Coming from ATLAS.ti, NVivo, or MAXQDA? The [CMAP QDPX Converter](https://github
4444

4545
### Notebook Version & Local Installation
4646

47-
For an introduction, in an easy to use online version (not for sensitive data) check out the collab version [here](https://colab.research.google.com/drive/1n90EDMSiXhIaOULUMPJ4W4hqdZCh1NQw?usp=sharing)
47+
For an introduction, in an easy to use online version (not for sensitive data) check out the Colab version [here](https://colab.research.google.com/github/Computational-Ethnography-Lab/cmap_visualization_toolkit/blob/v0.9.5/visualization_toolkit_final.ipynb) — it opens the current notebook straight from this repo and self-installs on first run.
4848
You can find a short tutorial on using the toolkit in collab [here](https://vimeo.com/1122226315)). You can read a general description in the working paper [here](https://github.com/Computational-Ethnography-Lab/cmap_visualization_toolkit/blob/main/documentation/paper.md).
4949
---
5050

documentation/paper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The main paper charts organization and functions. Full mathematical details, rel
6161

6262

6363
# CMAP Organization
64-
CMAP can be run in either a Jupyter environment [via Github](https://github.com/Computational-Ethnography-Lab/cmap_visualization_toolkit.git) or Google Colab [Colab Link](https://colab.research.google.com/drive/1n90EDMSiXhIaOULUMPJ4W4hqdZCh1NQw?authuser=1#scrollTo=1jgH13I3xLbA&uniqifier=1).
64+
CMAP can be run in either a Jupyter environment [via Github](https://github.com/Computational-Ethnography-Lab/cmap_visualization_toolkit.git) or Google Colab [Colab Link](https://colab.research.google.com/github/Computational-Ethnography-Lab/cmap_visualization_toolkit/blob/v0.9.5/visualization_toolkit_final.ipynb).
6565
Colab is recommended for learning the methods and experimenting with public datasets. For sensitive data or extended development, users can clone the GitHub repository and run the included installation script locally.
6666

6767
```bash

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dash>=2.10,<3
1313
jupyter
1414
sentence-transformers>=2.2,<3.6
1515
transformers>=4.36,<5.1
16-
torch>=2.1,<2.8
16+
torch>=2.1,<2.9
1717
wordcloud>=1.9,<2
1818
tqdm>=4.65,<5
1919
joblib>=1.2,<2

visualization_toolkit_final.ipynb

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
"source": [
88
"# Visualization Toolkit Usage Guide\n",
99
"\n",
10-
"A suite of semantic-analysis and visualization tools for word-level patterns in qualitative text data — word clouds, t-SNE semantic maps, word/code heatmaps, and semantic networks. An annotated online version is on [Colab](https://colab.research.google.com/drive/1n90EDMSiXhIaOULUMPJ4W4hqdZCh1NQw?usp=sharing) (not for sensitive data); see also the [video tutorial](https://vimeo.com/1122226315) and the [working-paper description](https://github.com/Computational-Ethnography-Lab/cmap_visualization_toolkit/blob/main/documentation/paper.md).\n",
10+
"A suite of semantic-analysis and visualization tools for word-level patterns in qualitative text data — word clouds, t-SNE semantic maps, word/code heatmaps, and semantic networks. An annotated online version is on [Colab](https://colab.research.google.com/github/Computational-Ethnography-Lab/cmap_visualization_toolkit/blob/v0.9.5/visualization_toolkit_final.ipynb) (not for sensitive data); see also the [video tutorial](https://vimeo.com/1122226315) and the [working-paper description](https://github.com/Computational-Ethnography-Lab/cmap_visualization_toolkit/blob/main/documentation/paper.md).\n",
1111
"\n",
1212
"**Full documentation — install, usage, data schema, design notes, license — is in the [README](https://github.com/Computational-Ethnography-Lab/cmap_visualization_toolkit#readme).** This notebook is meant to be run top-to-bottom: the **Setup** and **Helper Function** cells are background setup (run them once, in order); then use the **Analytics Tool** sections to generate and customize visuals.\n",
1313
"\n",
1414
"### How to run\n",
15-
"1. **Prepare your data** — a `.csv`/DataFrame with at least a `text` column (optional `project`, `codes`, `data_group` for subsetting). Full schema: [Teaching → Data Schema Example (CMAP)](https://github.com/Computational-Ethnography-Lab/teaching#data-schema-example-cmap).\n",
15+
"1. **Prepare your data** — a `.csv`/DataFrame with at least a `text` column (optional `project`, `codes`, `data_group` for subsetting). Full schema: [Teaching → Data Schema Example (CMAP)](https://github.com/Computational-Ethnography-Lab/teaching#data-schema-example-cmap). Coming from ATLAS.ti, NVivo, or MAXQDA? The [CMAP QDPX Converter](https://github.com/Computational-Ethnography-Lab/cmap_qdpx_converter) turns a QDPX (REFI-QDA) export into the CMAP-schema CSV this toolkit reads — no manual reshaping.\n",
1616
"2. **Run Setup + Helper Functions top-to-bottom** — these load packages, define directories, stopwords / word-families, validators, and the plotting functions.\n",
1717
"3. **Run a tool section** — Basic (word cloud), Intermediate (heatmaps, t-SNE, networks), or Advanced (full / interactive). Edit the user-configuration block at the top of each section.\n",
1818
"\n",
@@ -30,6 +30,71 @@
3030
"Full citation with the Zenodo DOI and contributor list is in the [README](https://github.com/Computational-Ethnography-Lab/cmap_visualization_toolkit#policies). Questions: <corey.abramson@rice.edu>.\n"
3131
]
3232
},
33+
{
34+
"cell_type": "markdown",
35+
"id": "colabsetupmd01",
36+
"metadata": {},
37+
"source": [
38+
"## Colab setup (run first)\n",
39+
"\n",
40+
"Running on **Google Colab**? Run the next cell first — it clones the toolkit repo (for the `function/` modules and the sample `data/data.csv`) and installs the few packages Colab does not ship. It does nothing outside Colab, so a local install is unaffected. Then continue with **Setup** below."
41+
]
42+
},
43+
{
44+
"cell_type": "code",
45+
"execution_count": null,
46+
"id": "colabsetupcode01",
47+
"metadata": {},
48+
"outputs": [],
49+
"source": [
50+
"# =============================================================================\n",
51+
"# COLAB SETUP (RUN FIRST ON COLAB)\n",
52+
"# On Google Colab this clones the toolkit repo so the `function/` package and\n",
53+
"# the sample `data/data.csv` are on disk, then installs the packages Colab does\n",
54+
"# not ship. It is a NO-OP outside Colab, so local (conda / Jupyter) runs are\n",
55+
"# unaffected. Colab's preinstalled torch / transformers / numpy / pandas / scipy\n",
56+
"# / scikit-learn stack is left untouched (avoids a slow, CUDA-breaking downgrade).\n",
57+
"# =============================================================================\n",
58+
"import sys\n",
59+
"import os\n",
60+
"import subprocess\n",
61+
"\n",
62+
"if \"google.colab\" in sys.modules:\n",
63+
" REPO = \"cmap_visualization_toolkit\"\n",
64+
" REPO_URL = \"https://github.com/Computational-Ethnography-Lab/cmap_visualization_toolkit.git\"\n",
65+
" RELEASE_TAG = \"v0.9.5\" # pinned release tag: notebook + function/ come from the same ref\n",
66+
" # Tag-specific checkout dir: a stale main / other-release checkout left in a\n",
67+
" # reused Colab runtime cannot be silently used in place of the pinned tag.\n",
68+
" CHECKOUT = REPO + \"_\" + RELEASE_TAG\n",
69+
" if os.path.basename(os.getcwd()) != CHECKOUT:\n",
70+
" if not os.path.isdir(CHECKOUT):\n",
71+
" subprocess.run([\"git\", \"clone\", \"--branch\", RELEASE_TAG, \"--depth\", \"1\", REPO_URL, CHECKOUT], check=True)\n",
72+
" os.chdir(CHECKOUT)\n",
73+
" # Fail loud if the checkout is not exactly the pinned tag (guards a reused,\n",
74+
" # partial, or wrong-ref directory that would bypass the version pin).\n",
75+
" _on_tag = subprocess.run([\"git\", \"describe\", \"--tags\", \"--exact-match\"],\n",
76+
" capture_output=True, text=True).stdout.strip()\n",
77+
" if _on_tag != RELEASE_TAG:\n",
78+
" raise RuntimeError(\n",
79+
" \"Colab setup: checkout is not at pinned tag \" + RELEASE_TAG +\n",
80+
" \" (got \" + repr(_on_tag) + \"). Delete /content/\" + CHECKOUT + \" and re-run this cell.\"\n",
81+
" )\n",
82+
" sys.path.insert(0, os.getcwd())\n",
83+
" subprocess.run(\n",
84+
" [sys.executable, \"-m\", \"pip\", \"install\", \"-q\",\n",
85+
" \"wordcloud>=1.9,<2\",\n",
86+
" \"sentence-transformers>=2.2,<3.6\",\n",
87+
" \"gensim>=4.3,<5\",\n",
88+
" \"dash>=2.10,<3\",\n",
89+
" \"dill>=0.3.6,<0.4\",\n",
90+
" \"python-dotenv>=0.15,<2\",\n",
91+
" \"pydantic>=1.10,<3\",\n",
92+
" \"nbimporter\"],\n",
93+
" check=True,\n",
94+
" )\n",
95+
" print(\"[OK] Colab setup complete — repo at \" + RELEASE_TAG + \", dependencies installed.\")"
96+
]
97+
},
3398
{
3499
"cell_type": "markdown",
35100
"id": "1316a766",
@@ -167,7 +232,7 @@
167232
" \"sklearn\": \">=1.2,<1.5\",\n",
168233
" \"sentence_transformers\": \">=2.2,<3.6\",\n",
169234
" \"transformers\": \">=4.36,<5.1\",\n",
170-
" \"torch\": \">=2.1,<2.8\",\n",
235+
" \"torch\": \">=2.1,<2.9\",\n",
171236
" \"matplotlib\": \">=3.7,<4\",\n",
172237
" \"seaborn\": \">=0.12,<1\",\n",
173238
" \"networkx\": \">=3,<4\",\n",

0 commit comments

Comments
 (0)