Skip to content

Latest commit

 

History

History
202 lines (131 loc) · 9.74 KB

importing-data.md

File metadata and controls

202 lines (131 loc) · 9.74 KB
description Create graphs with your existing data

📥 Importing data

As your data grows, editing graphs manually becomes inefficient. Importing from external sources is a faster and more scalable solution.

Use simple table structures from spreadsheets (Google Sheets, Excel, CSV), JSON files. You can organize your data with the Graph Commons Template.

Minimum Structure

Edges

Simply create a relationship list to get started. Edges define the connections between your nodes, which will be automatically created from this list.

From Type, From Name, Edge Type, To Type, To Name
Person,Alice,WORKS AT,Company,Acme
Person,Bob,FOLLOWS,Person,Alice;Claire;David
Person,Charlie,MEMBER OF,Organization,Board A;Board B

5 required columns. Semicolons in "To Name" creates multiple edges.

Nodes

To add more details to your nodes, include a nodes table. You can freely add columns as node properties for richer data representation.

Node Type, Node Name, Description, Image, ...
Person,Alice,Co-founder of Acme,https://example.com/alice.png
Company,Acme,Collaborative data mapping platform,https://example.com/gc.png

First two columns must match edges. Add columns as needed.

Step by Step Guide

  1. In your graph editor, click Import on the left-hand toolbar.

Open the Import panel by clicking "Import" on the left-hand toolbar.

2. Select import format and upload. Choose your format (Google Sheets, Excel, CSV, JSON, or Graph Commons v1) and upload your file or paste the URL.

Import panel with Google Sheets, Excel, CSV, JSON, and Graph Commons V1 options

3. Review import summary. The import summary shows what will be created. Here, you can:

  • Rename node types, edge types, and properties
  • Change property types (string, number, boolean)
  • Exclude certain types from being imported
  • Fix any issues before completing the import

Import Summary displays what you are about to import for your review.

Review Checklist

{% tabs %} {% tab title="Nodes on summary" %}

Cross check between node sheet and import summary

{% endtab %}

{% tab title="Node sheet" %}

{% endtab %}

{% tab title="Edges on summary" %}

{% endtab %}

{% tab title="Edge Sheet" %}

Cross check your sheet with import summary

{% endtab %} {% endtabs %}
  • Compare with your sheet: Ensure consistency between the import summary and your spreadsheet.
  • Expand for details: View counts of nodes, edges, and types. Check if the numbers make sense.
  • Check warnings: Warnings (in orange) flag potential issues but won't block the import.
  • Review nodes:
    • Make sure node types are not duplicated due to typos.
    • Verify node count matches your data.
    • Check that property names match the column headers.
  • Review edges:
    • Look for unintended edge types.
    • Confirm edge counts and properties are accurate.
    • Use the info icon to see which node types are connected by each edge type.

You can revise directly in the summary or cancel the import, fix your sheet, and try again.

Revising your graph model

The import summary allows real-time model editing. You can:

  • Rename or deselect node and edge types
  • Edit property names
  • Choose property data types
  • Set edge direction
  • Change colors

For example, deselecting “Person” nodes will exclude them from your graph. Same-name types are treated as separate if they originate from different sheets.

Use data types wisely:

  • String: for text
  • Number: for numeric values (years, prices, counts)
  • Boolean: for Yes/No or True/False values

Directed edges are optional, but they affect graph analysis. If you’re new, start with undirected edges.

Click these areas to make detailed revisions on your graph model

Handling import errors and warnings

  • Errors (in red): Must be fixed before importing.
  • Warnings (in orange): Won’t block import, but reviewing them is recommended.

Common messages:

  • [number] on 500 Your import exceeds your plan's limit, Upgrade your plan.
  • Nothing changedSheet is blank or headers are missing.
  • Can't load your documentMake sure URL is valid and shared as “Anyone with the link can view”.
  • Tabs "____", "____" have been ignored, we can't find a type column. The importer will ignore the unformatted tabs in your sheet. Use "Node Type" or "Edge Type" in header.
  • Node in "___" at row # (column To) has been skipped, missing identifier data. An edge cannot exist without the two nodes it is connecting, therefore where you see this warning message, you will also see: Edge in "___" at row # has been skipped, missing target node. Rows skipped due to blank required cells (e.g., missing target node in an edge row).

Working with Google Sheets

Google Sheets is commonly used for managing data sets. Using the Graph Commons Template you can import your data to create a graph with one click!

To create your own import sheet all you need is:

  • A node sheet / tab
  • An edge sheet / tab
  • Share link: Set your sharing options to "Anyone with the link can view"

Node sheet

Create a node sheet using the following columns, the first two are required:

  • Node Type, Name columns are required.
  • Description column is optional, used as the first text block in the node cad.
  • Image column is optional, used to display image on the graph and in node card.
  • Other columns are optional and used as properties in your node.

You can create as many node sheets as you want. It is more efficient to work with large data, if you divide your node sheets by their types like People, Organizations, Locations etc.

First two columns are required in a node sheet

Edge sheet

Create an edge sheet using the following columns, the first 5 columns are required:

  • From Type, From Name, Edge Type, To Type, To Name columns are required.
  • To Name column can have multiple names separated by semicolons for adding multiple connections to these nodes at once.
  • Weight column is optional, default 1, used as thickness of connections and affects layout algorithm and analysis results.
  • Other columns are optional and used as properties in your edge.

You can create as many edge sheets/tabs as you want. It is more efficient to work with large data, if you divide your edge sheets by their types (e.g., friendships, collaborations, payments...).

The first 5 columns are required in an edge sheet

{% hint style="info" %} If you have the same connection between the same nodes multiple times, then you should make them a single row and add this info into the Weight column. {% endhint %}

Shareable link for import

Google Sheets share: Anyone with the link can view

{% hint style="info" %} The import tool will only read sheets in node or edge format as explained above. If you have extra sheets to manage your data, they will not be read. {% endhint %}

{% hint style="info" %} Blank lines and white space can lead to import errors. Make sure to clear them for a better import experience. Try Google Sheets TRIM whitespace option in Data menu. {% endhint %}

Working with Excel

To prepare an Excel sheet for import, follow the exact same format as in Google Sheets. Just choose the Excel tab for import.

Working with CSV files

CSV files follow the same table structure as in Google Sheets. When your files are ready, open the import panel and choose the CSV Files tab. Then drag and drop to start import.

{% hint style="info" %} If you are working with multiple node types with various properties, create separate CSV files for each node type to make sure every node type only has its property column. {% endhint %}

Working with JSON files

Open the import panel and choose the JSON tab to upload your JSON file. You can export your graph in JSON and import into a new graph.

You can programmatically create and manage graphs using the Graph Commons api.md