Skip to content

Commit dec9ac4

Browse files
committed
first readme with working pyjviz output link
1 parent c01c965 commit dec9ac4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,14 @@ print(df)
6565
pyjviz.save_dot(vertical = True)
6666
```
6767

68-
The besides usual output to stdout the code will produce this SVG file.
69-
pyjviz visualization of pyjanitor method pipes (or chains) is based on dumping of RDF log of pyjanitor method calls into rdf log file. Resulting RDF log file contains graph of method calls where user could trace method execution as well as user-defined data useful for visual inspection. Note that visualisation of pyjviz RDF log is not a main goal of provided package. Graphviz visualization avaiable in the package is rather reference implementation with quite limited capablities. However RDF structure defined in rdflog.shacl.ttl could be used by SPARQL processor for visualization and other tasks.
68+
The [`result`][res] of run is SVG file with clickable nodes to provide the way to see some details of program behaviour and generated data objects.
69+
70+
[res]: https://asmirnov69.github.io/pyjviz-poc/docs/why-janitor.py.ttl.dot.svg
71+
72+
pyjviz visualization of pyjanitor method chains is based on dumping of RDF log of pyjanitor method calls into rdf log file. Resulting RDF log file contains graph of method calls where user could trace method execution as well as user-defined data useful for visual inspection. Note that visualisation of pyjviz RDF log is not a main goal of provided package. Graphviz visualization avaiable in the package is rather reference implementation with quite limited capablities. However RDF structure defined in rdflog.shacl.ttl could be used by SPARQL processor for visualization and other tasks.
7073

7174
Obj is representation of pyjanitor object like pandas DataFrame. However input args are not objects rather object states. The state of object is represeneted by RDF class ObjState. The idea to separate object and object state is introduced to enable pyjviz to visualize situation when object has mutliple states used in method chain due to in-place operations. Such practice is discouraged by most of data packages but still may be used. In most cases where object has only state defined when object is created there is not difference betwen object and object state since there is one-to-one correspondence (isomorfism). So in some context below refernce to an object may imply object state instead.
7275

7376
pyjviz also introduce MethodCall RDF class. It represents pyjanitor method call. MethodCall object has incoming links from input objects and outgoing link an object representing retirn object.
7477

75-
Aslo pyjviz introduces python class MethodsChain. MethodsChain is set of sequences of pyjanitor method calls grouped together. pyjantitor method calls are represented by RDF class MethodCall. Each MethodCall has one or more input objects and one return object. In pyjviz input args and return are presented by RDF class ObjState. Each ObjState has reference to RDF class Obj.
7678

examples/scripts/why-janitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@
4040
# comment line below to fix spurious apply calls caused by pandas printing implementation
4141
print(df)
4242

43-
pyjviz.save_dot(vertical = True, popup_output = False)
43+
pyjviz.save_dot(vertical = True, popup_output = True)

0 commit comments

Comments
 (0)