@chengxianglibra/dsh-data-analysis 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -34
- package/lib/bin/environment.js +1 -1
- package/lib/bin/presentation-lint.js +21 -0
- package/lib/bridges.js +2 -2
- package/lib/client/credentials/create-datasource.js +67 -0
- package/lib/client/credentials/install.js +191 -0
- package/lib/client/credentials/model.js +494 -0
- package/lib/client/credentials/styles.js +17 -0
- package/lib/client/workspace-header-action.js +11 -0
- package/lib/client.js +1133 -736
- package/lib/compatibility.js +1 -1
- package/lib/datasource/authoring.js +70 -0
- package/lib/datasource/bridge-programs.js +30 -18
- package/lib/datasource/bridge.js +100 -8
- package/lib/datasource/index.js +3 -2
- package/lib/datasource/python.js +115 -0
- package/lib/datasource/resolver-program.js +112 -0
- package/lib/datasource/rpc.js +88 -0
- package/lib/datasource/service.js +687 -0
- package/lib/datasource/shell-env.js +2 -333
- package/lib/datasource/test.js +24 -51
- package/lib/environment/binding.js +54 -9
- package/lib/environment/runtime.js +89 -78
- package/lib/environment/subprocess.js +6 -1
- package/lib/environment/summary.js +3 -3
- package/lib/environment/workspace.js +5 -0
- package/lib/index.js +1 -1
- package/lib/plugin.js +168 -51
- package/lib/presentation/assets/portable.js +606 -0
- package/lib/presentation/assets/static.js +945 -0
- package/lib/presentation/build/index.js +71 -0
- package/lib/presentation/commit.js +156 -0
- package/lib/presentation/contracts/charts.js +476 -0
- package/lib/presentation/contracts/editing.js +58 -0
- package/lib/presentation/contracts/index.js +651 -0
- package/lib/presentation/contracts/interaction.js +62 -0
- package/lib/presentation/contracts/types.js +15 -0
- package/lib/presentation/contracts/values.js +28 -0
- package/lib/presentation/delivery.js +56 -0
- package/lib/presentation/files.js +83 -0
- package/lib/presentation/index.js +6 -0
- package/lib/presentation/lint.js +46 -0
- package/lib/presentation/projection/files.js +85 -0
- package/lib/presentation/projection/index.js +195 -0
- package/lib/presentation/projection/program.js +144 -0
- package/lib/presentation/projection/sql-code.js +79 -0
- package/lib/presentation/receipt.js +34 -0
- package/lib/presentation/reports.js +122 -0
- package/lib/presentation/rpc.js +148 -0
- package/lib/presentation/tool.js +122 -0
- package/lib/python-execution-contracts.js +1 -0
- package/lib/python-execution.js +232 -0
- package/lib/semantic-browser/contracts.js +80 -0
- package/lib/semantic-browser/definition.js +64 -0
- package/lib/semantic-browser/program.js +119 -0
- package/lib/semantic-browser/service.js +72 -0
- package/lib/semantic-reference/bridge.js +118 -0
- package/lib/semantic-reference/contracts.js +113 -0
- package/lib/semantic-reference/index.js +3 -0
- package/lib/semantic-reference/rpc.js +122 -0
- package/lib/semantic-reference/search.js +94 -0
- package/lib/semantic-reference/usage.js +143 -0
- package/lib/types/bridges.d.ts +2 -2
- package/lib/types/client/credentials/create-datasource.d.ts +5 -0
- package/lib/types/client/credentials/install.d.ts +1 -0
- package/lib/types/client/credentials/model.d.ts +59 -0
- package/lib/types/client/credentials/styles.d.ts +1 -0
- package/lib/types/client/presentation/ask-dsh.d.ts +9 -0
- package/lib/types/client/presentation/chart-explorer.d.ts +12 -0
- package/lib/types/client/presentation/chart-geometry.d.ts +30 -0
- package/lib/types/client/presentation/chart-renderer.d.ts +10 -0
- package/lib/types/client/presentation/chart-specials.d.ts +10 -0
- package/lib/types/client/presentation/chart-styles.d.ts +1 -0
- package/lib/types/client/presentation/chart-tooltip.d.ts +13 -0
- package/lib/types/client/presentation/chart-view.d.ts +23 -0
- package/lib/types/client/presentation/copy-context.d.ts +5 -0
- package/lib/types/client/presentation/delivery-model.d.ts +54 -0
- package/lib/types/client/presentation/delivery.d.ts +77 -0
- package/lib/types/client/presentation/editor-controls.d.ts +12 -0
- package/lib/types/client/presentation/global-filters.d.ts +6 -0
- package/lib/types/client/presentation/host-entry.d.ts +12 -0
- package/lib/types/client/presentation/icons.d.ts +4 -0
- package/lib/types/client/presentation/install.d.ts +15 -0
- package/lib/types/client/presentation/markdown.d.ts +5 -0
- package/lib/types/client/presentation/model.d.ts +62 -0
- package/lib/types/client/presentation/reader.d.ts +11 -0
- package/lib/types/client/presentation/source-code-model.d.ts +16 -0
- package/lib/types/client/presentation/source-code.d.ts +11 -0
- package/lib/types/client/presentation/source-dialog.d.ts +13 -0
- package/lib/types/client/presentation/source-facts.d.ts +20 -0
- package/lib/types/client/presentation/source-format.d.ts +5 -0
- package/lib/types/client/presentation/source-highlight.d.ts +7 -0
- package/lib/types/client/presentation/sources.d.ts +13 -0
- package/lib/types/client/presentation/styles.d.ts +1 -0
- package/lib/types/client/presentation/table.d.ts +12 -0
- package/lib/types/client/presentation/use-element-width.d.ts +5 -0
- package/lib/types/client/workspace-header-action.d.ts +7 -0
- package/lib/types/client.d.ts +4 -122
- package/lib/types/compatibility.d.ts +2 -2
- package/lib/types/datasource/authoring.d.ts +25 -0
- package/lib/types/datasource/bridge.d.ts +21 -3
- package/lib/types/datasource/index.d.ts +3 -5
- package/lib/types/datasource/python.d.ts +4 -0
- package/lib/types/datasource/resolver-program.d.ts +6 -0
- package/lib/types/datasource/rpc.d.ts +4 -0
- package/lib/types/datasource/service.d.ts +112 -0
- package/lib/types/datasource/shell-env.d.ts +0 -29
- package/lib/types/datasource/test.d.ts +6 -29
- package/lib/types/environment/binding.d.ts +5 -1
- package/lib/types/environment/errors.d.ts +1 -1
- package/lib/types/environment/runtime.d.ts +5 -5
- package/lib/types/environment/types.d.ts +13 -2
- package/lib/types/index.d.ts +1 -1
- package/lib/types/plugin.d.ts +11 -5
- package/lib/types/presentation/build/index.d.ts +11 -0
- package/lib/types/presentation/commit.d.ts +4 -0
- package/lib/types/presentation/contracts/charts.d.ts +13 -0
- package/lib/types/presentation/contracts/editing.d.ts +8 -0
- package/lib/types/presentation/contracts/index.d.ts +11 -0
- package/lib/types/presentation/contracts/interaction.d.ts +8 -0
- package/lib/types/presentation/contracts/types.d.ts +252 -0
- package/lib/types/presentation/contracts/values.d.ts +9 -0
- package/lib/types/presentation/delivery.d.ts +3 -0
- package/lib/types/presentation/files.d.ts +7 -0
- package/lib/types/presentation/index.d.ts +6 -0
- package/lib/types/presentation/lint.d.ts +13 -0
- package/lib/types/presentation/projection/files.d.ts +2 -0
- package/lib/types/presentation/projection/index.d.ts +20 -0
- package/lib/types/presentation/projection/program.d.ts +2 -0
- package/lib/types/presentation/projection/sql-code.d.ts +2 -0
- package/lib/types/presentation/receipt.d.ts +14 -0
- package/lib/types/presentation/reports.d.ts +5 -0
- package/lib/types/presentation/rpc.d.ts +24 -0
- package/lib/types/presentation/tool.d.ts +12 -0
- package/lib/types/python-execution-contracts.d.ts +10 -0
- package/lib/types/python-execution.d.ts +10 -0
- package/lib/types/semantic-browser/contracts.d.ts +40 -0
- package/lib/types/semantic-browser/definition.d.ts +20 -0
- package/lib/types/semantic-browser/program.d.ts +2 -0
- package/lib/types/semantic-browser/service.d.ts +20 -0
- package/lib/types/semantic-reference/bridge.d.ts +11 -0
- package/lib/types/semantic-reference/contracts.d.ts +51 -0
- package/lib/types/semantic-reference/index.d.ts +3 -0
- package/lib/types/semantic-reference/rpc.d.ts +15 -0
- package/lib/types/semantic-reference/search.d.ts +10 -0
- package/lib/types/semantic-reference/usage.d.ts +43 -0
- package/package.json +43 -19
- package/python/presentation-kit/dist/dsh_data_analysis_presentation_kit-1.1.0-py3-none-any.whl +0 -0
- package/skills/dsh-data-analysis-presentation/SKILL.md +24 -0
- package/skills/dsh-data-analysis-presentation/references/chart-examples.md +18 -0
- package/skills/dsh-data-analysis-presentation/references/charts.md +55 -0
- package/skills/dsh-data-analysis-presentation/references/examples/artifact.draft.json +27 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-bins.dataset.json +33 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-boxes.dataset.json +45 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-composition.dataset.json +33 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-funnel.dataset.json +27 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-precision.dataset.json +21 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-series.dataset.json +58 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-shares.dataset.json +33 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-waterfall.dataset.json +44 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts.draft.json +392 -0
- package/skills/dsh-data-analysis-presentation/references/examples/comparison-selected.dataset.json +24 -0
- package/skills/dsh-data-analysis-presentation/references/examples/comparison-summary.dataset.json +22 -0
- package/skills/dsh-data-analysis-presentation/references/examples/comparison.dataset.json +18 -0
- package/skills/dsh-data-analysis-presentation/references/examples/comparison.draft.json +79 -0
- package/skills/dsh-data-analysis-presentation/references/examples/computed-sources.draft.json +35 -0
- package/skills/dsh-data-analysis-presentation/references/examples/computed.dataset.json +12 -0
- package/skills/dsh-data-analysis-presentation/references/examples/computed.draft.json +57 -0
- package/skills/dsh-data-analysis-presentation/references/examples/interaction-detail.dataset.json +30 -0
- package/skills/dsh-data-analysis-presentation/references/examples/interaction-summary.dataset.json +22 -0
- package/skills/dsh-data-analysis-presentation/references/examples/interaction.draft.json +278 -0
- package/skills/dsh-data-analysis-presentation/references/examples/source-only.draft.json +19 -0
- package/skills/dsh-data-analysis-presentation/references/examples/write-charts.py +73 -0
- package/skills/dsh-data-analysis-presentation/references/examples/write-comparison.py +42 -0
- package/skills/dsh-data-analysis-presentation/references/examples/write-computed.py +21 -0
- package/skills/dsh-data-analysis-presentation/references/examples/write-interaction.py +33 -0
- package/skills/dsh-data-analysis-presentation/references/examples.md +42 -0
- package/skills/dsh-data-analysis-presentation/references/interaction.md +56 -0
- package/skills/dsh-data-analysis-presentation/references/narrative.md +37 -0
- package/skills/dsh-data-analysis-presentation/references/schema.md +138 -0
- package/lib/datasource/access.js +0 -60
- package/lib/datasource/credentials.js +0 -24
- package/lib/evidence/bridge-program.js +0 -153
- package/lib/evidence/bridge.js +0 -166
- package/lib/evidence/index.js +0 -2
- package/lib/evidence/sources.js +0 -263
- package/lib/types/datasource/access.d.ts +0 -27
- package/lib/types/evidence/bridge.d.ts +0 -40
- package/lib/types/evidence/index.d.ts +0 -4
- package/lib/types/evidence/sources.d.ts +0 -57
- package/python/report-kit/dist/dsh_data_analysis_report_kit-3.0.0-py3-none-any.whl +0 -0
- package/skills/dsh-data-analysis-report/SKILL.md +0 -57
- package/skills/dsh-data-analysis-report/assets/marivo-artifact.js +0 -113
- package/skills/dsh-data-analysis-report/assets/marivo-session-dag.js +0 -1201
- package/skills/dsh-data-analysis-report/assets/report-data.js +0 -449
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"title": "图表与探索样例(全部为合成演示数据)",
|
|
4
|
+
"datasets": [
|
|
5
|
+
{
|
|
6
|
+
"id": "charts-series",
|
|
7
|
+
"kind": "computed",
|
|
8
|
+
"path": "presentation-example/charts-series.dataset.json",
|
|
9
|
+
"sourceIds": []
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "charts-shares",
|
|
13
|
+
"kind": "computed",
|
|
14
|
+
"path": "presentation-example/charts-shares.dataset.json",
|
|
15
|
+
"sourceIds": []
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "charts-bins",
|
|
19
|
+
"kind": "computed",
|
|
20
|
+
"path": "presentation-example/charts-bins.dataset.json",
|
|
21
|
+
"sourceIds": []
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "charts-boxes",
|
|
25
|
+
"kind": "computed",
|
|
26
|
+
"path": "presentation-example/charts-boxes.dataset.json",
|
|
27
|
+
"sourceIds": []
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "charts-composition",
|
|
31
|
+
"kind": "computed",
|
|
32
|
+
"path": "presentation-example/charts-composition.dataset.json",
|
|
33
|
+
"sourceIds": []
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "charts-funnel",
|
|
37
|
+
"kind": "computed",
|
|
38
|
+
"path": "presentation-example/charts-funnel.dataset.json",
|
|
39
|
+
"sourceIds": []
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "charts-waterfall",
|
|
43
|
+
"kind": "computed",
|
|
44
|
+
"path": "presentation-example/charts-waterfall.dataset.json",
|
|
45
|
+
"sourceIds": []
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "charts-precision",
|
|
49
|
+
"kind": "computed",
|
|
50
|
+
"path": "presentation-example/charts-precision.dataset.json",
|
|
51
|
+
"sourceIds": []
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"sources": [],
|
|
55
|
+
"blocks": [
|
|
56
|
+
{
|
|
57
|
+
"id": "intro",
|
|
58
|
+
"kind": "markdown",
|
|
59
|
+
"text": "全部为合成演示数据。统计量在 Python 示例中预计算;探索只改变本次页面显示。"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "gallery-line",
|
|
63
|
+
"kind": "chart",
|
|
64
|
+
"datasetId": "charts-series",
|
|
65
|
+
"chart": "line",
|
|
66
|
+
"x": "period",
|
|
67
|
+
"y": ["a", "b"],
|
|
68
|
+
"numericMode": "exact",
|
|
69
|
+
"preparedViews": [
|
|
70
|
+
{
|
|
71
|
+
"id": "prepared-stackedBar100",
|
|
72
|
+
"label": "stackedBar100",
|
|
73
|
+
"datasetId": "charts-shares",
|
|
74
|
+
"chart": "stackedBar100",
|
|
75
|
+
"x": "category",
|
|
76
|
+
"y": ["a", "b"],
|
|
77
|
+
"numericMode": "exact",
|
|
78
|
+
"bindings": {
|
|
79
|
+
"denominator": "denominator"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "prepared-histogram",
|
|
84
|
+
"label": "histogram",
|
|
85
|
+
"datasetId": "charts-bins",
|
|
86
|
+
"chart": "histogram",
|
|
87
|
+
"x": "bin",
|
|
88
|
+
"y": ["frequency"],
|
|
89
|
+
"numericMode": "exact",
|
|
90
|
+
"bindings": {
|
|
91
|
+
"binStart": "lower",
|
|
92
|
+
"binEnd": "upper"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "prepared-scatter",
|
|
97
|
+
"label": "scatter",
|
|
98
|
+
"datasetId": "charts-series",
|
|
99
|
+
"chart": "scatter",
|
|
100
|
+
"x": "coordinate",
|
|
101
|
+
"y": ["a"],
|
|
102
|
+
"numericMode": "exact",
|
|
103
|
+
"bindings": {
|
|
104
|
+
"size": "volume",
|
|
105
|
+
"label": "period",
|
|
106
|
+
"color": "segment"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "prepared-waterfall",
|
|
111
|
+
"label": "waterfall",
|
|
112
|
+
"datasetId": "charts-waterfall",
|
|
113
|
+
"chart": "waterfall",
|
|
114
|
+
"x": "step",
|
|
115
|
+
"y": ["change"],
|
|
116
|
+
"numericMode": "exact",
|
|
117
|
+
"bindings": {
|
|
118
|
+
"start": "start",
|
|
119
|
+
"end": "end",
|
|
120
|
+
"role": "role"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "prepared-boxPlot",
|
|
125
|
+
"label": "boxPlot",
|
|
126
|
+
"datasetId": "charts-boxes",
|
|
127
|
+
"chart": "boxPlot",
|
|
128
|
+
"x": "group",
|
|
129
|
+
"y": ["median"],
|
|
130
|
+
"numericMode": "exact",
|
|
131
|
+
"bindings": {
|
|
132
|
+
"minimum": "minimum",
|
|
133
|
+
"q1": "q1",
|
|
134
|
+
"q3": "q3",
|
|
135
|
+
"maximum": "maximum"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"options": {
|
|
140
|
+
"showPoints": "always",
|
|
141
|
+
"series": {
|
|
142
|
+
"a": {
|
|
143
|
+
"lineStyle": "solid",
|
|
144
|
+
"role": "actual"
|
|
145
|
+
},
|
|
146
|
+
"b": {
|
|
147
|
+
"lineStyle": "dashed",
|
|
148
|
+
"role": "forecast"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"valueLabels": "none",
|
|
152
|
+
"referenceLines": [
|
|
153
|
+
{
|
|
154
|
+
"axis": "y",
|
|
155
|
+
"value": 20,
|
|
156
|
+
"label": "参考值"
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": "gallery-area",
|
|
163
|
+
"kind": "chart",
|
|
164
|
+
"datasetId": "charts-series",
|
|
165
|
+
"chart": "area",
|
|
166
|
+
"x": "period",
|
|
167
|
+
"y": ["a", "b"],
|
|
168
|
+
"numericMode": "exact"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id": "gallery-stackedArea",
|
|
172
|
+
"kind": "chart",
|
|
173
|
+
"datasetId": "charts-series",
|
|
174
|
+
"chart": "stackedArea",
|
|
175
|
+
"x": "period",
|
|
176
|
+
"y": ["a", "b"],
|
|
177
|
+
"numericMode": "exact"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"id": "gallery-bar",
|
|
181
|
+
"kind": "chart",
|
|
182
|
+
"datasetId": "charts-series",
|
|
183
|
+
"chart": "bar",
|
|
184
|
+
"x": "period",
|
|
185
|
+
"y": ["a", "b"],
|
|
186
|
+
"numericMode": "exact"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"id": "gallery-horizontalBar",
|
|
190
|
+
"kind": "chart",
|
|
191
|
+
"datasetId": "charts-series",
|
|
192
|
+
"chart": "horizontalBar",
|
|
193
|
+
"x": "period",
|
|
194
|
+
"y": ["a", "b"],
|
|
195
|
+
"numericMode": "exact"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"id": "gallery-stackedBar",
|
|
199
|
+
"kind": "chart",
|
|
200
|
+
"datasetId": "charts-series",
|
|
201
|
+
"chart": "stackedBar",
|
|
202
|
+
"x": "period",
|
|
203
|
+
"y": ["a", "b"],
|
|
204
|
+
"numericMode": "exact"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"id": "gallery-stackedBar100",
|
|
208
|
+
"kind": "chart",
|
|
209
|
+
"datasetId": "charts-shares",
|
|
210
|
+
"chart": "stackedBar100",
|
|
211
|
+
"x": "category",
|
|
212
|
+
"y": ["a", "b"],
|
|
213
|
+
"numericMode": "exact",
|
|
214
|
+
"bindings": {
|
|
215
|
+
"denominator": "denominator"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"id": "gallery-horizontalStackedBar",
|
|
220
|
+
"kind": "chart",
|
|
221
|
+
"datasetId": "charts-series",
|
|
222
|
+
"chart": "horizontalStackedBar",
|
|
223
|
+
"x": "period",
|
|
224
|
+
"y": ["a", "b"],
|
|
225
|
+
"numericMode": "exact"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"id": "gallery-horizontalStackedBar100",
|
|
229
|
+
"kind": "chart",
|
|
230
|
+
"datasetId": "charts-shares",
|
|
231
|
+
"chart": "horizontalStackedBar100",
|
|
232
|
+
"x": "category",
|
|
233
|
+
"y": ["a", "b"],
|
|
234
|
+
"numericMode": "exact",
|
|
235
|
+
"bindings": {
|
|
236
|
+
"denominator": "denominator"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"id": "gallery-histogram",
|
|
241
|
+
"kind": "chart",
|
|
242
|
+
"datasetId": "charts-bins",
|
|
243
|
+
"chart": "histogram",
|
|
244
|
+
"x": "bin",
|
|
245
|
+
"y": ["frequency"],
|
|
246
|
+
"numericMode": "exact",
|
|
247
|
+
"bindings": {
|
|
248
|
+
"binStart": "lower",
|
|
249
|
+
"binEnd": "upper"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"id": "gallery-scatter",
|
|
254
|
+
"kind": "chart",
|
|
255
|
+
"datasetId": "charts-series",
|
|
256
|
+
"chart": "scatter",
|
|
257
|
+
"x": "coordinate",
|
|
258
|
+
"y": ["a"],
|
|
259
|
+
"numericMode": "exact",
|
|
260
|
+
"bindings": {
|
|
261
|
+
"size": "volume",
|
|
262
|
+
"label": "period",
|
|
263
|
+
"color": "segment"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"id": "gallery-heatmap",
|
|
268
|
+
"kind": "chart",
|
|
269
|
+
"datasetId": "charts-series",
|
|
270
|
+
"chart": "heatmap",
|
|
271
|
+
"x": "period",
|
|
272
|
+
"y": ["a", "b"],
|
|
273
|
+
"numericMode": "exact"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"id": "gallery-pie",
|
|
277
|
+
"kind": "chart",
|
|
278
|
+
"datasetId": "charts-composition",
|
|
279
|
+
"chart": "pie",
|
|
280
|
+
"x": "category",
|
|
281
|
+
"y": ["value"],
|
|
282
|
+
"numericMode": "exact",
|
|
283
|
+
"bindings": {
|
|
284
|
+
"share": "share"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"id": "gallery-leaderboard",
|
|
289
|
+
"kind": "chart",
|
|
290
|
+
"datasetId": "charts-composition",
|
|
291
|
+
"chart": "leaderboard",
|
|
292
|
+
"x": "category",
|
|
293
|
+
"y": ["value"],
|
|
294
|
+
"numericMode": "exact",
|
|
295
|
+
"bindings": {
|
|
296
|
+
"rank": "rank"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"id": "gallery-sparkline",
|
|
301
|
+
"kind": "chart",
|
|
302
|
+
"datasetId": "charts-series",
|
|
303
|
+
"chart": "sparkline",
|
|
304
|
+
"x": "period",
|
|
305
|
+
"y": ["a"],
|
|
306
|
+
"numericMode": "exact"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"id": "gallery-funnel",
|
|
310
|
+
"kind": "chart",
|
|
311
|
+
"datasetId": "charts-funnel",
|
|
312
|
+
"chart": "funnel",
|
|
313
|
+
"x": "stage",
|
|
314
|
+
"y": ["value"],
|
|
315
|
+
"numericMode": "exact",
|
|
316
|
+
"bindings": {
|
|
317
|
+
"share": "share"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"id": "gallery-waterfall",
|
|
322
|
+
"kind": "chart",
|
|
323
|
+
"datasetId": "charts-waterfall",
|
|
324
|
+
"chart": "waterfall",
|
|
325
|
+
"x": "step",
|
|
326
|
+
"y": ["change"],
|
|
327
|
+
"numericMode": "exact",
|
|
328
|
+
"bindings": {
|
|
329
|
+
"start": "start",
|
|
330
|
+
"end": "end",
|
|
331
|
+
"role": "role"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"id": "gallery-boxPlot",
|
|
336
|
+
"kind": "chart",
|
|
337
|
+
"datasetId": "charts-boxes",
|
|
338
|
+
"chart": "boxPlot",
|
|
339
|
+
"x": "group",
|
|
340
|
+
"y": ["median"],
|
|
341
|
+
"numericMode": "exact",
|
|
342
|
+
"bindings": {
|
|
343
|
+
"minimum": "minimum",
|
|
344
|
+
"q1": "q1",
|
|
345
|
+
"q3": "q3",
|
|
346
|
+
"maximum": "maximum"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"id": "gallery-dotted",
|
|
351
|
+
"kind": "chart",
|
|
352
|
+
"datasetId": "charts-series",
|
|
353
|
+
"chart": "line",
|
|
354
|
+
"x": "period",
|
|
355
|
+
"y": ["a", "b"],
|
|
356
|
+
"numericMode": "exact",
|
|
357
|
+
"options": {
|
|
358
|
+
"showPoints": "never",
|
|
359
|
+
"series": {
|
|
360
|
+
"a": {
|
|
361
|
+
"lineStyle": "dotted"
|
|
362
|
+
},
|
|
363
|
+
"b": {
|
|
364
|
+
"lineStyle": "solid",
|
|
365
|
+
"role": "comparison"
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"id": "gallery-single",
|
|
372
|
+
"kind": "chart",
|
|
373
|
+
"datasetId": "charts-series",
|
|
374
|
+
"chart": "bar",
|
|
375
|
+
"x": "period",
|
|
376
|
+
"y": ["a"],
|
|
377
|
+
"numericMode": "exact",
|
|
378
|
+
"options": {
|
|
379
|
+
"valueLabels": "all"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"id": "gallery-precision",
|
|
384
|
+
"kind": "chart",
|
|
385
|
+
"datasetId": "charts-precision",
|
|
386
|
+
"chart": "line",
|
|
387
|
+
"x": "label",
|
|
388
|
+
"y": ["amount"],
|
|
389
|
+
"numericMode": "approximate"
|
|
390
|
+
}
|
|
391
|
+
]
|
|
392
|
+
}
|
package/skills/dsh-data-analysis-presentation/references/examples/comparison-selected.dataset.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"columns": [
|
|
4
|
+
{ "id": "category", "label": "category", "type": "string", "nullable": false },
|
|
5
|
+
{ "id": "baseline", "label": "baseline", "type": "int64", "nullable": false },
|
|
6
|
+
{ "id": "current", "label": "current", "type": "int64", "nullable": false },
|
|
7
|
+
{
|
|
8
|
+
"id": "delta_current_minus_baseline",
|
|
9
|
+
"label": "delta_current_minus_baseline",
|
|
10
|
+
"type": "int64",
|
|
11
|
+
"nullable": false
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "decrease_baseline_minus_current",
|
|
15
|
+
"label": "decrease_baseline_minus_current",
|
|
16
|
+
"type": "int64",
|
|
17
|
+
"nullable": false
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"rows": [["A", "100", "50", "-50", "50"], ["B", "80", "50", "-30", "30"]],
|
|
21
|
+
"rowCount": 2,
|
|
22
|
+
"limit": 5000,
|
|
23
|
+
"truncated": false
|
|
24
|
+
}
|
package/skills/dsh-data-analysis-presentation/references/examples/comparison-summary.dataset.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"columns": [
|
|
4
|
+
{ "id": "scope", "label": "scope", "type": "string", "nullable": false },
|
|
5
|
+
{ "id": "baseline", "label": "baseline", "type": "int64", "nullable": false },
|
|
6
|
+
{ "id": "current", "label": "current", "type": "int64", "nullable": false },
|
|
7
|
+
{
|
|
8
|
+
"id": "delta_current_minus_baseline",
|
|
9
|
+
"label": "delta_current_minus_baseline",
|
|
10
|
+
"type": "int64",
|
|
11
|
+
"nullable": false
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"rows": [
|
|
15
|
+
["全量", "200", "150", "-50"],
|
|
16
|
+
["选中 A、B", "180", "100", "-80"],
|
|
17
|
+
["其他 C", "20", "50", "30"]
|
|
18
|
+
],
|
|
19
|
+
"rowCount": 3,
|
|
20
|
+
"limit": 5000,
|
|
21
|
+
"truncated": false
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"columns": [
|
|
4
|
+
{ "id": "category", "label": "category", "type": "string", "nullable": false },
|
|
5
|
+
{ "id": "baseline", "label": "baseline", "type": "int64", "nullable": false },
|
|
6
|
+
{ "id": "current", "label": "current", "type": "int64", "nullable": false },
|
|
7
|
+
{
|
|
8
|
+
"id": "delta_current_minus_baseline",
|
|
9
|
+
"label": "delta_current_minus_baseline",
|
|
10
|
+
"type": "int64",
|
|
11
|
+
"nullable": false
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"rows": [["A", "100", "50", "-50"], ["B", "80", "50", "-30"], ["C", "20", "50", "30"]],
|
|
15
|
+
"rowCount": 3,
|
|
16
|
+
"limit": 5000,
|
|
17
|
+
"truncated": false
|
|
18
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"title": "演示:减少项与其他项抵消后的净变化",
|
|
4
|
+
"datasets": [
|
|
5
|
+
{
|
|
6
|
+
"id": "full",
|
|
7
|
+
"kind": "computed",
|
|
8
|
+
"path": "presentation-example/comparison.dataset.json",
|
|
9
|
+
"sourceIds": []
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "selected",
|
|
13
|
+
"kind": "computed",
|
|
14
|
+
"path": "presentation-example/comparison-selected.dataset.json",
|
|
15
|
+
"sourceIds": []
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "summary",
|
|
19
|
+
"kind": "computed",
|
|
20
|
+
"path": "presentation-example/comparison-summary.dataset.json",
|
|
21
|
+
"sourceIds": []
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"sources": [],
|
|
25
|
+
"blocks": [
|
|
26
|
+
{
|
|
27
|
+
"id": "answer",
|
|
28
|
+
"kind": "markdown",
|
|
29
|
+
"text": "演示数据,不是真实业务结果。全量 baseline 200 → current 150,净变化 -50;变化率为 -25%,分母是 baseline 全量 200。A、B 的减少量合计 80,其他项 C 增加 30,抵消后净减少 50。这里是观测值的贡献分解,没有解释变化原因的证据。"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "net-change",
|
|
33
|
+
"kind": "metric",
|
|
34
|
+
"datasetId": "summary",
|
|
35
|
+
"columnId": "current",
|
|
36
|
+
"rowIndex": 0,
|
|
37
|
+
"label": "全量当前值",
|
|
38
|
+
"comparisons": [
|
|
39
|
+
{
|
|
40
|
+
"label": "较基准",
|
|
41
|
+
"referenceColumnId": "baseline",
|
|
42
|
+
"deltaColumnId": "delta_current_minus_baseline",
|
|
43
|
+
"sentiment": "neutral"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "selection",
|
|
49
|
+
"kind": "markdown",
|
|
50
|
+
"text": "## 按减少量降序选取 Top 2\n从完整三项按 baseline - current 降序预选 A、B。图展示的是反向命名明确的减少量,不是全量净变化。writer 收到两行,rowCount = 2、truncated = false;这不表示未做预选。80 / 50 = 160% 是局部减少量与全量净减少的比值,不能称为覆盖率。"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "selected-decreases",
|
|
54
|
+
"kind": "chart",
|
|
55
|
+
"datasetId": "selected",
|
|
56
|
+
"chart": "bar",
|
|
57
|
+
"x": "category",
|
|
58
|
+
"y": ["decrease_baseline_minus_current"],
|
|
59
|
+
"numericMode": "exact"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "reconciliation",
|
|
63
|
+
"kind": "markdown",
|
|
64
|
+
"text": "## 全量与余项核对\n下面各表的 delta 均为 current - baseline。选中项 -80 + 其他项 +30 = 全量 -50;保留其他项的净贡献,不能将选中项的减少量 80 写成全量净减少。"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "scope-values",
|
|
68
|
+
"kind": "table",
|
|
69
|
+
"datasetId": "summary",
|
|
70
|
+
"columns": ["scope", "baseline", "current", "delta_current_minus_baseline"]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "all-values",
|
|
74
|
+
"kind": "table",
|
|
75
|
+
"datasetId": "full",
|
|
76
|
+
"columns": ["category", "baseline", "current", "delta_current_minus_baseline"]
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"title": "演示:computed 的多个声明来源",
|
|
4
|
+
"datasets": [
|
|
5
|
+
{
|
|
6
|
+
"id": "quarter",
|
|
7
|
+
"kind": "computed",
|
|
8
|
+
"path": "presentation-example/computed.dataset.json",
|
|
9
|
+
"sourceIds": ["sales", "accounts"]
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"sources": [
|
|
13
|
+
{
|
|
14
|
+
"id": "sales",
|
|
15
|
+
"ref": {
|
|
16
|
+
"sessionId": "example-sales-session",
|
|
17
|
+
"artifactRef": "example-sales-artifact",
|
|
18
|
+
"findingId": "example-sales-finding"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "accounts",
|
|
23
|
+
"ref": { "sessionId": "example-accounts-session", "artifactRef": "example-accounts-artifact" }
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"blocks": [
|
|
27
|
+
{
|
|
28
|
+
"id": "scope",
|
|
29
|
+
"kind": "markdown",
|
|
30
|
+
"text": "演示草稿:来源引用需替换为实际引用。声明多个 Artifact 不表示 computed 计算已经过验证;不可恢复的来源由 reader 如实显示。"
|
|
31
|
+
},
|
|
32
|
+
{ "id": "values", "kind": "table", "datasetId": "quarter" },
|
|
33
|
+
{ "id": "sources", "kind": "source", "sourceIds": ["sales", "accounts"] }
|
|
34
|
+
]
|
|
35
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"columns": [
|
|
4
|
+
{ "id": "month", "label": "月份", "type": "string", "nullable": false },
|
|
5
|
+
{ "id": "count", "label": "数量", "type": "int64", "nullable": false },
|
|
6
|
+
{ "id": "amount", "label": "金额", "type": "decimal", "nullable": true }
|
|
7
|
+
],
|
|
8
|
+
"rows": [["2026-01", "12", "120.5000"], ["2026-02", "18", null], ["2026-03", "9", "90.0000"]],
|
|
9
|
+
"rowCount": 3,
|
|
10
|
+
"limit": 5000,
|
|
11
|
+
"truncated": false
|
|
12
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"title": "演示:季度已有数量与精确金额",
|
|
4
|
+
"datasets": [
|
|
5
|
+
{
|
|
6
|
+
"id": "quarter",
|
|
7
|
+
"kind": "computed",
|
|
8
|
+
"path": "presentation-example/computed.dataset.json",
|
|
9
|
+
"sourceIds": []
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"sources": [],
|
|
13
|
+
"blocks": [
|
|
14
|
+
{
|
|
15
|
+
"id": "scope",
|
|
16
|
+
"kind": "markdown",
|
|
17
|
+
"text": "演示数据,不是真实业务分析。数量按月份展示,精确金额和缺失值在表格中保留。"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "january",
|
|
21
|
+
"kind": "metric",
|
|
22
|
+
"datasetId": "quarter",
|
|
23
|
+
"columnId": "count",
|
|
24
|
+
"rowIndex": 0,
|
|
25
|
+
"label": "演示:一月数量"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "trend-title",
|
|
29
|
+
"kind": "markdown",
|
|
30
|
+
"text": "## 数量的月度变化\n按示例已有月份顺序绘图,不对缺失金额补零。"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "trend",
|
|
34
|
+
"kind": "chart",
|
|
35
|
+
"datasetId": "quarter",
|
|
36
|
+
"chart": "line",
|
|
37
|
+
"x": "month",
|
|
38
|
+
"y": ["count"],
|
|
39
|
+
"numericMode": "exact"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "comparison",
|
|
43
|
+
"kind": "chart",
|
|
44
|
+
"datasetId": "quarter",
|
|
45
|
+
"chart": "bar",
|
|
46
|
+
"x": "month",
|
|
47
|
+
"y": ["count"],
|
|
48
|
+
"numericMode": "exact"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "values",
|
|
52
|
+
"kind": "table",
|
|
53
|
+
"datasetId": "quarter",
|
|
54
|
+
"columns": ["month", "count", "amount"]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
package/skills/dsh-data-analysis-presentation/references/examples/interaction-detail.dataset.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"columns": [
|
|
4
|
+
{ "id": "category", "label": "category", "type": "string", "nullable": false },
|
|
5
|
+
{ "id": "query_count", "label": "query_count", "type": "int64", "nullable": false }
|
|
6
|
+
],
|
|
7
|
+
"rows": [
|
|
8
|
+
["交互查询", "390"],
|
|
9
|
+
["批量查询", "160"],
|
|
10
|
+
["交互查询", "220"],
|
|
11
|
+
["批量查询", "110"],
|
|
12
|
+
["交互查询", "170"],
|
|
13
|
+
["批量查询", "50"],
|
|
14
|
+
["交互查询", "180"],
|
|
15
|
+
["批量查询", "70"],
|
|
16
|
+
["交互查询", "100"],
|
|
17
|
+
["批量查询", "50"],
|
|
18
|
+
["交互查询", "80"],
|
|
19
|
+
["批量查询", "20"],
|
|
20
|
+
["交互查询", "210"],
|
|
21
|
+
["批量查询", "90"],
|
|
22
|
+
["交互查询", "120"],
|
|
23
|
+
["批量查询", "60"],
|
|
24
|
+
["交互查询", "90"],
|
|
25
|
+
["批量查询", "30"]
|
|
26
|
+
],
|
|
27
|
+
"rowCount": 18,
|
|
28
|
+
"limit": 5000,
|
|
29
|
+
"truncated": false
|
|
30
|
+
}
|