hi folks Yifan here today i'll be talking to you about b2 bridging code and interactive
visualization in computational notebooks. This work is done with joe and arvind. Data scientists
have embraced the computational notebook as their preferred medium of data exploration. Here they can
write code, they can create visualizations, and they can write down their thoughts.
on the other hand visual analytic dashboards offer very convenient interactive exploration
but does not allow the same amount of flexibility as programming. We asked a question of how to bring
together the best of both worlds. In the process we overcame three gaps and built bridges between
these two mediums. The first is a layout gap. As we can see here the notebook offers a very convenient
way to weave together code and visualizations, however it could be difficult for interactive
visualizations that need a very compact view to coordinate these multiple visualizations
to bridge this gap b2 augments the notebook with the dashboard view and code executed in
the cells could create visualizations and the dashboard could be toggled and resized
not only could code on the left hand side control the dashboard to the right
the dashboard could also be used to navigate to the relevant code on the left hand side. The second
is a semantic gap. Despite the fact that the user has specified the queries and encodings for the
static visualizations it still takes a lot more effort to create the interactive visualization
on the other hand, the work done in the interactive visualizations cannot be translated into code land
to help bridge this gap we can use methods in data lineage. Consider two queries that specifies two
static visualizations. If we want to synthesize the filtering effect, what we can do is to take
a look at the the data that corresponds to these queries and then we can trace how these rows were
derived from the original tables and then this way when we have this specific row that is selected
we can use that to trace back to the original tables and then rederive the new filtered values
this way we can even create queries that are used to create the result. The method of data lineage
allows us to synthesize interactive visualizations from data frame queries and we can capture the
selections in code to the left. So that was an example of going from code to interactive
visualizations. Now we'll show the other direction here we're able to capture the code form of the
result of that selection and as we can see, if we execute the query we're able to get back the exact
underlying data representing the selected results. Third and last is the temporal gap. In a notebook
cell executions are persistent which is great for reproducibility. However interactive visualizations
interactions are transient which is really great for exploration without creating a lot of clutter
in order to support both mediums we need a way to coordinate these
different behaviors one temporal bridge we built is that interactions are reified into code
with care to fold the past interactions so that it doesn't clutter up the notebook. We're able
to also uncomment these past interactions and re-execute the code to replay past interactions
furthermore, these transient to visualization states can also be captured into the notebook
this way even when b2 is not active the user is still able to view their prior results
additionally we're able to endow persistent cells with a property of transience by making
it interactive via the reactive cell magic plus b2 apis. This way the user is able to create their own
mini custom interactive applications just with a few simple commands. To evaluate b2 we conducted
a first use study with seven participants the session started with a 20-minute tutorial followed
by two specific tasks and one open end exploration on the data set of berkeley police calling data
we visualized the actions that the participants had taken the x-axis indicates time and the y-axis
indicates which participant. As we can see here the dark blue ticks which represents the selections
with the visualizations are scattered between coding. One participant said that b2 spared them of
tedious commands and made that exploration super easy. Another observation we made is that the participants
often utilize the bridges to cross between the two mediums. For instance one of them said that
the ability to access the code and data format of charts are really important for sharing
and another one of them said that the reification of interactions into code really helps them pick
up context after a pause and a break. That was a quick tour of b2 please refer to the paper
for more details in our methods and the user studies. I'm happy to take questions. Thank you!