Skip to content

Commit ff117bf

Browse files
authored
Merge pull request #26 from OpenDataManchester/mermaid-diagrams
Add ERD to all specs. Remove png diagrams
2 parents aee16e4 + c5a8f0e commit ff117bf

8 files changed

Lines changed: 212 additions & 29 deletions

File tree

docs/1_Start_Here/1_4_Data_Schema.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,20 @@ description: The current data schema of the Open 3P open data standard for the p
44
---
55

66
# Data Schema
7-
8-
<!-- ``` mermaid
7+
``` mermaid
98
erDiagram
109
MATERIALS_CATALOGUE }o--o{ MATERIAL : within
1110
MATERIAL }o--o{ COMPONENT_CATALOGUE : within
1211
COMPONENT_CATALOGUE }o--o{ COMPLETE_PACKAGING : within
1312
COMPLETE_PACKAGING }o..o{ MULTIPACK : within
1413
COMPONENT_CATALOGUE }o..o{ MULTIPACK : within
15-
MULTIPACK }o..o{ LOAD_CATALOGUE : within
1614
COMPLETE_PACKAGING }o--o{ LOAD_CATALOGUE : within
15+
MULTIPACK }o..o{ LOAD_CATALOGUE : within
1716
COMPONENT_CATALOGUE }o--o{ LOAD_CATALOGUE : within
1817
LOAD_CATALOGUE }o--o{ LOAD : within
19-
``` -->
18+
```
2019

21-
<figure markdown>
20+
<!-- <figure markdown>
2221
[![Schema](../img/schema-v1.1-2022-12-20.jpg)](https://opendatamanchester.github.io/PPP/img/schema-v1.1-2022-12-20.jpg){target=_blank}
2322
<figcaption>Data schema</figcaption>
24-
</figure>
23+
</figure> -->

docs/3_Data_Specification/3_1_Material_Catalogue.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ The materials catalogue schema contains information regarding the base material.
2121

2222
## Diagram
2323

24-
<!-- ``` mermaid
24+
``` mermaid
2525
erDiagram
26-
MATERIAL_TYPE }o..o{ MATERIALS_CATALOGUE : atritube
27-
MATERIAL_PURPOSE }o..o{ MATERIALS_CATALOGUE : atritube
28-
MATERIAL_CATEGORY }o--o{ MATERIALS_CATALOGUE : atritube
2926
MATERIALS_CATALOGUE {
3027
identifier String
3128
materialVolume numeric
@@ -37,13 +34,19 @@ erDiagram
3734
virginMaterial numeric
3835
updateDate String
3936
}
37+
MATERIALS_CATALOGUE }o..o{ CONTOLLED_LISTS : attritubes
4038
MATERIALS_CATALOGUE }o--o{ MATERIALS : within
41-
``` -->
39+
CONTOLLED_LISTS {
40+
materialType recommended
41+
materialPurpose recommended
42+
materialCategory required
43+
}
44+
```
4245

43-
<figure markdown>
46+
<!-- <figure markdown>
4447
[![Schema](../img/material_catalogue-v1.0.0-22-12-20.png){ width="450" }](https://opendatamanchester.github.io/PPP/img/material_catalogue-v1.0.0-22-12-20.png){target=_blank}
4548
<figcaption>Data schema</figcaption>
46-
</figure>
49+
</figure> -->
4750

4851
## Template
4952

docs/3_Data_Specification/3_2_Material.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,29 @@ The materials schema contains information regarding the materials that are used
1919

2020
## Diagram
2121

22-
<figure markdown>
22+
``` mermaid
23+
erDiagram
24+
MATERIALS_CATALOGUE }o--o{ MATERIALS : within
25+
MATERIALS {
26+
identifier String
27+
materialIdentifier numeric
28+
materialCatalogue String
29+
layer String
30+
materialWeight String
31+
combinationPurpose String
32+
updateDate String
33+
}
34+
MATERIALS }o..o{ CONTOLLED_LISTS : attritubes
35+
MATERIALS }o--o{ COMPONENT_CATALOGUE : within
36+
CONTOLLED_LISTS {
37+
materialFunction recommended
38+
}
39+
```
40+
41+
<!-- <figure markdown>
2342
[![Schema](../img/materials-v1.0-2022-12-20.png){ width="450" }](https://opendatamanchester.github.io/PPP/img/materials-v1.0-2022-12-20.png){target=_blank}
2443
<figcaption>Data schema</figcaption>
25-
</figure>
44+
</figure> -->
2645

2746
## Template
2847
Materials should be provided as a separate csv file, in tidy format. This means that each row of the csv file should be one material for a component. An example is provided.

docs/3_Data_Specification/3_3_Component_Catalogue.md

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,74 @@ The component catalogue schema contains information regarding the components tha
5252

5353
## Diagram
5454

55-
<figure markdown>
55+
``` mermaid
56+
erDiagram
57+
MATERIALS }o--o{ COMPONENT_CATALOGUE : within
58+
COMPONENT_CATALOGUE {
59+
identifier String
60+
name numeric
61+
description String
62+
tags Dictionary
63+
imageURL URL
64+
LOWcode String
65+
height Numeric
66+
heightDate String
67+
width Numeric
68+
widthDate String
69+
depth Numeric
70+
depthDate String
71+
volume Numeric
72+
volumeDate String
73+
weight Numeric
74+
weightTolerance Numeric
75+
weightDate String
76+
shape String
77+
function String
78+
flexibility String
79+
branding Boolean
80+
componentRecyclingDisruptors String
81+
colour String
82+
opacity String
83+
loaned Boolean
84+
reuseSystem String
85+
manufacturedCountry Numeric
86+
recycledContent Numeric
87+
recycledContentEvidenceType String
88+
recycledContentEvidenceReference String
89+
recyclability Boolean
90+
recyclabilitySource String
91+
recyclabilityDate String
92+
partOfMultipack Boolean
93+
previouslyAssembledComponent Boolean
94+
componentLink String
95+
updateDate String
96+
releaseDate String
97+
discontinueDate String
98+
}
99+
COMPONENT_CATALOGUE }o..o{ CONTOLLED_LISTS : attritubes
100+
COMPONENT_CATALOGUE }o--o{ COMPLETE_PACKAGING : within
101+
COMPONENT_CATALOGUE }o..o{ MULTIPACK : within
102+
MULTIPACK }o..o{ LOAD_CATALOGUE : within
103+
COMPLETE_PACKAGING }o..o{ MULTIPACK : within
104+
COMPLETE_PACKAGING }o..o{ LOAD_CATALOGUE : within
105+
COMPONENT_CATALOGUE }o..o{ LOAD_CATALOGUE : within
106+
CONTOLLED_LISTS {
107+
recyclabilitySource recommended
108+
shape recommended
109+
function recommended
110+
flexibility recommended
111+
componentRecyclingDisruptors recommended
112+
opacity recommended
113+
recycledContentEvidenceType required
114+
}
115+
```
116+
117+
<!-- <figure markdown>
56118
[![Schema](../img/component-catalogue-v1.0.0-22-12-20.png){ width="800" }](https://opendatamanchester.github.io/PPP/img/component-catalogue-v1.0.0-22-12-20.png){target=_blank}
57119
<figcaption>Data schema</figcaption>
58120
</figure>
59121
60-
## Template
122+
## Template -->
61123

62124
Components should be provided as a separate csv file, in tidy format. This means that each row of the csv file should be one component of a complete package. An example is provided.
63125

docs/3_Data_Specification/3_4_Complete_Packaging.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,61 @@ The complete packaging schema contains information regarding the complete packag
4646

4747
## Diagram
4848

49+
``` mermaid
50+
erDiagram
51+
COMPONENT_CATALOGUE }o--o{ COMPLETE_PACKAGING : within
52+
COMPLETE_PACKAGING {
53+
identifier String
54+
name String
55+
description String
56+
tags Dictionary
57+
imageURL URL
58+
componentItems String
59+
LOWcodeWOproduct String
60+
productType String
61+
componentContactWithProduct String
62+
LOWcodeWproduct String
63+
onTheGo Boolean
64+
householdWaste Boolean
65+
depositReturnScheme String
66+
recyclingDisruptors String
67+
recyclability Boolean
68+
recyclabilitySource String
69+
recyclabilityDate String
70+
height Numeric
71+
heightDate String
72+
width Numeric
73+
widthDate String
74+
depth Numeric
75+
depthDate String
76+
volume Numeric
77+
volumeDate String
78+
weight Numeric
79+
weightTolerance Numeric
80+
weightDate String
81+
servingCapacity Numeric
82+
servingCapacityDate String
83+
partOfMultipack Boolean
84+
updateDate String
85+
releaseDate String
86+
discontinueDate String
87+
}
88+
COMPLETE_PACKAGING }o..o{ CONTOLLED_LISTS : attritubes
89+
COMPLETE_PACKAGING }o..o{ MULTIPACK : within
90+
COMPONENT_CATALOGUE }o..o{ MULTIPACK : within
91+
COMPLETE_PACKAGING }o..o{ LOAD_CATALOGUE : within
92+
MULTIPACK }o..o{ LOAD_CATALOGUE : within
93+
COMPONENT_CATALOGUE }o..o{ LOAD_CATALOGUE : within
94+
CONTOLLED_LISTS {
95+
productType recommended
96+
depositReturnScheme recommended
97+
recyclingDisruptors recommended
98+
recyclabilitySource recommended
99+
}
100+
```
101+
49102
<figure markdown>
50-
[![Schema](../img/complete-packaging-v1.0.0-22-12-20.png){ width="800" }](https://opendatamanchester.github.io/PPP/img/complete-packaging-v1.0.0-22-12-20.png)){target=_blank}
103+
[![Schema](../img/complete-packaging-v1.0.0-22-12-20.png){ width="800" }](https://opendatamanchester.github.io/PPP/img/complete-packaging-v1.0.0-22-12-20.png){target=_blank}
51104
<figcaption>Data schema</figcaption>
52105
</figure>
53106

docs/3_Data_Specification/3_5_Multipack.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ The multipack schema contains information regarding the multipacks that are used
2525

2626
## Diagram
2727

28-
<!-- ``` mermaid
28+
``` mermaid
2929
erDiagram
30-
LOAD_CATATLOGUE }o..o{ MULTIPACK : part
30+
COMPONENT_CATALOGUE }o..o{ MULTIPACK : within
31+
COMPONENT_CATALOGUE }o..o{ COMPLETE_PACKAGING : within
32+
COMPLETE_PACKAGING }o..o{ MULTIPACK : within
3133
MULTIPACK {
3234
identifier String
3335
name String
@@ -41,14 +43,15 @@ erDiagram
4143
releaseDate String
4244
discontinueDate String
4345
}
44-
MULTIPACK }o--o{ COMPLETE_PACKAGING : contains
45-
MULTIPACK }o--o{ COMPONENT_CATATLOGUE : contains
46-
``` -->
46+
COMPLETE_PACKAGING }o..o{ LOAD_CATALOGUE : within
47+
MULTIPACK }o..o{ LOAD_CATALOGUE : within
48+
COMPONENT_CATALOGUE }o--o{ LOAD_CATALOGUE : within
49+
```
4750

48-
<figure markdown>
51+
<!-- <figure markdown>
4952
[![Schema](../img/multipack-v1.0.0-22-12-20.png){ width="450" }](https://opendatamanchester.github.io/PPP/img/multipack-v1.0.0-22-12-20.png){target=_blank}
5053
<figcaption>Data schema</figcaption>
51-
</figure>
54+
</figure> -->
5255

5356
## Template
5457

docs/3_Data_Specification/3_6_Load_Catalogue.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,35 @@ All the complete packaging from different levels (primary, secondary, and tertia
2121

2222
## Diagram
2323

24-
<figure markdown>
24+
``` mermaid
25+
erDiagram
26+
COMPONENT_CATALOGUE }o..o{ LOAD_CATALOGUE : within
27+
COMPONENT_CATALOGUE }o..o{ COMPLETE_PACKAGING : within
28+
COMPONENT_CATALOGUE }o..o{ MULTIPACK : within
29+
MULTIPACK }o..o{ LOAD_CATALOGUE : within
30+
COMPLETE_PACKAGING }o..o{ LOAD_CATALOGUE : within
31+
COMPLETE_PACKAGING }o..o{ MULTIPACK : within
32+
33+
LOAD_CATALOGUE {
34+
identifier String
35+
materialIdentifier numeric
36+
materialCatalogue String
37+
layer String
38+
materialWeight String
39+
combinationPurpose String
40+
updateDate String
41+
}
42+
LOAD_CATALOGUE }o..o{ CONTOLLED_LISTS : attritubes
43+
LOAD_CATALOGUE }o--o{ LOAD : within
44+
CONTOLLED_LISTS {
45+
level required
46+
}
47+
```
48+
49+
<!-- <figure markdown>
2550
[![Schema](../img/load-catalogue-v1.0.0-22-12-20.png){ width="450" }](https://opendatamanchester.github.io/PPP/img/load-catalogue-v1.0.0-22-12-20.png){target=_blank}
2651
<figcaption>Data schema</figcaption>
27-
</figure>
52+
</figure> -->
2853

2954
## Template
3055

docs/3_Data_Specification/3_7_Load.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,29 @@ All the complete packaging from different levels (primary, secondary, and tertia
2525

2626
## Diagram
2727

28-
<figure markdown>
28+
``` mermaid
29+
erDiagram
30+
LOAD_CATALOGUE }o..o{ LOAD : within
31+
LOAD {
32+
identifier String
33+
name numeric
34+
description String
35+
tags Dictionary
36+
loadIdentifier String
37+
startDate String
38+
destinationAddressName String
39+
destinationAddressStreet String
40+
destinationAddressCountry String
41+
destinationPostalCode String
42+
timesSent Numeric
43+
updateDate String
44+
}
45+
```
46+
47+
<!-- <figure markdown>
2948
[![Schema](../img/load-v1.0.0-22-12-20.png){ width="450" }](https://opendatamanchester.github.io/PPP/img/load-v1.0.0-22-12-20.png){target=_blank}
3049
<figcaption>Data schema</figcaption>
31-
</figure>
50+
</figure> -->
3251

3352
## Template
3453

0 commit comments

Comments
 (0)