{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "extensions": { "jupyter_dashboards": { "version": 1, "views": { "grid_default": { "col": 0, "height": 4, "hidden": false, "row": 0, "width": 4 }, "report_default": { "hidden": false } } } }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "import pandas as pd \n", "import plotly.express as px\n", "import pygal as pg\n", "from string import Template\n", "from IPython.core.display import display, HTML\n", "\n", "%load_ext cypher\n", "%config CypherMagic.uri='http://neo4j:neo@localhost:7474/db/data'" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "from IPython.display import HTML, Javascript, display\n", "\n", "def configure_d3():\n", " \"\"\"Tell require where to get d3 from in `require(['d3'])`\"\"\"\n", " display(Javascript(\"\"\"\n", " require.config({ \n", " paths: {\n", " lodash: \"https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min\", \n", " d3: \"https://d3js.org/d3.v4.min\"\n", " }\n", " })\"\"\"))\n", "\n", "\n", "configure_d3()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "base_html = \"\"\"\n", "\n", "\n", "
\n", " \n", " \n", " \n", " \n", "