Skip to content
PlagiatScanner.de
Research data · DAT-13

Should analysis code go in an appendix or a repository?

A short, self-contained script can work well as a readable appendix. Choose a repository when the analysis spans several files, dependencies, versions or executable stages. Confidential data, credentials and non-distributable components belong in neither public location. Publish a sanitised package and metadata, or use controlled access. The decisive questions are what must be verified, how large the package is, whether it can be cited durably and what needs protection.

Publication decision matrixReviewed 4 September 2026

Define what the code is meant to demonstrate

Analysis code can serve three distinct purposes. It can show how a particular claim was derived, allow a technical re-run, or become a reusable research output. A PDF appendix mainly supports the first. A versioned, archived repository can support all three. Before choosing a location, write down the intended test: should an examiner inspect a handful of commands, regenerate the complete result, or adapt the workflow to new data?

Whichever location you choose, the dissertation must point to the code precisely. State the filename, version and relevant section. A bare footnote URL is weak evidence because the destination may change, access may disappear and the exact assessed revision remains ambiguous.

When an appendix is the clearest option

An appendix suits compact scripts that make sense without a larger file tree and will be archived with the thesis. It is immediately available to examiners, follows the same citation logic as the document and can be numbered precisely. Small calculations, coding rules and queries that substantiate one central table are particularly good candidates.

The limitations are execution and maintenance. Line wrapping, hyphenation and typographic quotation marks can corrupt code. Hundreds of pages can also obscure more useful supporting material. Print only the explanatory core in a legible monospaced format and submit the original plain-text file where permitted. Do not fill the appendix with automatically generated libraries or lengthy output.

What a repository adds

A repository can keep structure, history, documentation, tests and environment specifications together. Cite a fixed release or commit rather than the moving head of the main branch. Where appropriate, preserve the release in a long-term archive with a DOI or another persistent identifier. GitHub documents citation files and releases, while Zenodo describes how released versions can be archived.

Public reuse also needs a licence. Code that is visible online is not automatically licensed for reuse. Treat the software, data and narrative documentation separately where rights differ. A useful README explains scope, prerequisites, installation, one clear start command, inputs, outputs, authorship and known limitations.

Confidentiality comes before convenience

Review the complete version history, not only the current files. Deleted tokens, internal host names, personal file paths and old datasets may survive in earlier commits. Use test fixtures or synthetic examples when real research data cannot be shared. Put placeholders in a documented example configuration and keep credentials outside version control.

Code may itself reveal small groups, collection sites or sensitive exclusion decisions. Where that risk is material, an institutional archive with an embargo or controlled access may be appropriate. Provide public metadata stating what is withheld, why, and how a legitimate reviewer can request access. This guide offers general publication information, not legal or data-protection advice.

Authority asset: scale and confidentiality matrix

Choose a location for analysis code
SituationUseful locationAdditional evidence
One short, self-contained scriptReadable appendixFilename and unchanged text file
Several modules and dependenciesVersioned repositoryRelease, README and lockfile
Long-term reuse intendedRepository plus archivePersistent identifier and licence
Restricted data, shareable codeSanitised public packageSynthetic example and access statement
Code exposes sensitive detailsControlled accessPublic metadata and rationale

The minimum package for an inspectable submission

  1. Fix the submitted state as a release or identified commit.
  2. Order scripts by execution and identify one entry point.
  3. Describe software versions, dependencies and installation.
  4. Separate raw input, intermediate data and generated outputs.
  5. Add a licence, preferred citation and contact route.
  6. Test the package in a clean folder and log the result.

Cite the specific revision rather than the hosting platform in general. Depending on the required style, the record can contain creators, title, year, version, archive, DOI or URL and access date. Our guide to citing a GitHub repository works through the identifiers.

A hybrid often gives the strongest evidence

The choice need not be exclusive. A short key excerpt in the appendix can keep the argument intelligible, while the repository carries the complete executable package. Both should identify the same release. This preserves immediate readability without forcing a working codebase into a printed layout. Finally, test all public links from a signed-out browser and archive the revision that the thesis actually cites.

Keep a small manifest listing each submitted item, its purpose and checksum. If the institution accepts supplementary files separately, include their filenames in the thesis and deposit record. A reader should never need to guess whether “analysis_final2” or the repository main branch produced the table under discussion.

Official sources

  1. GitHub Docs: citation files – official support for machine-readable citation metadata.
  2. GitHub Docs: releases – identified bundles and tags.
  3. Zenodo: GitHub integration – preserving released versions in an archive.