bw2io.export.gexf#

Module Contents#

Classes#

DatabaseSelectionToGEXF

Export a Gephi graph for a selection of activities from a database.

DatabaseToGEXF

Export a Gephi graph for a database.

Functions#

keyword_to_gephi_graph(database,ย keyword)

Export a Gephi graph for a database for all activities whose names include the string keyword.

class bw2io.export.gexf.DatabaseSelectionToGEXF(database, keys)[source]#

Bases: DatabaseToGEXF

Inheritance diagram of bw2io.export.gexf.DatabaseSelectionToGEXF

Export a Gephi graph for a selection of activities from a database.

Also includes all inputs for the filtered activities.

Parameters
  • database (*) โ€“ Database name.

  • keys (*) โ€“ The activity keys to export.

class bw2io.export.gexf.DatabaseToGEXF(database, include_descendants=False)[source]#

Bases: object

Export a Gephi graph for a database.

Call .export() to export the file after class instantiation.

Parameters
  • database (*) โ€“ Database name.

  • include_descendants (*) โ€“ Include databases which are linked from database.

Warning

include_descendants is not yet implemented.

export()[source]#

Export the Gephi XML file. Returns the filepath of the created file.

get_data(E)[source]#

Get Gephi nodes and edges.

bw2io.export.gexf.keyword_to_gephi_graph(database, keyword)[source]#

Export a Gephi graph for a database for all activities whose names include the string keyword.

Parameters
  • database (*) โ€“ Database name.

  • keyword (*) โ€“ Keyword to search for.

Returns

The filepath of the exported file.