[Please note that while the feeds for this post correctly display the embedding, both Google's feed reader and Bloglines appear to strip out the embedding code - I'll investigate when I can. Meanwhile, if you are reading this on a feed reader, please click through to the permalink.]
I've written before about embedding - and some initial experiments on d8taplex with code for embedding svg graphs, with data drawn from the site, directly into web pages. In further playing with the data, and slowly getting to the point where I can actually start writing about insights in the data itself rather than the site per se, I realised that there was the potential for more subtlety than I had originally thought.
Certainly, I can embed a graph like any other object, thus:
However, just as d8taplex allows you to explore and modify the data (go on, hit the expand button on the graph and find out), by implementing embedding in a certain way, I can programatically get the same effect. The graph below replicates user interactions with the data simply by calling the operations on the graph from the embed code. Here I have selected some of the lines, then removed the unselected lines via the 'keep' command.
In addition, I'd like to be able to embed data, such as the rise in sea level in Liverpool, as a sparkline
. This can all be done over the same data set (the data is cached by the embedding mechanism and subsequent uses of the same data set are pulled from the cache).
I can even embed the fully interactive version of the data (each version is described by a simple tag) inline. Hit the 'smooth' button, then the 'hide' button to get to an altered version of the data with smoothed instead of original values.
What I'd like to explore with this is ways in which the data can be more closely woven with the discourse and still interactive so that readers can poke around themselves.