Message Boards Message Boards

[WSS22] Semantically-informed visualization tool for data navigation

Posted 2 years ago

enter image description here

POSTED BY: John McNally
2 Replies

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD

You know that doesn't just magically work, why not just have the // echo at the end?

I don't know. This is the @John McNally prototype tool for navigating Entity types, it's the visualization of "conceptual" relationships between entities using EntityProperties.

entityPairToLabeledDirectedEdge[source_, dest_] := 
 DirectedEdge[source, dest, 
  First@Select[EntityProperties[source], 
    MemberQ[EntityValue[source, #], dest, {0, Infinity}] &]]
visualizePath[entitylist_, embedding_ : Automatic, 
  size_ : Automatic] := 
 Graph[entityPairToLabeledDirectedEdge @@@ 
   Partition[entitylist, 2, 1], 
  VertexLabels -> Placed[Automatic, Center], EdgeLabels -> Automatic, 
  GraphLayout -> embedding, ImageSize -> size, 
  VertexShapeFunction -> "Rectangle", VertexStyle -> White, 
  VertexSize -> {0.2, 0.2}, VertexLabelStyle -> {14, Bold}, 
  EdgeStyle -> {Arrowheads[0.01], Blue}, 
  PerformanceGoal -> "Quality"]
homogenizeValuesToEntityLists[assoc_] := 
 Select[Map[
   DeleteCases[Except[_Entity]]@*ReplaceAll[Rule[e_, _] :> e]@*
    Flatten@*List, assoc], # != {} &]
interactiveEntityNavigatorPrototype[init_] := 
 DynamicModule[{active = init, history = {}, activeAssociation},
  Dynamic[history = Join[history, {active}];
   activeAssociation = 
    homogenizeValuesToEntityLists[
     EntityValue[active, "NonMissingPropertyAssociation"]];
   Manipulate[Graph[Join[
      DirectedEdge @@@ Partition[history, 2, 1],
      Thread[active -> Keys[activeAssociation]]],
     VertexLabels -> {
       ent_Entity :> Placed[Automatic, Center],
       prop_EntityProperty :> 
        Placed[PopupMenu[Dynamic[active], activeAssociation[prop], 
          prop], Above]},
     EdgeShapeFunction -> "CarvedArcArrow", GraphLayout -> embedding, 
     VertexSize -> 0.01, 
     VertexStyle -> {Entity[_] -> LightYellow, _ -> Green}, 
     ImageSize -> size], {
     embedding, {"SpringElectricalEmbedding", 
      "SpringEmbedding"}}, {size, {650, 850, 750}},
    Button["Create Document with Graph of explored Entities",
     CreateDocument[
      ExpressionCell[
       visualizePath[history, "MultipartiteEmbedding"]]]],
    Button["Reset Graph and History",
     history = {}; active = init;],
    Button["Create Document with explored Datasets", 
     CreateDocument[
      ExpressionCell[
         Dataset[EntityValue[#, "NonMissingPropertyAssociation"]]] & /@
        DeleteDuplicates[history]]],
    ControlPlacement -> Bottom, SynchronousUpdating -> False], 
   TrackedSymbols :> {active}, SynchronousUpdating -> False]]
interactiveEntityNavigatorPrototype[Entity["Country", "Poland"]]
interactiveEntityNavigatorPrototype[Entity["Planet", "Mars"]]
interactiveEntityNavigatorPrototype[Entity["Company", "Apple::5zkjq"]]

Interactive Entity Navigator Prototype Poland

@John McNally it's been pedagogical listing the values & properties, encoding semantic information within the syntax of property-like keys to enable smarter search algorithms through the space of entities.

Interactive Entity Navigator Prototype Mars

@John McNally The dynamic structure, the population of the Entity and EntityProperty symbols in the Wolfram Language expands upon the role of visualization; that is so educational and scientific!

Interactive Entity Navigator Prototype Apple

The prototype is incredibly designed, for students new to the Wolfram Language and you can see the phases of refining the design, from basic mouse-only navigation to more advanced visualizations and user control mechanisms.

POSTED BY: Dean Gladish
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract