Skip to content

Supply Chain Sample Dataset

Author License Homepage Contributor

Tags: supply chain, automotive, manufacturing

Sample data for Automotive Manufacturing Supply Chain. Download

Data Showcase

Screen Capture

Schema

CREATE TAG IF NOT EXISTS car_model(name string, number string, year int, type string, engine_type string, size string, seats int);
CREATE TAG IF NOT EXISTS feature(name string, number string, type string, state string);
CREATE TAG IF NOT EXISTS `part`(name string, number string, price double, `date` string);
CREATE TAG IF NOT EXISTS supplier(name string, address string, contact string, phone_number string);

CREATE EDGE IF NOT EXISTS with_feature(version string);
CREATE EDGE IF NOT EXISTS is_composed_of(version string);
CREATE EDGE IF NOT EXISTS is_supplied_by(version string);
Download DDL

graph TD
  A[car_model]
  B[feature]
  C[part]
  D[supplier]

  A -->|with_feature| B
  B -->|is_composed_of| C
  C -->|is_supplied_by| D

  style A fill:#f9d,stroke:#333,stroke-width:2px;
  style B fill:#fcc,stroke:#333,stroke-width:2px;
  style C fill:#cfc,stroke:#333,stroke-width:2px;
  style D fill:#ccf,stroke:#333,stroke-width:2px;

classDiagram
  class car_model {
      string name
      string number
      int year
      string type
      string engine_type
      string size
      int seats
  }
  class feature {
      string name
      string number
      string type
      string state
  }
  class part {
      string name
      string number
      double price
      string date
  }
  class supplier {
      string name
      string address
      string contact
      string phone_number
  }

  car_model --> feature : with_feature(version string)
  feature --> part : is_composed_of(version string)
  part --> supplier : is_supplied_by(version string)

  style car_model fill:#f9d,stroke:#333,stroke-width:2px;
  style feature fill:#fcc,stroke:#333,stroke-width:2px;
  style part fill:#cfc,stroke:#333,stroke-width:2px;
  style supplier fill:#ccf,stroke:#333,stroke-width:2px;

Sample Data

src_id dst_id version
f_11 p_21 1.0
f_12 p_22 1.0
f_13 p_23 1.1
f_14 p_24 1.2
vertex_id name address contact phone_number
s_31 Supplier A 123 Street John Doe 1234567890
s_32 Supplier B 456 Avenue Emily Smith 0987654321
s_33 Supplier C 789 Boulevard Robert Brown 1112233445
s_34 Supplier D 101 Place Maria Johnson 2223344556
vertex_id name number type state
f_11 Sunroof F001 Optional Available
f_12 Bluetooth F002 Standard Available
f_13 Navigation F003 Optional N/A
f_14 Heated Seats F004 Standard Available
vertex_id name number price date
p_21 Brake Pad P001 50 2023-01-01
p_22 Engine P002 2000 2023-05-03
p_23 Tire P003 100 2022-08-14
p_24 Transmission P004 1500 2022-02-20
src_node_id dst_node_id version
m_1 f_12 1.0
m_2 f_13 1.0
m_3 f_14 1.1
m_4 f_15 1.2
vertex_id name number year type engine_type size seats
m_1 Model A 001 2023 Sedan Gasoline Compact 4
m_2 Model B 002 2023 Coupe Electric Compact 2
m_3 Model C 003 2022 SUV Hybrid Large 7
m_4 Model D 004 2022 Truck Diesel Extra Large 5
src_id dst_id version
p_21 s_31 1.0
p_22 s_32 1.0
p_23 s_33 1.1
p_24 s_34 1.2

Download

Download Gephi Lite File

Gephi Lite is an OSS tool for Graph Visualization and In Canvas Graph Exploration and Computational Analysis.

Download this sample Gephi Lite file to visualize the sampled graph data from here.

💡: You can generate gephi file from any graph query with NebulaGraph-Gephi.

Install the Jupyter-NebulaGraph extension, refer to the documentation for more information.

!pip install jupyter-nebulagraph
%load_ext ngql
%ngql --address 127.0.0.1 --port 9669 --user root --password nebula

Create Graph Space and Schema.

%ngql CREATE SPACE supply_chain(partition_num=1, replica_factor=1, vid_type=fixed_string(128));
# wait for a while
%ngql USE supply_chain;
# DDL with `%%ngql` magic for multi-line execution
%%ngql
CREATE TAG IF NOT EXISTS car_model(name string, number string, year int, type string, engine_type string, size string, seats int);
CREATE TAG IF NOT EXISTS feature(name string, number string, type string, state string);
CREATE TAG IF NOT EXISTS `part`(name string, number string, price double, `date` string);
CREATE TAG IF NOT EXISTS supplier(name string, address string, contact string, phone_number string);

CREATE EDGE IF NOT EXISTS with_feature(version string);
CREATE EDGE IF NOT EXISTS is_composed_of(version string);
CREATE EDGE IF NOT EXISTS is_supplied_by(version string);

Refer to jupyter-nebulagraph for more information.

%ng_load --header --source https://github.com/wey-gu/awesome-graph-dataset/raw/main/datasets/supply_chain/tiny/nodes_car_model.csv --tag car_model --vid 0 --props 1:name,2:number,3:year,4:type,5:engine_type,6:size,7:seats --space supply_chain
%ng_load --header --source https://github.com/wey-gu/awesome-graph-dataset/raw/main/datasets/supply_chain/tiny/nodes_feature.csv --tag feature --vid 0 --props 1:name,2:number,3:type,4:state --space supply_chain
%ng_load --header --source https://github.com/wey-gu/awesome-graph-dataset/raw/main/datasets/supply_chain/tiny/nodes_part.csv --tag part --vid 0 --props 1:name,2:number,3:price,4:date --space supply_chain
%ng_load --header --source https://github.com/wey-gu/awesome-graph-dataset/raw/main/datasets/supply_chain/tiny/nodes_supplier.csv --tag supplier --vid 0 --props 1:name,2:address,3:contact,4:phone_number --space supply_chain
%ng_load --header --source https://github.com/wey-gu/awesome-graph-dataset/raw/main/datasets/supply_chain/tiny/with_feature.csv --edge with_feature --src 0 --dst 1 --props 2:version --space supply_chain
%ng_load --header --source https://github.com/wey-gu/awesome-graph-dataset/raw/main/datasets/supply_chain/tiny/is_composed_of.csv --edge is_composed_of --src 0 --dst 1 --props 2:version --space supply_chain
%ng_load --header --source https://github.com/wey-gu/awesome-graph-dataset/raw/main/datasets/supply_chain/tiny/is_supplied_by.csv --edge is_supplied_by --src 0 --dst 1 --props 2:version --space supply_chain

The Nebula Importer is a tool for importing data from various data sources into NebulaGraph.

We provide a configuration file for the Nebula Importer(version: v4) to import the dataset.

Reference call command, assuming the configuration file is named importer_v4_config.yaml in your current directory:

# get the configuration file
# modify the configuration file according to your environment

# ls -l ./data/supply_chain/

# ls -l importer_v4_config.yaml

# run the importer
docker run --rm -ti \
    -v ${PWD}/data/supply_chain/:/data \
    -v ${PWD}/importer_v4_config.yaml:/root/importer_v4_config.yaml \
    vesoft/nebula-importer:v4 \
    -c /root/importer_v4_config.yaml