We collect incident data from slack, query faceted counts from nrdb, relate each to org in neo4j and then render the tree with sum using graphviz.
nrql: | from Nrrdbot select count(*) where channelId in ('C0STV9GSU','C10R2M1KQ') facet sender since 24 hours ago limit 100 query: | unwind {facets} as facet with facet.name as name, facet.results[0].count as count match h = shortestPath( (p:PERSON {name: name})-[m:MANAGER*]-> (b:PERSON {name: 'Lew Cirne'})) unwind apoc.coll.pairsMin(nodes(h)) as pair return collect(distinct p.name) as name, pair[0].name as peep, pair[1].name as boss, sum(count) as sum dot: | digraph { rankdir=LR node [shape=box style=filled fillcolor=bisque] "{name}" [fillcolor=lightblue] "{peep}" -> "{boss}" [label={sum}] }
Blue shows participants, beige their management.
digraph { rankdir=LR node [shape=box style=filled fillcolor=bisque] "Mike" [fillcolor=lightblue] "Mike" [fillcolor=lightblue] "Mike" [fillcolor=lightblue] "Vasanti" [fillcolor=lightblue] "Matt" [fillcolor=lightblue] "Michael" [fillcolor=lightblue] "Mike" [fillcolor=lightblue] "Aarun" [fillcolor=lightblue] "Zack" [fillcolor=lightblue] "Nate" [fillcolor=lightblue] "Julia" [fillcolor=lightblue] "Roger" [fillcolor=lightblue] "Guillermo" [fillcolor=lightblue] "Vasanti" [fillcolor=lightblue] "Daniel" [fillcolor=lightblue] "Keri" [fillcolor=lightblue] "Micah" [fillcolor=lightblue] "Matt" [fillcolor=lightblue] "Dylan" [fillcolor=lightblue] "Samuel" [fillcolor=lightblue] "Jeff" [fillcolor=lightblue] "Vincent" [fillcolor=lightblue] "Bob" [fillcolor=lightblue] "Ekan" [fillcolor=lightblue] "Seva" [fillcolor=lightblue] "Nic" [fillcolor=lightblue] "Michael" [fillcolor=lightblue] "Ron" [fillcolor=lightblue] "Micah" [fillcolor=lightblue] "Dylan" [fillcolor=lightblue] "Vincent" [fillcolor=lightblue] "Bob" [fillcolor=lightblue] "Micah" [fillcolor=lightblue] "Dylan" [fillcolor=lightblue] "Vincent" [fillcolor=lightblue] "Bob" [fillcolor=lightblue] "Daniel" [fillcolor=lightblue] "Micah" [fillcolor=lightblue] "Dylan" [fillcolor=lightblue] "Jeff" [fillcolor=lightblue] "Vincent" [fillcolor=lightblue] "Bob" [fillcolor=lightblue] "Daniel" [fillcolor=lightblue] "Micah" [fillcolor=lightblue] "Dylan" [fillcolor=lightblue] "Jeff" [fillcolor=lightblue] "Vincent" [fillcolor=lightblue] "Bob" [fillcolor=lightblue] "Zack" [fillcolor=lightblue] "Zack" [fillcolor=lightblue] "Seva" [fillcolor=lightblue] "Zack" [fillcolor=lightblue] "Samuel" [fillcolor=lightblue] "Seva" [fillcolor=lightblue] "Zack" [fillcolor=lightblue] "Julia" [fillcolor=lightblue] "Guillermo" [fillcolor=lightblue] "Samuel" [fillcolor=lightblue] "Seva" [fillcolor=lightblue] "Zack" [fillcolor=lightblue] "Julia" [fillcolor=lightblue] "Roger" [fillcolor=lightblue] "Guillermo" [fillcolor=lightblue] "Samuel" [fillcolor=lightblue] "Ekan" [fillcolor=lightblue] "Seva" [fillcolor=lightblue] "Ron" [fillcolor=lightblue] "Zack" [fillcolor=lightblue] "Julia" [fillcolor=lightblue] "Roger" [fillcolor=lightblue] "Guillermo" [fillcolor=lightblue] "Samuel" [fillcolor=lightblue] "Ekan" [fillcolor=lightblue] "Seva" [fillcolor=lightblue] "Nic" [fillcolor=lightblue] "Ron" [fillcolor=lightblue] "Nate" [fillcolor=lightblue] "Nate" [fillcolor=lightblue] "Keri" [fillcolor=lightblue] "Nate" [fillcolor=lightblue] "Keri" [fillcolor=lightblue] "Julia" [fillcolor=lightblue] "Julia" [fillcolor=lightblue] "Roger" [fillcolor=lightblue] "Roger" [fillcolor=lightblue] "Roger" [fillcolor=lightblue] "Guillermo" [fillcolor=lightblue] "Guillermo" [fillcolor=lightblue] "Vasanti" [fillcolor=lightblue] "Vasanti" [fillcolor=lightblue] "Michael" [fillcolor=lightblue] "Vasanti" [fillcolor=lightblue] "Matt" [fillcolor=lightblue] "Michael" [fillcolor=lightblue] "Daniel" [fillcolor=lightblue] "Daniel" [fillcolor=lightblue] "Daniel" [fillcolor=lightblue] "Keri" [fillcolor=lightblue] "Micah" [fillcolor=lightblue] "Matt" [fillcolor=lightblue] "Matt" [fillcolor=lightblue] "Dylan" [fillcolor=lightblue] "Samuel" [fillcolor=lightblue] "Samuel" [fillcolor=lightblue] "Bob" [fillcolor=lightblue] "Ekan" [fillcolor=lightblue] "Ron" [fillcolor=lightblue] "Seva" [fillcolor=lightblue] "Michael" [fillcolor=lightblue] "Ron" [fillcolor=lightblue] "Mike" -> "Chad" [label=43] "Chad" -> "Alex" [label=43] "Alex" -> "Bill" [label=69] "Bill" -> "Lew" [label=270] "Aarun" -> "Vincent" [label=32] "Vincent" -> "Wendi" [label=61] "Wendi" -> "Jeff" [label=61] "Jeff" -> "Manav" [label=81] "Manav" -> "Bill" [label=81] "Zack" -> "Will" [label=23] "Will" -> "Dave" [label=24] "Dave" -> "Aaron" [label=30] "Aaron" -> "Wendy" [label=64] "Wendy" -> "Nic" [label=82] "Nic" -> "Bill" [label=83] "Nate" -> "Brion" [label=23] "Brion" -> "Gayle" [label=37] "Gayle" -> "Bill" [label=37] "Julia" -> "Ryan" [label=19] "Ryan" -> "Aaron" [label=19] "Roger" -> "Desiree" [label=15] "Desiree" -> "Andrew" [label=15] "Andrew" -> "Wendy" [label=15] "Guillermo" -> "Nicolás" [label=15] "Nicolás" -> "Aaron" [label=15] "Vasanti" -> "Robert" [label=15] "Robert" -> "Pierre" [label=16] "Pierre" -> "Alex" [label=26] "Daniel" -> "Alysa" [label=14] "Alysa" -> "Rafael" [label=14] "Rafael" -> "Jeff" [label=14] "Keri" -> "Brion" [label=14] "Micah" -> "Vincent" [label=13] "Matt" -> "Chris" [label=10] "Chris" -> "Pierre" [label=10] "Dylan" -> "Vincent" [label=8] "Samuel" -> "Angela" [label=6] "Angela" -> "Dave" [label=6] "Bob" -> "Vincent" [label=3] "Ekan" -> "Wendy" [label=3] "Seva" -> "Will" [label=1] "Michael" -> "Robert" [label=1] "Ron" -> "Ekan" [label=1] }