I’ve been brainstorming with a few others on ways to link JupyterHub/BinderHub with a web-based data repository (in this case https://idr.openmicroscopy.org/ though the pattern is useful for other repositories). For example:
- User finds a dataset or item of interest in the repository
- That item is associated with one or more recommended notebooks.
- User clicks a mybinder.org link associated with the item that launches the notebook, configured to run the analysis on the selected item. In the case of IDR this link would be in the right-hand pane of the dataset browser along with other metadata associated with the dataset or image.
Assume the notebook in step 3 is generic and can work with multiple datasets/items- e.g. a notebook to calculate image statistics, or to fetch metadata, can be run on any image. It therefore needs a parameter identifying the image to analyse.
A user can obviously edit the parameter, or jupyter-widgets can be used to request input, but this requires the user to copy and paste an ID from the data browser to the notebook in mybinder.
What would be really nice is to have a way to pass those parameters as a URL query. For example, instead of
pass the image id as:
or perhaps as json to avoid clashing with other params:
These links would be auto-generated for each item.
It’s partly related to what Papermill can do on the CLI, but in the browser. Is the best way to implement this a Jupyter notebook/lab extension, or are there better ways?