Sharing your research syntax and code is an essential practice for further advancing reproducibility and encouraging collaboration. Whether you are working with SPSS, Stata, R, or other programming languages, sharing your syntax and code allows other researchers to:

  • Better understand and replicate your results.
  • Use existing open-source resources for their research.
  • Reduce analysis time and duplication.

If you have worked with social science data and created code or syntax that supports your research, you can share it with the research community through the ReShare repository. ReShare was originally established to support Economic and Social Research Council (ESRC) grant holders, but now it welcomes data, code, and syntax from all researchers in line with the UK Data Service Collections Development Policy (PDF). ReShare ensures that your contributions are visible, accessible, and reusable by the broader research community.

To ensure your syntax/code is clear, reproducible, and easy for others to use, please consider best practices such as:

  • Providing clear documentation.

Include a ReadMe file that explains the purpose of the code, how to run it, and any prerequisites. Within the syntax/code files, add comments to clarify logic and key steps, making it easier for others to understand. Ensure you specify any dependencies (for example, libraries or software versions). If your code relies on data which you do not own, ensure that you fully cite the data and include instructions on how to obtain it.

  • Removing personal and/or sensitive information.

Ensure that no personal or sensitive data is included in the code or comments. Always check that passwords, API keys, and other confidential information are not hardcoded in the syntax/code file.

Once we receive your code/syntax collection we carry out checks to ensure:

  • Sufficient descriptive metadata has been provided.
  • The full citation, including DOIs, of the dataset(s) used is included in the syntax/code file.
  • Supporting documentation such as a ReadMe file has been included.
  • There are no confidentiality concerns, e.g. comments do not include any personal/sensitive information, plus there are no references to individual observations.

If you would like more information on sharing code, please get in touch via our online form.