Looking at producing a couple of Binder buttons for a demo repo (
ouseful-demos/choropleth-map-demo) in which I wanted to launch directly into a notebook in one case, a ScriptedForm demo in another, I noticed that there are two variants for launching into MyBinder location:
Via @minrk in the Binder gitter channel:
[B]oth result in different urls when redirecting the user to the running binder.
urlpathis appended unmodified, so that it goes to
filepathis a location of a file in the repo, so
filepath=index.ipynbgets turned into e.g.
hub.mybinder.org/user/xyz/notebooks/index.ipynbto open that file.
urlpathrequires knowledge of the notebook server’s url scheme, but can land you anywhere you like.
filepathdoesn’t require that knowledge, but can do fewer things (e.g. just open a notebook or directory).
Handy, and good to know…