Skip to content

GraphImporter

The module GraphImporter makes it possible to import a graph directly throught the WDC-API.

Finding an available Graph

This is how you can get an overview over the available network data:

available_graphs = dnb.list_wdcapi_graphs(token=token) # (1)
  1. Available graphs are saved with the variable available_graphs.

This way, a selection of so-called Snapshots can be made. This is an int value.

Note

GraphImporter and TextSearch use different identifiers for technical reasons. GraphImporter uses an ID, meaning an int-value, while TextSearch uses a snapshot, meaning a mixture of numbers and symbols.

Importing a Graph

If the graph id of the graph you were looking for is found, the import can take place. The fastest way to do this is with the following function:

graph = read_wdcapi("20250607_meinnetz", token=token)

This imports the graph directly and the graph can now be edited and adjusted.

Advanced

If you want more detailed settings, you can use the functions of the GraphImporter-class directly. This allows for the separate import of nodes and edges.