Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: supplychain dataset as starter #636

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions app/config/locale/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default {
openstackIntro:
'A demo of AI Ops with Graph, taking OpenStack as an example, where all resources were included in one graph.',
fraudDetectionIntro: 'Fraud detection with Graph, taking loan application as an example',
supplychainIntro: 'Auto Manufacturing Supply Chain Graph.',
},
warning: {
connectError: 'Connection refused, please configure server again',
Expand Down Expand Up @@ -446,15 +447,15 @@ export default {
contact: 'Contact Us',
},
link: {
nGQLHref: 'https://docs.nebula-graph.io/3.5.0/3.ngql-guide/1.nGQL-overview/1.overview/',
mannualHref: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/about-studio/st-ug-what-is-graph-studio/',
startStudioHref: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/st-ug-plan-schema/',
versionLogHref: 'https://docs.nebula-graph.io/3.5.0/20.appendix/release-notes/studio-release-note/',
nGQLHref: 'https://docs.nebula-graph.io/3.6.0/3.ngql-guide/1.nGQL-overview/1.overview/',
mannualHref: 'https://docs.nebula-graph.io/3.6.0/nebula-studio/about-studio/st-ug-what-is-graph-studio/',
startStudioHref: 'https://docs.nebula-graph.io/3.6.0/nebula-studio/quick-start/st-ug-plan-schema/',
versionLogHref: 'https://docs.nebula-graph.io/3.6.0/20.appendix/release-notes/studio-release-note/',
forumHref: 'https://discuss.nebula-graph.io/',
feedback: 'https://app.slack.com/client/TJB3N2BPD/CJNFUM7AR',
trial: 'https://www.nebula-graph.io/visualization-tools-free-trial',
contact: 'https://www.nebula-graph.io/contact',
loginHref: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/deploy-connect/st-ug-connect/',
loginHref: 'https://docs.nebula-graph.io/3.6.0/nebula-studio/deploy-connect/st-ug-connect/',
},
sketch: {
dragTip: 'Drag and drop to the canvas',
Expand Down Expand Up @@ -504,14 +505,15 @@ export default {
loadWaiting: 'Data is loading, please wait... It will end in {second}s',
downloadSuccess: 'Dataset `{space}` has been downloaded successfully',
spaceExist: 'The graph space `{space}` already exists',
schemaModuleLink: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/st-ug-create-schema/',
importModuleLink: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/st-ug-import-data/',
consoleModuleLink: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/st-ug-console/',
sketchModuleLink: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/draft/',
schemaModuleLink: 'https://docs.nebula-graph.io/3.6.0/nebula-studio/quick-start/st-ug-create-schema/',
importModuleLink: 'https://docs.nebula-graph.io/3.6.0/nebula-studio/quick-start/st-ug-import-data/',
consoleModuleLink: 'https://docs.nebula-graph.io/3.6.0/nebula-studio/quick-start/st-ug-console/',
sketchModuleLink: 'https://docs.nebula-graph.io/3.6.0/nebula-studio/quick-start/draft/',
basketballplayerDocLink: '',
shareholdingDocLink: 'https://nebula-graph.io/demo/shared-holding',
openstackDocLink: '',
snsDocLink: 'https://siwei.io/en/nebulagraph-sns/',
supplychainDocLink: 'https://github.com/wey-gu/supplychain-dataset-gen',
datalineageDocLink: 'https://siwei.io/en/data-lineage-oss-ref-solution/',
movieDocLink: '',
idMappingDocLink: '',
Expand Down
20 changes: 11 additions & 9 deletions app/config/locale/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export default {
shareholdingIntro: '股权关系图谱,图上实做股权穿透、公司实控人分析、背景调查',
openstackIntro: '图驱动的复杂基础设施智能运维实操,基于 OpenStack 全资源抓取图谱的例子',
fraudDetectionIntro: '欺诈检测的图应用,以借贷场景为例',
supplychainIntro: '供应链图谱,以汽车制造为例。',
},
warning: {
connectError: '数据库连接有误,请重新配置',
Expand Down Expand Up @@ -428,15 +429,15 @@ export default {
contact: '联系我们',
},
link: {
nGQLHref: 'https://docs.nebula-graph.com.cn/3.5.0/3.ngql-guide/1.nGQL-overview/1.overview/',
mannualHref: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/about-studio/st-ug-what-is-graph-studio/',
startStudioHref: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/st-ug-plan-schema/',
versionLogHref: 'https://docs.nebula-graph.com.cn/3.5.0/20.appendix/release-notes/studio-release-note/',
nGQLHref: 'https://docs.nebula-graph.com.cn/3.6.0/3.ngql-guide/1.nGQL-overview/1.overview/',
mannualHref: 'https://docs.nebula-graph.com.cn/3.6.0/nebula-studio/about-studio/st-ug-what-is-graph-studio/',
startStudioHref: 'https://docs.nebula-graph.com.cn/3.6.0/nebula-studio/quick-start/st-ug-plan-schema/',
versionLogHref: 'https://docs.nebula-graph.com.cn/3.6.0/20.appendix/release-notes/studio-release-note/',
forumHref: 'https://discuss.nebula-graph.com.cn/',
feedback: 'https://discuss.nebula-graph.com.cn/tag/nebula-studio',
trial: 'https://wj.qq.com/s2/10158890/69a8',
contact: 'https://www.nebula-graph.com.cn/contact',
loginHref: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/deploy-connect/st-ug-connect/',
loginHref: 'https://docs.nebula-graph.com.cn/3.6.0/nebula-studio/deploy-connect/st-ug-connect/',
},
sketch: {
dragTip: '拖放到画布上',
Expand Down Expand Up @@ -486,14 +487,15 @@ export default {
loadWaiting: '数据加载中,请稍等...预计将在 {second}s 后结束',
downloadSuccess: '数据集 `{space}` 下载成功',
spaceExist: '图空间 `{space}` 已存在',
schemaModuleLink: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/st-ug-create-schema/',
importModuleLink: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/st-ug-import-data/',
consoleModuleLink: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/st-ug-console/',
sketchModuleLink: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/draft/',
schemaModuleLink: 'https://docs.nebula-graph.com.cn/3.6.0/nebula-studio/quick-start/st-ug-create-schema/',
importModuleLink: 'https://docs.nebula-graph.com.cn/3.6.0/nebula-studio/quick-start/st-ug-import-data/',
consoleModuleLink: 'https://docs.nebula-graph.com.cn/3.6.0/nebula-studio/quick-start/st-ug-console/',
sketchModuleLink: 'https://docs.nebula-graph.com.cn/3.6.0/nebula-studio/quick-start/draft/',
basketballplayerDocLink: 'https://nebula-graph.com.cn/posts/playground-basketball-player',
shareholdingDocLink: 'https://nebula-graph.com.cn/demo/shared-holding',
openstackDocLink: 'https://www.siwei.io/graph-enabled-infra-ops',
snsDocLink: 'https://www.siwei.io/nebulagraph-sns/',
supplychainDocLink: 'https://github.com/wey-gu/supplychain-dataset-gen',
datalineageDocLink: 'https://www.siwei.io/data-lineage-oss-ref-solution/',
movieDocLink: 'https://www.siwei.io/recommendation-system-with-graphdb/',
idMappingDocLink: 'https://www.siwei.io/identity-resolution/',
Expand Down
14 changes: 14 additions & 0 deletions app/pages/Welcome/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,20 @@ const getDatasetList = (): DatasetItem[] => {
coverImg: `${process.env.CDN_PATH || '/'}images/welcome/fifa2022.png`,
docLink: intl.get('welcome.fifa2022DocLink'),
},
{
type: 'solution',
tags: ['solution'],
description: intl.get('doc.supplychainIntro'),
spaceName: 'demo_supplychain',
fileName: 'supplychain',
rename: undefined as unknown as string,
detail: {
vertexCount: 40,
edgeCount: 62,
},
coverImg: `${process.env.CDN_PATH || '/'}images/welcome/supplychain.png`,
docLink: intl.get('welcome.supplychainDocLink'),
},
];
};

Expand Down
18 changes: 18 additions & 0 deletions public/datasets/supplychain.ngql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CREATE SPACE IF NOT EXISTS demo_supplychain (vid_type=FIXED_STRING(64), partition_num=1, replica_factor=1);
:sleep 10;
use demo_supplychain;
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);
:sleep 10;
INSERT VERTEX `car_model`(`name`, `number`, `year`, `type`, `engine_type`, `size`, `seats`) VALUES "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), "m_5":("Model E", "005", 2021, "Sedan", "Electric", "Medium", 5), "m_6":("Model F", "006", 2021, "Convertible", "Gasoline", "Compact", 2), "m_7":("Model G", "007", 2023, "Crossover", "Hybrid", "Medium", 5), "m_8":("Model H", "008", 2020, "Hatchback", "Electric", "Compact", 4), "m_9":("Model I", "009", 2022, "Sedan", "Gasoline", "Large", 5), "m_10":("Model J", "010", 2021, "SUV", "Hybrid", "Extra Large", 7);
INSERT VERTEX `supplier`(`name`, `address`, `contact`, `phone_number`) VALUES "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"), "s_35":("Supplier E", "202 Drive", "Michael Williams", "3334455667"), "s_36":("Supplier F", "303 Lane", "Susan Miller", "4445566778"), "s_37":("Supplier G", "404 Road", "Chris Lee", "5556677889"), "s_38":("Supplier H", "505 Street", "Jane Wilson", "6667788990"), "s_39":("Supplier I", "606 Way", "Brian Anderson", "7778899001"), "s_40":("Supplier J", "707 Avenue", "Linda Hall", "8889900112");
INSERT VERTEX `feature`(`name`, `number`, `type`, `state`) VALUES "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"), "f_15":("Backup Camera", "F005", "Optional", "Available"), "f_16":("Leather Seats", "F006", "Standard", "Available"), "f_17":("Adaptive Cruise", "F007", "Optional", "Available"), "f_18":("Blind Spot Monitor", "F008", "Standard", "Available"), "f_19":("Remote Start", "F009", "Optional", "N/A"), "f_20":("Apple CarPlay", "F010", "Standard", "Available");
INSERT VERTEX `part`(`name`, `number`, `price`, `date`) VALUES "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"), "p_25":("Radiator", "P005", 250, "2022-06-15"), "p_26":("Window Glass", "P006", 60, "2021-11-23"), "p_27":("Battery", "P007", 120, "2023-03-09"), "p_28":("Headlight", "P008", 90, "2023-07-30"), "p_29":("Alternator", "P009", 180, "2022-09-04"), "p_30":("Air Filter", "P010", 20, "2023-04-22");
INSERT EDGE `with_feature`(`version`) VALUES "m_1"->"f_12":("1.0"), "m_2"->"f_13":("1.0"), "m_3"->"f_14":("1.1"), "m_4"->"f_15":("1.2"), "m_5"->"f_11":("1.0"), "m_6"->"f_12":("1.0"), "m_7"->"f_13":("1.0"), "m_8"->"f_14":("1.0"), "m_9"->"f_15":("1.0"), "m_10"->"f_11":("1.0"), "m_2"->"f_12":("1.0"), "m_3"->"f_13":("1.1"), "m_4"->"f_14":("1.2"), "m_5"->"f_15":("1.0"), "m_6"->"f_11":("1.0"), "m_7"->"f_12":("1.0"), "m_8"->"f_13":("1.0"), "m_9"->"f_14":("1.0"), "m_10"->"f_15":("1.0"), "m_1"->"f_11":("1.0"), "m_2"->"f_12":("1.2"), "m_3"->"f_13":("1.1"), "m_4"->"f_12":("1.0"), "m_5"->"f_15":("1.3"), "m_6"->"f_11":("1.2"), "m_7"->"f_14":("1.0"), "m_8"->"f_13":("1.1"), "m_9"->"f_15":("1.2"), "m_10"->"f_12":("1.1"), "m_1"->"f_13":("1.3"), "m_2"->"f_14":("1.0"), "m_3"->"f_11":("1.1"), "m_4"->"f_14":("1.0"), "m_5"->"f_15":("1.2"), "m_6"->"f_13":("1.0"), "m_7"->"f_12":("1.1"), "m_8"->"f_15":("1.1"), "m_9"->"f_11":("1.2"), "m_10"->"f_14":("1.3"), "m_2"->"f_11":("1.0"), "m_3"->"f_12":("1.1"), "m_5"->"f_14":("1.0"), "m_6"->"f_15":("1.1"), "m_8"->"f_12":("1.2"), "m_9"->"f_13":("1.0"), "m_1"->"f_15":("1.2"), "m_7"->"f_13":("1.3"), "m_4"->"f_11":("1.0"), "m_10"->"f_15":("1.1");
INSERT EDGE `is_composed_of`(`version`) VALUES "f_11"->"p_21":("1.0"), "f_12"->"p_22":("1.0"), "f_13"->"p_23":("1.1"), "f_14"->"p_24":("1.2"), "f_15"->"p_21":("1.0"), "f_16"->"p_22":("1.0"), "f_17"->"p_23":("1.0"), "f_18"->"p_24":("1.0"), "f_19"->"p_25":("1.0"), "f_20"->"p_26":("1.0"), "f_11"->"p_27":("1.0"), "f_12"->"p_28":("1.0"), "f_13"->"p_29":("1.1"), "f_14"->"p_30":("1.2"), "f_15"->"p_21":("1.0"), "f_16"->"p_22":("1.0"), "f_17"->"p_23":("1.0"), "f_18"->"p_24":("1.0"), "f_19"->"p_25":("1.0"), "f_20"->"p_26":("1.0");
INSERT EDGE `is_supplied_by`(`version`) VALUES "p_21"->"s_31":("1.0"), "p_22"->"s_32":("1.0"), "p_23"->"s_33":("1.1"), "p_24"->"s_34":("1.2"), "p_25"->"s_35":("1.0"), "p_26"->"s_36":("1.0"), "p_27"->"s_37":("1.0"), "p_28"->"s_38":("1.0"), "p_29"->"s_39":("1.1"), "p_30"->"s_40":("1.2"), "p_21"->"s_31":("1.0"), "p_22"->"s_32":("1.0"), "p_23"->"s_33":("1.1"), "p_24"->"s_34":("1.2"), "p_25"->"s_35":("1.0"), "p_26"->"s_36":("1.0"), "p_27"->"s_37":("1.0"), "p_28"->"s_38":("1.0"), "p_29"->"s_39":("1.1"), "p_30"->"s_40":("1.2");
Binary file added public/images/welcome/supplychain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.