Doing reproducible science with Jupyter
- Jupyter is an open-source project that allows you to create and share documents that contain live code, equations, visualizations, and narrative text.
- The name “Jupyter” is a combination of Julia, Python, and R, the three programming languages initially supported by Jupyter.
- It is also a way to cooperate with other scientists with a shared document.
- Jupyter follows a philosophy of open and reproducible science. In a time when lots of manipulations and calculations are done with data, it is good to be transparent about what is being done and let the person him/herself redo your process step by step.
- In a certain sense, it is also a logbook to be kept by a scientist, remembering that this was always a common practice in science.
Exercise: creating your own Jupyter notebook
- You can follow any tutorial and try to create your own scientific notebook in Jupyter.
- A shortcut would be using JupyterLab on your own browser.
- Generate some random data and try to create a visualization of that using matplotlib or plotly.
- For example, you can use toy datasets in sklearn.datasets,
- Use any kind of plot you find interesting
- Customize the plot:
- Change the color and style of the plot elements (lines, markers, etc.).
- Add labels to the x-axis and y-axis.
- Add a title to the plot.
- Customize the ticks and grid lines.
- Add annotations or text to the plot.
- Adjust the size and aspect ratio of the plot.
- Lists of interesting Jupyter notebooks and demonstrations can be found here and here.
Some reflection…
- What are the virtues of reproducibility and transparency?
- Does reproducibility play a role in determining the truth or validity of a scientific finding?
- Is there an obligation for scientists to ensure that their research is reproducible?
- What are the implications of publishing non-reproducible results?
- Should funding agencies, journals, and scientific institutions implement policies to promote reproducibility, such as requiring data and code sharing?
Some recent reflection on trust and reproducibility in science and their relation to christianity: Josh A. Reeves, Redeeming Expertise.