Share this page:

Citing Open Code

To comply with good research practice, it is essential to correctly cite the ideas and work of others. In a scientific context, this naturally also applies to code (and software). Citing code also ensures that the creation of Open Code is appropriately recognised. You should therefore generally cite code developed by yourself or provided by third parties that has made an important contribution to your research work, provided that it has been published accordingly. Just like code, you can of course cite software that you use in your research.

If you cite code or software, you should include at least the following:

  • the name of the author,
  • the title of the software or code,
  • the version number, the publication date and the unique identifier (PID).

 

Dekoratives Element // Decorative element

 

Platforms such as Zenodo already offer a suggestion for a citation. In practice, an example of a citation looks like this:

Lars Vilhuber. (2024). AEADataEditor/docker-aer-2023-0700: Docker image for software stack used in AER-2023-0700. In American Economic Review (Version v20240429). AEA Data Editor. https://doi.org/10.5281/zenodo.11094339

or so:

Karbownik, K., & Wray, A. (2022). Replication package for “Lifetime and intergenerational consequences of poor childhood health” (1.0). Zenodo. https://doi.org/10.5281/zenodo.7117307 

Ideally, as can be seen in the examples, you have a PID, for example in the form of a DOI, which you can use. You should also bear this in mind if you publish code yourself.

If you use a code repository such as GitHub or GibLab, the URL structure allows you to refer to a specific version or a specific release.

For GitHub, the citation to a version (referred to here as a commit) would look like this, for example:

OpenSourceEconomics. (2024). estimagic (Commit f430f807cebcb3ce71265a24fe6936db1b821faf) [Source code]. GitHub. https://github.com/OpenSourceEconomics/estimagic/commit/f430f807cebcb3ce71265a24fe6936db1b821faf

or to a specific release (referred to here as a tag):

OpenSourceEconomics. (2023). estimagic (Tag 0.4.6) [Source code]. GitHub. https://github.com/OpenSourceEconomics/estimagic/tree/v0.4.6

Of course, it is also possible for authors to leave information on correct citation, for example in a README file.

Further information on basic principles for citing code or software can also be found in the FORCE 11 Software Citation Principles.

Tip: Cite your own code where possible.