Title: Jupyter Exercise
Course: Learning path for (data) librarians: Technical skills are the bridge to reproducible research

This activity introduces the participants to the basic concepts of the Jupyter notebooks, one of the most popular virtual lab notebook formats today. It guides the participant through the process of using an online service to open an existing notebook, execute its code, and modify it according to set out requirements.

Scenario Setup

A paper that you have been reading has linked to a GitHub repository where among other things a Jupyter notebook is included. Using this notebook the authors have analyzed the underlying raw data and drawn the conclusions outlined in the paper. You are interested to see if re-executing the Jupyter notebook indeed leads to the results discussed by the authors. You would also like to answer some additional questions, thus a slight altering of the notebook is also needed.

Q: Navigate to the demo repository's homepage - https://github.com/Task-4-2/librarian-jupyter-notebook-example.

Use one of the options presented in the "Tasks Assigned to Participants" section to open your personal copy of the Jupyter notebook for editing:

- Using Google Colab, free, but requires a Google Account
- Using Binder, free, no sign up is required
- Using an institutional Jupyter notebook server or any other third-party service providing Jupyter notebook hosting

Execute the existing content in the Jupyter notebook in full. This can be done in one of two ways:

- clicking on each cell and pressing Ctrl+Enter on your keyboard or using the play button in the top toolbar
- using the Run -> Run all cells option from the options menu

After executing the Jupyter notebook, look at the visualization that is outputted from the last code cell.

What is the title of the visualization?
- Number of "Reproducibility Crisis" Records per Year on Zenodo
- Number of "Reproducibility Crisis" Records per Year on GitHub
- Number of "open science" Records per Year on Zenodo
- Number of "Skills4EOSC" Records per Year on Zenodo
- There is no title
A: Number of "Reproducibility Crisis" Records per Year on Zenodo

Q: Navigate to the demo repository's homepage - https://github.com/Task-4-2/librarian-jupyter-notebook-example.

Use one of the options presented in the "Tasks Assigned to Participants" section to open your personal copy of the Jupyter notebook for editing:

- Using Google Colab, free, but requires a Google Account
- Using Binder, free, no sign up is required
- Using an institutional Jupyter notebook server or any other third-party service providing Jupyter notebook hosting

Execute the existing content in the Jupyter notebook in full. This can be done in one of two ways:

- clicking on each cell and pressing Ctrl+Enter on your keyboard or using the play button in the top toolbar
- using the Run -> Run all cells option from the options menu

After executing the Jupyter notebook, look at the visualization that is outputted from the last code cell.

Determine whether the following statement is true:

There have been more records containing the phrase "reproducibility crisis" published in 2023 compared to 2024.
- True
- False
A: True

Q: Navigate to the demo repository's homepage - https://github.com/Task-4-2/librarian-jupyter-notebook-example.

Use one of the options presented in the "Tasks Assigned to Participants" section to open your personal copy of the Jupyter notebook for editing:

- Using Google Colab, free, but requires a Google Account
- Using Binder, free, no sign up is required
- Using an institutional Jupyter notebook server or any other third-party service providing Jupyter notebook hosting

We would like to use the same Jupyter notebook to analyze the trend of Zenodo deposits mentioning "open science".

To do so, we need to do two things:

- change the search query
- change the visualization's title

Modifying the search query

Find the following line in the Jupyter notebook:

# Define the query parameters
params = {
    'q': 'reproducibility crisis',
    'size': 100  # Adjust the size to get more results if needed
}

Change the "reproducibility crisis" text assigned to the "q" parameter to "open science".

Modifying the visualization

Find the following line in the Jupyter notebook:

plt.title('Number of "Reproducibility Crisis" Records per Year on Zenodo')

Alter it so that the title of the visualization refers to open science records.

Executing the notebook

Execute the notebook again from scratch and check if any errors occurred.

Determine whether the following statement is true based on the new visualization:

There are more open science related deposits on Zenodo in 2023 compared to 2024.
- True
- False
A: False