Skip to content

Instantly share code, notes, and snippets.

View Cyb3r-Monk's full-sized avatar

Mehmet E. Cyb3r-Monk

View GitHub Profile
@Cyb3r-Monk
Cyb3r-Monk / GraphPlotly.kql
Created February 28, 2024 17:07 — forked from cosh/GraphPlotly.kql
A stored function that uses the evaluate python operator to execute a Python script that uses the plotly, networkx and pandas libraries to create a plotly viz object from the input tables. The function also adds some styling and annotations to the graph object, such as colors, sizes, hover texts, etc. It uses the replace_string function to inser…
.create-or-alter function with (skipvalidation = "true") VisualizeGraphPlotly(
E:(sourceId:long,targetId:long), N:(nodeId:long),
pLayout:string="spring_layout", pColorscale:string="Picnic", pTitle:string="Happy kraphing!") {
let pythonCodeBlueprint = ```
import numpy as np
import pandas as pd
import plotly.graph_objects as go
import networkx as nx
G = nx.Graph()