emod_api.interventions.ccdl_viz module#

Early draft of a very handy utility that takes a CCDL file (Concise Campaign Definition Language) and creates a graph(viz) visualization of it.

emod_api.interventions.ccdl_viz.get_nickname_from_event(event_num, pieces)[source]#

Allow nodes to get briefer and potentially more helpful nicknames. Default will probably remain a the nasty autogen above. Users can override this function with a callback of their own.

emod_api.interventions.ccdl_viz.get_colour_from_event(tokens)[source]#

Allow nodes to get a content-dependent colour. Default to just white. Users can override this function with a callback of their own. Have been using colour to capture IP categories.

emod_api.interventions.ccdl_viz.get_shape_from_event(tokens)[source]#

Allow nodes to get a content-dependent shape. Default to circle. Users can override this function with a callback of their own. Have been using shape to capture ‘epoch’ categories. Possible shapes include ellipse, circle, square, and diamond. Full list can be found at: https://www.graphviz.org/doc/info/shapes.html

emod_api.interventions.ccdl_viz.set_beautifiers(name_cb=None, colour_cb=None, shape_cb=None)[source]#

Override default no-op callbacks for setting nicknames, colours, and shapes of campaign nodes

emod_api.interventions.ccdl_viz.viz(in_name='campaign.ccdl', out_name='camp.sv', display=True, whitelist=None)[source]#