Research data and code are central to scientific discovery. Sharing these outputs can accelerate research, creating opportunities for the scientific community to make new insights and discoveries faster. In this blog, we¡¯ll explore why sharing your code benefits you and others, how we support you in making your code available, and the steps you can take.
Research data and code are key elements of science. It¡¯s an inherent principle that researchers should be able to replicate and build on an authors¡¯ published claims (including their own work). Where code or mathematical algorithms have been a central part of the results described in a research article, it¡¯s important to make these available in trusted repositories, such as Code Ocean or Zenodo, that assign a permanent identifier. It should also be cited in your reference list, helping both reviewers and other researchers to assess, replicate, and build on those studies.
This practice isn¡¯t just integral to scientific, technical or medical research: quantitative research in the Social Sciences increasingly relies on new datasets and code. Additionally, it's not only essential for research published in journals: primary research described in books or chapters, where code has been used to generate results or support claims, is also important to share.
Our State of Open Data report and continue to show that researchers need more support with code and data sharing. Our open science policies are designed to make it easier for you to share outputs, including our unified policy for journals and books on code sharing. The policy encourages code to be as open as possible, recognising that in some cases, there may be reasons that the full code cannot be shared.
For journals:
For books:
Sharing code has its challenges. Beyond any technical, legal and commercial restrictions, running complex software on a different machine requires substantial effort and, in many cases, may not be feasible. We¡¯ve developed and a to help authors compile and present code for peer review.
Additionally, our enables authors to share code as part of the manuscript submission process, allowing for a more seamless experience to code sharing for peer review and publication, and giving you additional technical support. Using this service not only increases transparency but also helps peer reviewers verify what they are reviewing. Editorial support?is also available, with editors on hand to assist you in understanding and navigating our code-sharing policy.
For journals that offer code sharing, we can see that combining policy and technical support has been highly effective in helping researchers share their code. Nature Computational Science has had a 100% code sharing compliance since 2021 (when it launched). Code is required during peer review, and the journal also encourages public sharing in a repository on publication. Our integration of Code Ocean into the submission process, along with proactive and passionate support from our editors, has helped authors to navigate their open science needs. As a result, every single primary research article published in the journal since launch provides a code availability statement and all?share their code publicly, cite it, and have a permanent identifier.
Nature Machine Intelligence also encourages re-use of existing code via the . The reusability report explores alternative uses of previously published code in the context of a new dataset or new scientific application.
Code sharing is not only best practice but an opportunity to drive reproducibility, collaboration, and trust in science, ultimately benefiting both the scientific community and society at large. To effectively support code sharing, here are a few key principles to consider:
- Don't miss the latest news and blogs, sign up to The Source Monthly Digest! -