The Path class#

class sunburst.path.Path(iter_: Iterable[str])[source]#
startswith(tag)[source]#
parent()[source]#
ancestors()[source]#

Helper functions#

sunburst.path.paths2dot(paths: List[Path], full_labels=True) str[source]#

Converts a list of numbering to their correspondent graph described in the DOT language (see http://www.graphviz.org/doc/info/lang.html). Not using the python graphviz package to reduce dependencies.

Parameters:
  • paths – List of numbering.

  • full_labels – If true, the vertices of the graph are labeled with the full path, else only the name of the endpoint (path[:-1]) is printed.

Returns:

graph described in DOT language as string.

sunburst.path.stringvalues_to_pv(stringvalues: Dict[str, float], delim='/') Dict[Path, float][source]#
sunburst.path.stringlist_to_ordered_pv(stringpairs: List[Any], delim='/') Dict[Path, float][source]#
sunburst.path.charvalues_to_pv(charvalues: Dict[str, float]) Dict[Path, float][source]#
sunburst.path.charlist_to_ordered_pv(stringpairs: List[Any]) Dict[Path, float][source]#