Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# -*- coding: UTF-8 -*-
#
#
# ==================
# VIZ MARKDOWN - multiple file, markdown format
# ==================
import os, sys
import json
from ..utils import *
from ..builder import * # loads and sets up Django
from ..viz_factory import VizFactory
class MarkdownViz(VizFactory):
"""
A simple markdown rendering in multi pages
"""
def __init__(self, ontospy_graph, title=""):
"""
Init
"""
super(MarkdownViz, self).__init__(ontospy_graph, title)
def _buildTemplates(self):
"""
OVERRIDING THIS METHOD from Factory
"""
# !/usr/bin/env python
# -*- coding: UTF-8 -*-
# ==================
# VIZ HTML SINGLE - outputs documentation within a single HTML page
# ==================
import os, sys
from ..utils import *
from ..builder import * # loads and sets up Django
from ..viz_factory import VizFactory
class HTMLVisualizer(VizFactory):
"""
A simple html rendering in one single page
"""
def __init__(self, ontospy_graph, title=""):
"""
Init
"""
super(HTMLVisualizer, self).__init__(ontospy_graph, title)
self.template_name = "html-single/html-single.html"
self.main_file_name = "index.html"
# if called directly, for testing purposes run the basic HTML rendering
# !/usr/bin/env python
# -*- coding: UTF-8 -*-
import os, sys
import json
from ..utils import *
from ..builder import * # loads and sets up Django
from ..viz_factory import VizFactory
# ===========
# D3 PARTITION TABLE
# ===========
class Dataviz(VizFactory):
"""
D3 Partition table
"""
def __init__(self, ontospy_graph, title=""):
"""
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
self.static_files = ["libs/d3-v3", "libs/jquery"]
def _buildTemplates(self):
"""
OVERRIDING THIS METHOD from Factory
"""
# ==================
# VIZ HTML MULTI - html visualization with multiple files, one per entity
# ==================
import os, sys
import json
from ..utils import *
from ..builder import * # loads and sets up Django
from ..viz_factory import VizFactory
class KompleteViz(VizFactory):
"""
"""
def __init__(self, ontospy_graph, title="", theme=""):
"""
Init
"""
super(KompleteViz, self).__init__(ontospy_graph, title)
self.static_files = [
"custom",
"libs/bootswatch3_2",
"libs/bootstrap-3_3_7-dist",
"libs/jquery/1_12_4/",
"libs/chartjs-2_4_0"
# VIZ SIGMA JS
# ==================
import os, sys
import json
from ..utils import *
from ..builder import * # loads and sets up Django
from ..viz_factory import VizFactory
class Dataviz(VizFactory):
"""
Sigma JS
"""
def __init__(self, ontospy_graph, title=""):
"""
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
self.static_files = ["libs/sigma", "libs/jquery"]
def _buildTemplates(self):
"""
# -*- coding: UTF-8 -*-
#
#
# ==================
# VIZ D3 Tree - a d3 dendogram
# ==================
import os, sys
import json
from ..utils import *
from ..builder import * # loads and sets up Django
from ..viz_factory import VizFactory
class Dataviz(VizFactory):
"""
D3 viz tree
"""
def __init__(self, ontospy_graph, title=""):
"""
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
self.static_files = ["libs/d3-v2", "libs/jquery"]
def _buildTemplates(self):
"""
OVERRIDING THIS METHOD from Factory
"""
# -*- coding: UTF-8 -*-
import os, sys
import json
from ..utils import *
from ..builder import * # loads and sets up Django
from ..viz_factory import VizFactory
# TEMPLATE: D3 PACK HIERARCHY
# http://mbostock.github.io/d3/talk/20111116/pack-hierarchy.html
# https://github.com/d3/d3/wiki/Pack-Layout
# http://bl.ocks.org/nilanjenator/4950148
class Dataviz(VizFactory):
"""
D3 PackHierarchyViz
"""
def __init__(self, ontospy_graph, title=""):
"""
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
self.static_files = ["libs/d3-v3", "libs/jquery"]
def _buildTemplates(self):
"""
OVERRIDING THIS METHOD from Factory
"""
# !/usr/bin/env python
# -*- coding: UTF-8 -*-
import os, sys
import json
from ..utils import *
from ..builder import * # loads and sets up Django
from ..viz_factory import VizFactory
# ===========
# D3 Bar Hierarchy
# ===========
class Dataviz(VizFactory):
"""
D3 Bar HierarchyViz
"""
def __init__(self, ontospy_graph, title=""):
"""
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
self.static_files = ["libs/d3-v3", "libs/jquery"]
def _buildTemplates(self):
"""
OVERRIDING THIS METHOD from Factory
"""
# !/usr/bin/env python
# -*- coding: UTF-8 -*-
import os, sys
import json
from ..utils import *
from ..builder import * # loads and sets up Django
from ..viz_factory import VizFactory
# ===========
# D3 BUBBLE CHART
# ===========
class Dataviz(VizFactory):
"""
D3 Bubbles
"""
def __init__(self, ontospy_graph, title=""):
"""
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
self.static_files = ["libs/d3-v3", "libs/jquery"]
def _buildTemplates(self):
"""
OVERRIDING THIS METHOD from Factory
"""
# !/usr/bin/env python
# -*- coding: UTF-8 -*-
import os, sys
import json
from ..utils import *
from ..builder import * # loads and sets up Django
from ..viz_factory import VizFactory
# ===========
# D3 ROTATING CLUSTER
# ===========
class Dataviz(VizFactory):
"""
D3 rotating cluster
"""
def __init__(self, ontospy_graph, title=""):
"""
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
self.static_files = ["libs/d3-v3", "libs/jquery"]
def _buildTemplates(self):
"""
OVERRIDING THIS METHOD from Factory
"""