

def _repr_html_(self):
    'Build the HTML representation for IPython.'
    vis_id = str(uuid4()).replace('-', '')
    html = ('<div id="vis%s"></div>\n<script>\n   ( function() {\n     var _do_plot = function() {\n       if (typeof vg === \'undefined\') {\n         window.addEventListener(\'vincent_libs_loaded\', _do_plot)\n         return;\n       }\n       vg.parse.spec(%s, function(chart) {\n         chart({el: "#vis%s"}).update();\n       });\n     };\n     _do_plot();\n   })();\n</script>\n<style>.vega canvas {width: 100%%;}</style>\n        ' % (vis_id, self.to_json(pretty_print=False), vis_id))
    return vis_id

dataset/ETHPy150Open wrobstory/vincent/vincent/visualization.py Visualization._repr_html_/VarMisuse@50/235 `html`->`vis_id`