jupyterhub / mybinder.org-user-guide

Turn a Git repo into a collection of interactive notebooks. This is Binder's user documentation repository.
https://mybinder.readthedocs.io
BSD 3-Clause "New" or "Revised" License
159 stars 103 forks source link

Have badges showing usage numbers #141

Open deeplook opened 5 years ago

deeplook commented 5 years ago

Would it be possible to have badges indicating the number of builds and/or launches etc. for a given repository? Something along the lines of https://shields.io/#/examples/build.

yuvipanda commented 5 years ago

This would be awesome to do. For mybinder.org, we'd need to have some way to process & store https://archive.analytics.mybinder.org/, and dynamically generate the badges from there. This use case is the one I specifically had in mind when building the analytics setup...

choldgraf commented 5 years ago

@yuvipanda could we have another page like https://statistics.analytics.mybinder.org/ that would contain data-dumps of the latest statistics of interest? E.g. we could have one continuously-updated dataset of "the total number of launches for each unique repository". This wouldn't be kept in a historical fashion, it'd just be updated daily.

betatim commented 5 years ago

How do shields inject the number of launches? We can put JS into a SVG and fetch (a to be created file) called https://statistics.analytics.mybinder.org/<orgname>.json which contains the daily launch counts for all repos in the organisation as Chris suggested?

yuvipanda commented 5 years ago

@choldgraf yeah, that's something I'd love to do - 'derived analytics', ideally just at analytics.mybinder.org. The way I am thinking we might do this is to use something like papermill, write our analytics code in notebooks, and find some way to schedule run them every day or so.

Or maybe we can do something simpler and just run them as scripts, same way we do now for the archiver.

betatim commented 5 years ago

What about extending the archiver to have a cronjob that creates the daily summary (either a script or a notebook via papermill)?

yuvipanda commented 5 years ago

@betatim the archiver already runs in a similar fashion, so we could totally do that. We can just extend the archiver.