{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### Overview\n", "Analyze the interdependcies between classes as output from Roaster data. \n", "\n", "This notebook is authored by Paul Bastide. \n", "No warranty. Provided as-is. \n", "\n", "### Documentation\n", "https://networkx.github.io/documentation/networkx-1.9/reference/generated/networkx.drawing.layout.spring_layout.html\n", "https://networkx.github.io/documentation/latest/auto_examples/drawing/plot_unix_email.html " ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Collecting plotly\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/63/2b/4ca10995bfbdefd65c4238f9a2d3fde33705d18dd50914dd13302ec1daf1/plotly-4.1.0-py2.py3-none-any.whl (7.1MB)\n", "\u001b[K |████████████████████████████████| 7.1MB 6.2MB/s eta 0:00:01 |██████████▊ | 2.4MB 636kB/s eta 0:00:08\n", "\u001b[?25hCollecting networkx\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/85/08/f20aef11d4c343b557e5de6b9548761811eb16e438cee3d32b1c66c8566b/networkx-2.3.zip (1.7MB)\n", "\u001b[K |████████████████████████████████| 1.8MB 5.1MB/s eta 0:00:01\n", "\u001b[?25hCollecting retrying>=1.3.3 (from plotly)\n", " Downloading https://files.pythonhosted.org/packages/44/ef/beae4b4ef80902f22e3af073397f079c96969c69b2c7d52a57ea9ae61c9d/retrying-1.3.3.tar.gz\n", "Requirement already satisfied: six in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from plotly) (1.12.0)\n", "Requirement already satisfied: decorator>=4.3.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from networkx) (4.3.0)\n", "Installing collected packages: retrying, plotly, networkx\n", " Running setup.py install for retrying ... \u001b[?25ldone\n", "\u001b[?25h Running setup.py install for networkx ... \u001b[?25ldone\n", "\u001b[?25hSuccessfully installed networkx-2.3 plotly-4.1.0 retrying-1.3.3\n", "\u001b[33mWARNING: You are using pip version 19.1.1, however version 19.2.1 is available.\n", "You should consider upgrading via the 'pip install --upgrade pip' command.\u001b[0m\n" ] } ], "source": [ "!pip install plotly networkx" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import plotly.graph_objects as go\n", "import networkx as nx" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv('diagram.csv', header = None) " ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | 0 | \n", "1 | \n", "
---|---|---|
0 | \n", "org.bastide.Runtime | \n", "Helper,org.bastide.WebApplication | \n", "
1 | \n", "Helper | \n", "Search1,Search2 | \n", "
2 | \n", "org.bastide.WebApplication | \n", "WebException,Validator,Search1,Search2 | \n", "
3 | \n", "org.bastide.WebException | \n", "Search1,Search2,Validator,Validator | \n", "