WHAT ARE WE TALKING ABOUT?

Open analysis code means providing the analysis code along with the belonging open data and thereby making the open data repeatable and reusable. At the best, this includes all scripts used for data processing as well as statistical analyses and other codes (simulations, etc.).

Even in cases of non-open access data, related open analysis code makes conducted analyses still more transparent.



CONTENT OF OPEN ANALYSIS CODE

The open analysis code provides all conducted analysis steps including data processing, statistical analysis and other code (simulations, etc.). The code is commented in the code files to make it understandable and transparent and reproduceable to others.

Criteria to make data analysis reproducible:

  • data & metadata are available
  • code & usage are transparent
  • code is installable
  • runtime environment is reproduceable



DETAILED ASPECTS TO CREATE REPRODUCIBLE CODE

To make open analysis code reproduceable the following aspects should be considered in detail:

  • Choosing a coherent and informative naming system for the folders, files and projects.
  • Choosing a consistent coding and consistent script style.
  • Always comment the analysis code.
  • Recording the used packages and software.
  • Publishing the open analysis code along the belonging open data on an open access online-repository.

In addition, following aspects can be considered to be set up in addition to the analysis code:

  • Considering a version control repository to keep track of the changes made in the code over time.
  • Providing a README file on the respiratory to describe the project and details on the workflow around the project files.
  • Attaching a LICENSE file, which is an explicit statement that grants certain uses of work, defining how people are allowed to reuse the analysis code. How version control, README file and LICENSE file can be set up: The British Ecological Society (2017). A guide to reproducible code in ecology and evolution. Report available here


ETHICAL BARRIERS

To protect privacy, always be aware to anonymize your data and code.

@students: Always talk to your responsible professor, lecturer and/ or supervisor about ethical barriers in open data and open code. Please do not provide data or code online without talking to your responsible professor, lecturer and/ or supervisor!



CHECK YOUR CODE FOR REPRODUCIBILITY

 


EXAMPLES

Note: These examples are intentionally kept simple to demonstrate the basics of creating reproduceable code.

1. How a simple and informative file structure for folders and files can look like:

 
2. A consistent script style can look like:

 

3. A consistent coding style should look like:

 
 
 


REFERENCES AND FURTHER INFORMATION

 
...and sources of the figures:
 
  • The British Ecological Society (2017). A guide to reproducible code in ecology and evolution. Report available here
  • Open Science Initiative der WWU Münster (2018). Informations- und Lösungsmodule: Reproducible Codes. Adapted from https://osf.io/zc24b/


The section on licensing might also be relevant in the context of Open Analysis Code.

Last modified: Sunday, 30 March 2025, 6:57 PM