Binder supports Dataverse DOIs for Jupyter Notebooks

268 views
Skip to first unread message

Philip Durbin

unread,
Dec 10, 2019, 1:35:41 PM12/10/19
to dataverse...@googlegroups.com
Don't look now but Jupyter Notebooks can now be launched from Binder using Dataverse DOIs.

To try it out, go to https://mybinder.org and click the dropdown to select "Dataverse DOI". Then type in the DOI of a dataset hosted in an installation of Dataverse and click "Launch" (screenshot 1, attached).

After a while, an instance of Jupyter Lab will appear with the files from the Dataverse dataset (screenshot 2).

From Jupyter Lab you can either open an existing Jupyter Notebook that is one of the files in the Dataverse dataset or you can create a new Jupyter Notebook. (No screenshot. Hmm! Time to upload a Jupyter notebook to the dataset!)

To return to the dataset landing page in Dataverse from Jupyter Lab, click "visit repo" (screenshot 3).

All of this works thanks to the tireless efforts of Kacper Kowalik from the Whole Tale project. He authored the pull request that added the backend support to download the files from Dataverse to repo2docker[1] as well as the pull request to add Dataverse to the dropdown list of DOI providers in the Binder web interface (and all the necessary routing)[2].

To be clear, Dataverse installations are not limited to the installation of Binder at mybinder.org. Rather, Binder is open source and can be installed in your own data center by following their installation guide: https://binderhub.readthedocs.io

Enjoy! Let's do some reproducible science!

Phil

step1-enter-doi.png
step2-jupyter-lab.png
step3-return-to-dataverse.png

Vyacheslav Tikhonov

unread,
Dec 11, 2019, 6:29:23 AM12/11/19
to Dataverse Users Community
Excellent feature! Thanks for sharing this, Philip!

Cheers,
Slava

Sherry Lake

unread,
Dec 12, 2019, 3:47:54 PM12/12/19
to Dataverse Users Community
Can you go from Dataverse to Binder?

Here's an example from CalTech (using customized version of Invenio): https://data.caltech.edu/records/1259
Has a "Binder" button.

--
Sherry

Philip Durbin

unread,
Dec 12, 2019, 5:40:30 PM12/12/19
to dataverse...@googlegroups.com
Unfortunately, it's not currently possible to create to use Dataverse's "external tool" framework to add a Binder button to the "Explore" drop down button.

The reason is that Binder wants URLs with DOIs in the "path" of the URL like this:


Dataverse only supports putting DOIs (or Handles, we haven't forgotten about Handles) in URLs as "query parameters" like this...


... but URLs like that with query parameters are not supported by Binder.

I tried[1] to encourage the Binder developers to allow us to send DOIs as query parameters but that's just not how Binder works. It doesn't fit into the pattern they've already established with two other DOIs providers. I did argue[2] for Handle support also, by the way. As my kids' day care used to say, "You get what you get and you don't get upset!" Again, I am absolutely thrilled that the "path" URLs work. Binder has Dataverse support! Try it, try it!

If anyone out there wants a "Binder" button in Dataverse, the next logical step is to make Dataverse's external tool framework more flexible, to enhance it such that DOIs can be put into the "path" of the URL for external tools. If you want this, please create an issue at https://github.com/IQSS/dataverse/issues

I'd be remiss if I didn't mention a workaround. It wouldn't be a proper "Binder" button under "Explore" on a dataset page but you *could* copy the HTML for a Binder button and add it into a dataset field in Dataverse that support HTML. You would copy and paste something like this:


To me this is not nearly as satisfying as a proper "Explore" button though. :)

Actually, come to think of it, this seems to be exactly what's happening in that CaltechDATA example. It's just a link/button in a description. Should work. Yeah. It does work. I'll attach a screenshot.

I hope this makes sense. Please keep the questions coming!

Thanks,

Phil

p.s. By the way, I created a pull request to add Binder to the list of integrations in the Admin Guide. It hasn't been merged yet and comments are welcome at https://github.com/IQSS/dataverse/pull/6453


--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/638e9d73-d744-4ddf-8a00-df35d359574b%40googlegroups.com.
html-button.png

James Myers

unread,
Dec 13, 2019, 6:51:44 AM12/13/19
to dataverse...@googlegroups.com

Phil,

Would a work-around where there’s a tool with bit of javascript to convert the URL and redirect to Binder work? – similar to existing previewers, but something that would just redirect rather than trying to pull content into its page.

 

-- Jim

Philip Durbin

unread,
Dec 13, 2019, 7:08:09 AM12/13/19
to dataverse...@googlegroups.com
Hi Jim,

Sure, that sounds possible. If you're able to knock together a prototype, I'd love to see it! Maybe it would even allow us to put this "Binderverse" issue through QA: https://github.com/IQSS/dataverse/issues/4714

Thanks,

Phil

Steven McEachern

unread,
Dec 14, 2019, 5:38:03 PM12/14/19
to Dataverse Users Community
Hi All

The “button in Dataverse” is something ADA is VERY interested in. We would be happy to help in this process, and have colleagues working on Binder/JupyterHub projects here who can also be involved.

Phil, I’m a little confused by your screenshot though - I wasn’t sure where the Binder link was on the screenshot?

Cheers
Steve

Philip Durbin

unread,
Dec 15, 2019, 3:01:18 PM12/15/19
to dataverse...@googlegroups.com
Hi Steve,

So far I've put two screenshots of Dataverse in this thread.

In the first screenshot[1], there is no Binder button at all. I was just trying to show that after clicking "Visit Repo" in Binder, you are brought to the dataset in Dataverse (via the dataset's DOI URL). Of course, in our world, we'd probably prefer "Visit Dataset" than "Visit Repo" but from the Binder perspective, they are turning git repos and other repos into running Docker containers using their repo2docker tool. Dataverse is considered a repo provider: https://binderhub.readthedocs.io/en/latest/developer/repoproviders.html

In the second screenshot[1], the button says "launch binder" and I put it at the very end of the dataset description. Dataset owners could start adding buttons like this today if they felt like it. It's not a proper button. It's just an HTML link with the standard "launch binder" image that's been around for years on GitHub and other places. (Binder started by only supporting GitHub, I believe.) As Sherry pointed out, some CalTechDATA datasets have a "launch binder" button/link like this in the dataset description. We can do this in Dataverse too.

I hope this makes sense. I'm glad you're interested in all this and have colleagues working in this space!

Phil

1. https://03826084231816259573.googlegroups.com/attach/377f57e370af2/step3-return-to-dataverse.png?part=0.3&view=1&vt=ANaJVrEkPEof1Jpri4vHdxy6OC7wgrejYRTFx4hZHtcBcZfAh8FI_G45YqApMHJ2knTAyDyw0MXa959puy0CfScjdt8vfBMAapvfMpYnubXZWUqIGTBdvH0

2. https://03826084231816259573.googlegroups.com/attach/52ce2d6b3ec87/html-button.png?part=0.1&view=1&vt=ANaJVrFFzIgVJmBQQ5Jij9Y7cwvCCqjnR3wqvaUH3lLIlo8c83vNbLBeu4RnS_KJKvDNU3o714cAis-eEPJDjFsENkuxDynxtv7Re3LiIiXLN3sxFjiHA4k

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.

Steven McEachern

unread,
Dec 15, 2019, 4:50:01 PM12/15/19
to Dataverse Users Community
Hi Phil

Ok I can see that now. Just a quick heads up that HTML links in the description won’t work for everyone though - we have trouble with them as they return an error with our DOI minting service (when they validate before passing through to Datacite).

Cheers
Steve

Heppler, Michael

unread,
Dec 16, 2019, 9:48:45 AM12/16/19
to dataverse...@googlegroups.com
Steve,

Could you please drop a comment on this GitHub issue,  Publish Dataset - Fails when metadata contains HTML entities w/special characters such as   #3328, outlining the error you are seeing from HTML in the description metadata when publishing datasets and creating DOI's with DataCite.

There have been some community conversations in this user group, as well as other channels, outlining various use cases that request improvements to how we validate HTML and special characters in metadata fields like the dataset description. We are hoping to collect as much input and feedback on these issues, so that we can start to plan improvements to that area.

If anyone else reading along has similar use cases, feel free to add your comments to that GitHub issue as well.

Thank you.

Mike

---

Michael Heppler
User Interface Designer + Developer, Dataverse Team
Institute for Quantitative Social Science, Harvard University
1737 Cambridge Street, Cambridge, MA 02138
www.iq.harvard.edu


--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.

Volodymyr Kushnarenko

unread,
Feb 19, 2024, 4:19:27 PM2/19/24
to Dataverse Users Community
Dear Philip,
many thanks to all Dataverse team for your great work here with Binder!!
My question - do we have some update 2024 about Handle support by Binder? Or plans, when it could be implemented? Looks like Handles are still not supported, only DOIs work. If I replace DOI with some properly published Handle in the Binder-URL (as in your DOI example "https://mybinder.org/v2/dataverse/10.7910/DVN/TJCLKP/", or even when I reconstruate the pop-up URL from Dataverse after clicking on "Binder-Button" replacing "doi" with "hdl" and replacing all URLs, e.g. for you example - https://girder.hub.yt/api/v1/ythub/dataverse?datasetPid=doi:10.7910/DVN/TJCLKP&siteUrl=https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/TJCLKP), I get in Binder an error "fatal: repository 'some-properly-published-handle' does not exist". To test Handles I tried some Handle-published datasets from https://abacus.library.ubc.ca/.

Many thanks for you reply in advance.
Vladimir

Philip Durbin

unread,
Feb 22, 2024, 12:46:01 PM2/22/24
to dataverse...@googlegroups.com
Hi Vladimir,

As far as I know, Binder still does not support Handles. If you (or anyone else) would like to implement support for Handles, I'd suggest playing around with the lower-level repo2docker code at https://github.com/jupyterhub/repo2docker

Here are the Dataverse-related contributions:


I hope this helps,

Phil

Reply all
Reply to author
Forward
0 new messages