Recently, there are more and more journals that allow researchers to publish their data and code. The main aim of these journals is to not only encourage sharing code/data but also provide proper credits to the code writers and data providers. Below, you can find a short list of some of these journals (this list will be gradually completed).
These are the journals that allow researchers to publish their data.
Scientific Data is an open-access, online-only publication for descriptions of scientifically valuable datasets, and exists to help you publish, discover and reuse research data. Scientific Data is open to submissions from a broad range of natural science disciplines, including descriptions of big and small data, from major consortiums and single labs.
These are the journals that allow researchers to publish their code.
SoftwareX aims to acknowledge the impact of software on today's research practice, and on new scientific discoveries in almost all research domains. SoftwareX also aims to stress the importance of the software developers who are, in part, responsible for this impact.