{"id":50323040,"url":"https://github.com/arnim/stm-methodshub-tutorial","last_synced_at":"2026-05-29T04:01:47.387Z","repository":{"id":348114530,"uuid":"1196560033","full_name":"arnim/stm-methodshub-tutorial","owner":"arnim","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-30T21:21:06.000Z","size":51114,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-30T22:15:12.872Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arnim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-30T20:19:13.000Z","updated_at":"2026-03-30T21:21:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/arnim/stm-methodshub-tutorial","commit_stats":null,"previous_names":["arnim/stm-methodshub-tutorial"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/arnim/stm-methodshub-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnim%2Fstm-methodshub-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnim%2Fstm-methodshub-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnim%2Fstm-methodshub-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnim%2Fstm-methodshub-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arnim","download_url":"https://codeload.github.com/arnim/stm-methodshub-tutorial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnim%2Fstm-methodshub-tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33635961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-29T04:01:44.004Z","updated_at":"2026-05-29T04:01:47.375Z","avatar_url":"https://github.com/arnim.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Structured Topic Modeling of UN General Debate Speeches in R\n\n[![Launch on Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/arnim/stm-methodshub-tutorial/main?labpath=stm_un_tutorial.ipynb)\n[![Jupyter4NFDI](https://nfdi-jupyter.de/images/jupyter4nfdi_badge.svg)](https://hub.nfdi-jupyter.de/v2/gh/arnim/stm-methodshub-tutorial/main?labpath=stm_un_tutorial.ipynb)\n\nThis repository contains a Methods Hub-style Jupyter notebook tutorial for **Structured Topic Models (STM)** in **R** using **IRkernel**.\n\n## Tutorial source file\n\n- `stm_un_tutorial.ipynb`\n\n## What this tutorial does\n\nThe tutorial closely follows the original notebook in `arnim/stmdemo`:\n- source notebook: \u003chttps://github.com/arnim/stmdemo/blob/master/un-stm.ipynb\u003e\n\nIt uses:\n- the **same dataset** (`UNgeneraldebate.corpus.RData`)\n- the **same pre-fitted STM model** (`UNgeneraldebate.stm.RData`)\n- the **same topic parametrization** (`K = 40`)\n\nThe tutorial is based on the original UN General Debate Corpus release used in the source notebook. For readers looking for the dataset record today, the persistent Harvard Dataverse DOI is:\n- \u003chttps://doi.org/10.7910/DVN/0TJX8Y\u003e\n\nThis DOI refers to the same original dataset record first published in 2017, but it now resolves to newer updated versions of the corpus. So it is the same dataset lineage / persistent identifier, not necessarily the exact same file version originally used in the notebook.\n\nThe only substantive code update is a small preprocessing change required for compatibility with current versions of `quanteda`.\n\n## Repository structure\n\n- `stm_un_tutorial.ipynb` – tutorial notebook\n- `data/` – data files used by the tutorial\n- `binder/` – Binder and Methods Hub execution files\n- `renv.lock` – local R environment lockfile\n- `renv/` – project-local `renv` infrastructure\n\n## Reproducibility\n\n### Local with renv\n\nOpen the project in R and run:\n\n```r\nrenv::restore()\n```\n\nTo register the R Jupyter kernel locally if needed:\n\n```r\nIRkernel::installspec(user = TRUE, name = \"ir-renv\", displayname = \"R (renv IRkernel)\")\n```\n\n### Binder / Methods Hub\n\nThe repository includes:\n- `binder/runtime.txt`\n- `binder/install.R`\n- `binder/postBuild`\n\nThese files follow the Methods Hub tutorial guidelines:\n\u003chttps://github.com/GESIS-Methods-Hub/guidelines-for-tutorials\u003e\n\n## Rendering / execution\n\nIf Quarto is available, the notebook can be rendered with:\n\n```bash\nquarto render stm_un_tutorial.ipynb --execute\n```\n\nOr executed with Jupyter:\n\n```bash\njupyter nbconvert --to notebook --execute --inplace stm_un_tutorial.ipynb\n```\n\n## License\n\nMIT License. See `LICENSE`.\n\n## Citation\n\nSee `CITATION.cff`.\n\n## Acknowledgment\n\nParts of this tutorial repository were prepared with assistance from the [pi coding agent](https://shittycodingagent.ai) using OpenAI GPT-5.4. Final review and responsibility remain with the author.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnim%2Fstm-methodshub-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnim%2Fstm-methodshub-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnim%2Fstm-methodshub-tutorial/lists"}