-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.json
More file actions
98 lines (98 loc) · 2.83 KB
/
schema.json
File metadata and controls
98 lines (98 loc) · 2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Government Visualization Data Schema",
"description": "Schema for hierarchical government structure data",
"type": "object",
"required": ["metadata", "nodes", "edges"],
"properties": {
"metadata": {
"type": "object",
"required": ["title", "description", "lastUpdated"],
"properties": {
"title": {
"type": "string",
"description": "Name of the structure being visualized"
},
"description": {
"type": "string",
"description": "Brief description of the structure"
},
"lastUpdated": {
"type": "string",
"format": "date",
"description": "Last update date in YYYY-MM-DD format"
},
"country": {
"type": "string",
"description": "Country name (optional)"
},
"source": {
"type": "string",
"description": "Source of the data (optional)"
}
}
},
"nodes": {
"type": "array",
"description": "List of nodes in the graph",
"items": {
"type": "object",
"required": ["id", "label", "type"],
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the node"
},
"label": {
"type": "string",
"description": "Display name of the node"
},
"type": {
"type": "string",
"enum": ["executive", "legislative", "judicial", "constitutional", "ministry", "provincial", "local"],
"description": "Type of the node (determines color)"
},
"tier": {
"type": "number",
"description": "Hierarchy tier (optional, for layout)"
},
"description": {
"type": "string",
"description": "Detailed description (optional)"
},
"currentHolder": {
"type": "string",
"description": "Current office holder (optional)"
},
"metadata": {
"type": "object",
"description": "Additional metadata as key-value pairs (optional)",
"additionalProperties": true
}
}
}
},
"edges": {
"type": "array",
"description": "List of relationships between nodes",
"items": {
"type": "object",
"required": ["from", "to"],
"properties": {
"from": {
"type": "string",
"description": "Source node ID"
},
"to": {
"type": "string",
"description": "Target node ID"
},
"relationship": {
"type": "string",
"description": "Type of relationship (optional)"
}
}
}
}
}
}