Has anyone come across a way to visualize a notebook’s history? I’d like to take a notebook and show a chart of changes over time binned to, say, the hour.
Edited: To be clear, I’m just looking for a way to pull the data in some structured format. I can make the visualization.
You can’t do it easily from an Observable notebook hosted on observablehq.com since the endpoint requires authentication, but the history of each notebook is available in JSON form by making a GET request to https://api.observablehq.com/document/:id/history where :id is the hash of your notebook.
It may be possible to grab the data that you want from the command-line using https://github.com/mootari/observable-client and then upload that as e.g. a file attachment.
You can also try this experimental API bridge, which offers both a bookmarklet and console command to grant access:
Note that you will have to provide your own
ALLOWED_ROUTES when importing
bridge, in order to grant access to
Thanks for the ideas @mootari and @bgchen. I’ll play around with them this weekend.
I wrote a Getting Started guide for the bridge. Please don’t let it be for naught.