Sharing research-related codes and datasets: Split them, or share them together on a single platform? I want to share both (1) programming codes and (2) datasets related to a research project.
While I know some suitable platforms superficially, I cannot gauge their pros and cons in too much depth because I lack experience. (In addition, many of their &quot;About Us&quot;-pages are not overly informative.) This is what I am aware of:
First, as regards codes, it seems that the best platform would be GitHub. They have a large audience of coders and they inhere a version control system to ensure transparent collaboration.
Second, as regards science-related datasets, it seems that Open Science Framework (OSF), Zenodo, Dryad, and Figshare are among the best options. They assign DOIs, automatically link your profile to ORCID, adhere to highly trusted Open Science principles (e.g. C0PE), and are non-profit community-driven platforms. (I would oppose them to, say, Mendeley Data which belongs to a large commercial publisher.)
Now I wonder the following:
If I want to publish a paper and share both its codes and datasets, what would be the best approach?
(a) Should I split them by sharing the code on GitHub and sharing the datasets on, say, OSF?
(b) Should I share both codes and datasets on one single platform? If so, which criteria could I use before choosing the right platform?
Each platform has its uses, so it's best to use both GitHub for your code and a scientific data archival repository, such as Zenodo, for your code and data.
GitHub allows you to share your code in a manner that encourages collaboration through stars, issues, forks, pull requests, and notifications.  So definitely put a copy of your code there.  However, GitHub isn't designed to ensure the permanence of the hosted repositories. For example, one can always entirely remove a repository through GitHub's interface and also delete or modify old code with a Git force push.  In the longer term, we can't know that the company controlling GitHub (it used to be GitHub, now it's Microsoft) will continue to operate it in a way that serves science.  Consider how many corporate products and services have disappeared or changed tack over the past twenty years, even things coming out of large established companies, such as Google (check this list) or Sun Microsystems after it got acquired by Oracle (Java and Solaris licensing).
Consequently, for a better guarantee of your work's permanence and availability to future scientists you should also put your data and code on a scientific data repository, such as Zenodo.  This will associate a DOI with your deposited artifacts, which will permanently link to the corresponding version.  (Once you upload something to Zenodo, there's almost no possibility to undo the action.)  GitHub and Zenodo even offer you the ability to archive a specific GitHub version to Zenodo.
If the volume of the data is large or it is likely to be often used on its own, then split it from the code, and upload each on Zenodo as a separate dataset.  Zenodo allows you to link the two (and also the GitHub repository) with the &quot;Related Identifiers&quot; metadata.  You can use the Compiles and Compiled by identifiers for linking code with data, and the Supplement to identifier to link your GitHub repository.
For an example of a split associated with a large dataset consider this dataset regarding the lifetime of code lines (3.7GB), the associated software, and the software's GitHub repository. For example of a split associated with an independently usable dataset consider this list of repositories created by enterprises and the associated replication package.
If the volume of the data is modest, it's fine (or perhaps better) to combine the two in a single Zenodo upload, as is the case in this package regarding the completion of Wikipedia links.