Create a knowledge graph
First, you'll download the data and examine the files. Then, you'll create an investigation based on your farm's supplier data. In ArcGIS Knowledge, an investigation is a workspace where you view and edit data. Within an investigation, you can research entities and relationships, edit the data, or query and search for specific information.
You'll go on to preview the categorization of your suppliers and distributors, or entities, along with their connections, or relationships, through a visualization tool called the data model designer.
Lastly, you'll load in data from a comma-separated values (CSV) file containing the entities and relationships to populate your knowledge graph.
Note:
To learn more about investigations, entities, relationships, or other terms associated with ArcGIS Knowledge, see Essential ArcGIS Knowledge vocabulary.
Download the data
First, you'll download the supply chain data created for the project.
- Download the Entities CSV file and the Supplier_Processes CSV file.
- Move the files to a location of your choice, such as your Documents folder.
- Open the Entities file.

This file contains information about your suppliers and distributors, along with the different crop plots from your farm. Additionally, the file contains information about the supplier's latitude and longitude, which will be used for the link chart.
The Type column indicates different entity types, or categories. For this tutorial, there are six entity types: Farm, Crop, Plant, Distribution, Company, and Other. All entities have a specific entity type that they fall into. For example, the Grain Process Plant entity belongs to the Plant entity type.
Note:
The data in this tutorial is fictitious and does not represent any real business information. Additionally, the crops associated with the agribusiness may not reflect a midsized farm in Iowa's production.
- Close the Entities file.
The other file contains data on relationships, or how the entities are connected.
- Open the Supplier_Processes file.

The Start and Finish columns represent starting entity points and ending entity points of relationships. For example, the starting point of one relationship is the Seed Company entity. The ending point of that relationship is the Green Harvest Farm entity. These points define a singular relationship.
The Relationships column displays the type of relationship. In this dataset, there are three relationship types: Supplies_To, Transports_To, and Produces.
Lastly, the Origin and Destination columns represent the entity types of the entities involved in a relationship process. For example, if Seed Company supplies to Green Harvest Farm, the origin entity type for Seed Company would be Company, while the destination entity type for Green Harvest Farm would be Farm.
- Close the Supplier_Processes file.
Create a project
Next, you'll create a project in ArcGIS Pro with ArcGIS Enterprise and create an investigation.
- Start ArcGIS Pro. Sign in to your ArcGIS Enterprise portal with a designated Publisher or Administrator account.
- Under New Project, click Start without a template.

- On the ribbon, on the Insert tab, in the Knowledge Graph group, click New Investigation.

The Create Investigation pane appears, showing the Define Investigation page. On this page, you can set basic metadata for the investigation.
- For Title, type Agribusiness_Supply_Chain.

- Click Next.
The title is copied to the Define Knowledge Graph page, where you can define metadata about the knowledge graph in the investigation. Unlike investigations, the title of a knowledge graph must be unique within your ArcGIS Enterprise portal. In case other members of your portal want to take this tutorial, you'll ensure the title of your knowledge graph is unique.
- For Title, add your name or initials to the end of the title.
- Click Next.
The Spatial Reference page sets the coordinate system details. By default, the WGS 1984 system is chosen. This coordinate system is acceptable.
Note:
WGS 1984 is the only coordinate system currently supported for spatial features. More spatial references will be supported in future ArcGIS Knowledge releases.
- Click Finish.
The investigation is created.
Note:
If your receive an error saying you do not have knowledge graph publishing permissions, contact your portal administrator to request permission.

Add entity types to a data model
The data model designer in ArcGIS Knowledge allows you to visualize a high-level knowledge graph through a data model.
You'll create a data model through the data model designer before loading the CSV files. This way, you can preview the knowledge graph before you create it and load the data more quickly. First, you'll add entity and relationship types to the data model.
- On the ribbon, on the Investigation tab, in the Data group, click Data Model.

A new view appears, showing your knowledge graph in the data model designer. By default, there is already a Document entity type in the data model. This entity type allows other files or references to be embedded within the entity. You won't use this entity type in this tutorial.
- On the Data Model tab, in the Editing group, click New and choose New Entity Type.

The New Entity Type window appears.
- For Name, type Farm.
Entity types can be spatial or nonspatial. In this case, all the entities have corresponding latitude and longitude information that can be mapped as point geometry, so you'll choose the appropriate spatial type.
- Confirm Spatial Type is set to Point.

- Click OK.
The Farm entity type appears in the data model designer.
- Create five more Point entity types with the following names:
- Crop
- Plant
- Company
- Distribution
- Other
- In the data model designer, drag the entity types so they are spaced equally apart from one another.

Note:
The colors and positions of your entity types may not match the example images. That's fine; it won't affect the workflow.
Next, you'll create a relationship between two entity types.
- Right-click the Farm entity type and choose Add Relationship.

An arrow appears, connected to your pointer. By clicking another entity type, you'll add a relationship between it and the Farm entity type.
- Click the Crop entity type.

The New Relationship Type window appears. You'll name the relationship type to explain how the two entities are connected. In this case, the Farm entity type produces the Crop entity type.
- For Type Name, type Produces.

- Click OK.
The relationship type is added to the Data Model Designer.

- Create a relationship type that connects the Farm entity type to the Plant entity type. Name the relationship type Supplies_To.
- Create a relationship type that connects the Distribution entity type to the Other entity type. Name the relationship type Transports_To.
You have created three relationship types. You'll use these relationship types to create relationships between other entity types.
- Create a relationship type that connects Farm to Other. In the New Relationship Type window, for Type Name, choose Supplies_To.

- Click OK.
Add the following relationships by creating an arrow from the first entity type to the second and choosing the appropriate relationship type:
- Company Supplies_To Farm
- Distribution Transports_To Company
- Plant Transports_To Company
- Plant Transports_To Distribution
The data model contains all the entity and relationship types for this tutorial.

Now that the data model is populated with information, you need to confirm the current design. Otherwise, the design will be lost when you close the tool.
- On the ribbon, in the Tools group, click Apply Design.

- When asked to confirm that you want to apply changes to the data model, click Apply.
Add property information
The data model designer is set up with entity and relationship types, but there is no data in the investigation yet. You'll add your specific farm's entity to the investigation.
- Click the Agribusiness_Supply_Chain view.

- On the ribbon, in the Entities group, click the New drop-down arrow and double-click the Farm entity type.

A new entity is added to the investigation with an ID string as the name. You'll rename it to reflect your farm's name.
- On the Properties tab, click Add.

A new row is added to the entity. By default, it is named Property.
- In the Names column, click Property, type Name, and press Enter.

- In the Values column, click (Null), type Green Harvest Farm, and press Enter.
- Click the Add button. For the new row, set the following parameters:
- For Names, type Crops.
- For Values, type Corn, Soybeans, Wheat, Pumpkins, Tomatoes.
- Click the Add button. For the new column, set the following parameters:
- For Names, type Owner.
- For Values, type James Cullen.

Before you can apply the changes, you have to save any edits you've made.
- On the ribbon, in the Manage Edits group, click Save.

- In the Save Edits window, click Yes.
- At the bottom of the farm entity table, click Apply.
The name of the entity has been replaced with your farm's name.
Load the entity properties
You've manually edited an entity in your knowledge graph. Manually editing an entity is helpful if you need to make small changes or add more information. However, it is not realistic for adding large quantities of data. Next, you'll load in the table data to populate your agribusiness' local supply chain with the remaining entities.
- On the ribbon, in the Data group, click Load Table.

The Load Table wizard appears. Using this wizard, you'll take the data from the CSV files and turn it into entities and relationships for the knowledge graph.
- For Source Table, click the Browse Source Table button.

- Browse to and select your Entities.csv file. Click OK.
- At the bottom of the Load Table wizard, click Next: Entities.
The Entities page allows you to specify how the data is added to the knowledge graph.
- Under the Column Names list, double-click Name.

A Name entity is added to the table.
- Click the Entity Type cell and choose Columns.

You want to define your entities based on a column in the table called Type. This column contains the entity types you defined in your data model.
- Click Type.

- Check the Merge box.

A warning appears, alerting you to use at least one property for a merge. You'll address this warning on the Properties page.
- Click Next: Relationships.
You won't define any relationships for the Entities file, but you will for the next file, Supplier_Processes.
- Click Next: Properties.
In the Entities file, there is a Products column and a Location column. You want to incorporate this information into your knowledge graph to provide more context for your suppliers and distributors. You'll specify the loading table to incorporate these columns into the knowledge graph as entity properties, also known as attributes.
- Drag Products and Location from the Column Names list into the Properties - {{Type}} Name table, under the Name row.
The Merge feature allows new entities to be merged with existing entities if property information is specified and commonly shared. As you have already manually created an entity for Green Harvest Farm, you'll merge the new entity from the CSV file with the one you created earlier.
You do not want two entities with the same location (city, state) or general products to be merged. You only want entities to be merged if they share the same name. The warning will be cleared after selecting a property to use in the merging process.
- Under Properties - {{Type}} Name, for Name, check Use For Merge.

Now, any entities with the same name will be merged.
Load entities
All the organizations within your farm's supply chain have latitude and longitude data. You'll ensure entities use this coordinate information so they appear correctly on a map.
- Click Next: Spatial.
- Check the Create Spatial box.
- Under Geometry Type, click Nonspatial and choose Point.

The Input Spatial Format drop-down list appears.
- Choose Coordinates.
- In the Available Fields pane, press Ctrl and click the Latitude and Longitude fields to select them both.

- Click Add.
- Click Next: Review/Run.
Before you load the table, you'll save the configuration in case you want to make adjustments in the future or apply this configuration to another project.
- At the bottom of the Review and Run page, click Save.

- In the Save Configuration box, type Entities. Click OK.
You'll also save any edits.
- In the message at the top of the view, click the Save edits button.

- At the bottom of the view, click Run.
The data is imported.
- Close the Load Table view. If necessary, return to the Agribusiness_Supply_Chain view.
- On the ribbon, on the Investigation tab, in the Tools group, click Refresh All.

- In the Contents pane, click Entity Types to select it.
The entities now populate your knowledge graph.

Load relationships
Now that you have loaded your entities to the knowledge graph, you'll load the relationships.
- On the ribbon, in the Data group, click Load Table.
- For Source Table, browse to and select your Supplier_Processes.csv file. Click OK.
- Click Next: Entities.
While you have already loaded your entities, you still need to clarify how entities are connected.
- In the Columns Names list, double-click Start.
- For Entity Type, select Columns and click Origin.

- In the Entity Type drop-down menu, click Origin.
- In the Column Names list, double-click Finish.
- For Finish, for Entity Type, select Columns and click Destination.
- For both Start and Finish, check the Merge box.

- Click Next: Relationships.
Next, you'll build the relationships you previewed in the data model designer using the Origin and Destination entities.
- Click Click here to add a new relationships. In the Origin Entity column, choose {{Origin}} Start.
- In the Destination Entity column, choose {{Destination}} Finish.
- Click the Relationship Type column. Select Columns.
A list is displayed of the CSV file's columns.
- Choose Relationships.
In this case, you can define relationship types based on input from the spreadsheet.
- Check Merge.

Load relationship properties
Next, you'll move forward with the Load Table tool, defining the relationship's properties and saving the configuration.
- Click Next: Properties.
On this page, both entities have warnings next to them. You need to specify the property that will be used for a merge to clear the warnings, like you did for the entities.
In the Property table, ({Origin}) Start is automatically selected.
- In the Properties - ({Origin}) Start table, in the Property Name column, click the Start entity. Delete the text and type Name.
Duplicate entities will be merged based on their name.
- Check Use For Merge.

- In the Entities list, click ({Destination}) Finish.

- In the Properties - ({Destination}) Finish table, change Property Name to Name. Check Use For Merge.
- Click Next: Spatial.
You do not need to create any geometry, as it was already created when you loaded in the entities. The Merge feature will carry over the spatial information to prevent duplicate entities.
- Click Next: Review/Run.
- Click Save. Name the configuration Relationships and click OK.
- Click Run.
The relationships are loaded.
- Close the Load Table view. If necessary, return to the Agribusiness_Supply_Chain view.
- On the ribbon, on the Investigation tab, in the Tools group, click Refresh All.
The Contents pane now displays the entity types and relationship types.

- On the Quick Access Toolbar, click the Save Project button.

- In the Save Project As window, for Name, type Agribusiness Knowledge Graph. Click Save.
You have created all your entities and relationships for the knowledge graph. First, you used the data model designer to visualize your supply chain. Then, you loaded in table data to automatically populate your knowledge graph.
Explore the knowledge graph
Now that you have successfully loaded your farm's supply chain data, you want to visualize this information in an effective way. You'll add the knowledge graph data to a link chart and edit its symbology. Then, you'll create a query to locate milled flour from your suppliers and distributors.
Create a link chart
Next, you'll visualize your knowledge graph spatially and nonspatially through a link chart.
- In the Contents pane, right-click the Agribusiness_Supply_Chain investigation, point to Add to, and choose New Link Chart.

The link chart is created and the Link Chart view appears. You'll rename the link chart to your farm's name.
- In the Contents pane, right-click Link Chart and choose Properties.
- On the General tab, for Name, type GHF Supply Chain. Click OK.
While the link chart is informative, you'll edit its symbology to make it easier to read without having to consult the legend.
- In the Contents pane, expand Link Chart.

- Expand Farm. Click the circle symbol.

Note:
Your symbol may have a different color than the example image.
The Symbology pane appears.
- If necessary, in the Symbology pane, click the Gallery tab.
- In the search box, type Farm and press Enter.
- In the list of results, scroll down to the Intelligence section. Click the medium-sized Farm symbol.

- Change the symbology for the following entity types:
- For Company, choose the medium-sized Office Building symbol.
- For Plant, choose the medium-sized Industrial Park symbol.
- For Other, choose the medium-sized Group symbol.
- For Crop, choose the medium-sized Agriculture Field symbol.
- For Distribution, choose the medium-sized Box Van symbol.

You won't change the Document entity type because you're not using it in this tutorial.
The symbols are also changed on the link chart.

- Close the Symbology pane.
Change the layout
The data you used to populate the link chart also has location information. You'll change the layout of the link chart to display it on a basemap and learn more about your farm's supply chain.
Note:
Although all the data used in this tutorial has spatial information, you can still use the geographic layout with nonspatial data.
- On the ribbon, on the Link Chart tab, in the Visualization group, click the Layout drop-down arrow.

- Choose Geographic.

Your farm's supply chain appears on a map. However, the labels may make it difficult to read. You'll turn off the labels. (They can be turned back on later.)

- On the ribbon, in the Labeling group, click Pause.

The labels are turned off. Now, the map is less cluttered.

Note:
If you need to find information about a feature on the map, click the symbol and read its pop-up.
You have set up a knowledge graph with a link chart visualization. Next, you'll create a query to track the product of milled flour. You'll switch back to the standard layout to visualize the query.
- On the ribbon, in the Visualization group, click the Layout drop-down arrow and choose Standard.
Note:
To enhance the visualization, you could also add crop field boundaries, such as the USA Cropland layer. To do so, you can paste the layer into your link chart and adjust the ordering and transparency features until you are satisfied. For this tutorial, you'll focus only on creating the knowledge graph and creating the link chart.
Create a query
Next, you'll use the knowledge graph to learn more about the farm's supply chain. In particular, you'll find any locations that receive milled flour that came from the farm's wheat crop. Due to a combination of recent drought conditions and hot weather, the farm's wheat production is facing mold issues and scheduled deliveries need to be delayed. It is your job to locate which entities receive wheat or milled flour.
Since you have switched the layout back to standard, you'll turn the labels back on for identification.
- On the ribbon, in the Labeling group, click the Pause button.
The labels are turned back on.
- In the Search group, click Search and Filter.

The Search and Filter pane appears, showing the Histogram tab. This tab allows users to summarize entities and relationships within the knowledge graph. In this case, you are looking for companies that receive certain products.
- Scroll down to the Products section.

The Receives: Milled Flour product has the number three next to it, meaning there are three companies that receive only milled flour from Green Harvest Farm.
- Right-click Receives: Milled Flour and choose Select Only This.

Three points on the map are selected. However, you also want to identify the processing plant that processes the wheat crop. Additionally, from the Entities CSV file, you know Store C receives milled flour in addition to other products. You want to make sure you select any entity that receives milled flour or wheat.
To add these entities and highlight the pathways that will be disrupted, you'll create a query.
- At the top of the Search and Filter pane, click the Query tab.

Using openCypher syntax, you can write queries for a knowledge graph.
- In the Query pane, type the following query:
MATCH path = (:Farm)-[*3]-(e) WHERE e.Products CONTAINS 'Milled Flour' or e.Products CONTAINS 'Wheat' RETURN path
This query identifies the pathways throughout the knowledge graph beginning from the farm entity whose Products property contains Milled Flour or Wheat.
Specifically, the query starts with a matching function, looking for pathways from the entity type of a farm to entities that are connected by three relationships in any direction. The where function indicates a filter searching for entities with a product property that contains milled flour or wheat. Lastly, the path is returned and visualized.
Note:
For more information on the syntax, see the Query a knowledge graph documentation page.
- Click Apply.
- If necessary, resize the Search and Filter pane to view the Results List.
- In the Results list, click the expand arrow to select all the entries.

- Right-click the first Green Harvest Farm entry, point to Apply To, and choose Current Link Chart.

The highlighted entities and relationships represent all entities receiving milled flour or wheat from the farm.

Tip:
The selected relationships also carry over to the Geographic view. Switch the layout at any point to see the geographic view again.
Share the results
You have finished the query, but you need to save it in case there are more crop issues in the future. You'll also export your link chart so you can share it.
- In the Search and Filter pane, on the Query tab, click Save.

- In the Save query as window, expand Investigations, Agribusiness_Supply_Chain, and Collections. Select Queries.

- For Name, type Wheat_Flour_Query. Click Save.
Next, you'll save your highlighted link chart.
- On the ribbon, click the Share tab. In the Output group, click the Export Map drop-down arrow and choose Vector PDF - Map.

The Export Map pane appears.
- For Name, browse to a folder of your choice, such as your Documents folder.
- Check Show selection symbology.

- Click Export.
The map is saved to the pathway you specified.
- Close the Export Map pane.
- On the ribbon, click the Link Chart tab. In the Selection group, click Clear.

- Save the project.
You have created a data investigation using ArcGIS Knowledge tools. Your link chart is ready to be used for analysis with your suppliers, shipments, and deliveries or shared with stakeholders for further consideration.
In this tutorial, you created a knowledge graph. From populating a data model to symbolizing a link chart, you have learned many ArcGIS Knowledge tools and tricks. You are encouraged to use the principles from this workflow for your own supply chain analysis and knowledge graph applications.
You can find more tutorials in the tutorial gallery.
