Data-flo Docs
  • About Data-flo
    • Data-flo Major Update in April 2024
      • Migrating your workflows into the latest version of Data-flo
        • Streamlined adaptors
        • Deprecated adaptors
        • New and retained adaptors
    • Change Log
    • Privacy and Terms of Service
    • Open source software used by Data-flo
  • Data-flo Basics
    • Account
    • Navigation
    • Terminology
    • Interface Icons
    • Data-flo's building blocks: Adaptors
      • Using adaptors to import data
      • Using adaptors to process data
      • Using adaptors to export data
    • Combining adaptors to create workflows
      • Creating a workflow
        • Building a workflow from scratch
        • Cloning an existing workflow
        • Importing a .dataflo file
      • Testing your workflows
      • Running your workflows
      • Accessing your workflows
  • Adaptor reference guide
    • add-column
    • add-jittering
    • add-value-to-dictionary
    • aggregate-rows
    • append-datatables
    • append-lists
    • append-to-list
    • apply-force-directed-layout
    • calculate-column
    • calculate-time-difference
    • change-column-case
    • compare-columns
    • concatenate-columns
    • concatenate-text
    • convert-date-to-text
    • convert-list-to-datatable
    • convert-text-to-datatable
    • convert-text-to-list
    • create-dictionary-from-datatable
    • create-google-drive-folder
    • create-graph-from-datatable
    • create-graph-from-dot
    • create-list-from-datatable
    • create-text-from-template
    • duplicate-column
    • export-file-to-google-drive
    • export-file-to-smb-share
    • export-graph-to-dot-file
    • export-text-to-file
    • export-to-csv-file
    • export-to-dbf-file
    • export-to-google-sheet
    • export-to-microreact-project
    • export-to-sqlite-file
    • filter-list
    • filter-rows
    • find-value-in-dictionary
    • find-value-in-list
    • format-date-column
    • format-time-column
    • geocoding
    • import-file-from-dropbox
    • import-file-from-figshare
    • import-file-from-google-drive
    • import-file-from-http-request
    • import-file-from-s3
    • import-file-from-smb-share
    • import-file-from-url
    • import-from-csv-file
    • import-from-dbf-file
    • import-from-epicollect-project
    • import-from-excel-file
    • import-from-google-sheet
    • import-from-json-file
    • import-from-microreact-project
    • import-from-mysql
    • import-from-oracle
    • import-from-postgres
    • import-from-spreadsheet-file
    • import-from-sql-server
    • import-from-sqlite
    • import-list-from-text-file
    • import-text-from-file
    • join-datatables
    • list-datatable-columns
    • list-newick-leaf-labels
    • map-column-values
    • prepend-to-list
    • query-datatable
    • remove-columns
    • remove-duplicate-list-values
    • remove-duplicate-rows
    • rename-columns
    • rename-newick-leaf-labels
    • replace-blank-values
    • replace-values-in-columns
    • replace-values-in-list
    • replace-values-in-text
    • reshape-long-to-wide
    • reshape-wide-to-long
    • reverse-geocoding
    • run-openai-model
    • run-replicate-model
    • run-workflow
    • sample-datatable
    • select-columns
    • select-list-values
    • select-rows
    • send-email-message
    • sort-datatable
    • sort-list
    • split-column
    • split-geographical-coordinates
    • split-list
    • summarise-datatable
    • transform-columns
    • workflow-repeater
  • Applying Data-flo
    • Basics in Minutes!
      • Quick Workflow
        • Step 1: Configure a solo adapter to view data.
        • Step 2: Add and link a second adaptor.
        • Step 3: Add a value.
        • Step 4: Complete the workflow.
        • Step 5: Run the workflow.
        • Step 6: Share the workflow.
  • API
    • Data-flo API
    • API Access Tokens
  • Support
    • Contact and Feedback
    • Private Installations
Powered by GitBook
On this page
  • Description
  • Inputs
  • Outputs
  • Examples
  • Example 1: Default behaviour.
  • Example 2: Create a directed graph.
  • Use Cases
  1. Adaptor reference guide

create-graph-from-datatable

Description

create-graph-from-datatable adaptor creates a graph structure from a datatable containing edge data.

Requires selection of two columns from a datatable - a source and target column. By default, directed is FALSE, which creates a graph with no directionality to the connections. When changed to TRUE, the directionality is set as going from the 'source' to 'target' column.

Inputs

data Type: datatable Required: Yes The datatable containing edge data.

from column Type: text Required: Yes The name of the column containing the origin node of the edge.

to column Type: text Required: Yes The name of the column containing the destination node of the edge.

directed Type: boolean Required: No Specifies whether the graph is directed or not. If unspecified, defaults to False.

Outputs

graph Type: graph A graph structure defining nodes and edges.

Examples

Example 1: Default behaviour.

Inputs:

data:

id
from
to

1

A

B

2

B

C

3

C

A

4

C

D

from column: from

to column: to

directed: false

Outputs:

graph:

{ 
    "nodes": [ 
        { "id": "A" }, 
        { "id": "B" }, 
        { "id": "C" }, 
        { "id": "D" } 
    ], 
    "edges": [ 
        { "id": "edge-1", "from": "A", "to": "B", "direction": "none", "attributes": {} }, 
        { "id": "edge-2", "from": "B", "to": "C", "direction": "none", "attributes": {} }, 
        { "id": "edge-3", "from": "C", "to": "A", "direction": "none", "attributes": {} }, 
        { "id": "edge-4", "from": "C", "to": "D", "direction": "none", "attributes": {} } 
    ] 
} 

-> Created an undirected graph from the datatable.

Example 2: Create a directed graph.

Inputs:

data:

id
from
to

1

A

B

2

B

C

3

C

A

4

C

D

from column: from

to column: to

directed:true

Outputs:

graph:

{ 
    "nodes": [ 
    { "id": "A" }, 
    { "id": "B" }, 
    { "id": "C" }, 
    { "id": "D" } 
    ], 
    "edges": [ 
        { "id": "edge-1", "from": "A", "to": "B", "direction": "forward", "attributes": {} }, 
        { "id": "edge-2", "from": "B", "to": "C", "direction": "forward", "attributes": {} }, 
        { "id": "edge-3", "from": "C", "to": "A", "direction": "forward", "attributes": {} }, 
        { "id": "edge-4", "from": "C", "to": "D", "direction": "forward", "attributes": {} } 
        ] 
} 

-> Created a directed graph from the datatable.

Use Cases

Previouscreate-google-drive-folderNextcreate-graph-from-dot

Last updated 1 year ago

Converting a datatable to a graph, which can then be converted to DOT format , which can then be fed into the network argument in the adaptor.

Formatting the data from a spreadsheet before exporting as a DOT file (using adaptor)

Preparing data for the .

export-graph-to-dot-file
export-to-microreact-project
export-graph-to-dot-file
apply-force-directed-layout