buckaroo-js-core 0.8.0

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.
Files changed (159) hide show
  1. package/.prettierrc +16 -0
  2. package/CHANGELOG.md +23 -0
  3. package/LICENSE +15 -0
  4. package/README.md +66 -0
  5. package/buckaroo_js/baked_data/colorMap.d.ts +3 -0
  6. package/buckaroo_js/baked_data/colorMap.d.ts.map +1 -0
  7. package/buckaroo_js/baked_data/colorMap.js +520 -0
  8. package/buckaroo_js/baked_data/colorMap.js.map +1 -0
  9. package/buckaroo_js/baked_data/staticData.d.ts +124 -0
  10. package/buckaroo_js/baked_data/staticData.d.ts.map +1 -0
  11. package/buckaroo_js/baked_data/staticData.js +459 -0
  12. package/buckaroo_js/baked_data/staticData.js.map +1 -0
  13. package/buckaroo_js/components/ColumnsEditor.d.ts +19 -0
  14. package/buckaroo_js/components/ColumnsEditor.d.ts.map +1 -0
  15. package/buckaroo_js/components/ColumnsEditor.js +68 -0
  16. package/buckaroo_js/components/ColumnsEditor.js.map +1 -0
  17. package/buckaroo_js/components/CommandUtils.d.ts +22 -0
  18. package/buckaroo_js/components/CommandUtils.d.ts.map +1 -0
  19. package/buckaroo_js/components/CommandUtils.js +17 -0
  20. package/buckaroo_js/components/CommandUtils.js.map +1 -0
  21. package/buckaroo_js/components/DCFCell.d.ts +28 -0
  22. package/buckaroo_js/components/DCFCell.d.ts.map +1 -0
  23. package/buckaroo_js/components/DCFCell.js +120 -0
  24. package/buckaroo_js/components/DCFCell.js.map +1 -0
  25. package/buckaroo_js/components/DFViewerParts/DFViewer.d.ts +29 -0
  26. package/buckaroo_js/components/DFViewerParts/DFViewer.d.ts.map +1 -0
  27. package/buckaroo_js/components/DFViewerParts/DFViewer.js +163 -0
  28. package/buckaroo_js/components/DFViewerParts/DFViewer.js.map +1 -0
  29. package/buckaroo_js/components/DFViewerParts/DFWhole.d.ts +111 -0
  30. package/buckaroo_js/components/DFViewerParts/DFWhole.d.ts.map +1 -0
  31. package/buckaroo_js/components/DFViewerParts/DFWhole.js +17 -0
  32. package/buckaroo_js/components/DFViewerParts/DFWhole.js.map +1 -0
  33. package/buckaroo_js/components/DFViewerParts/Displayer.d.ts +19 -0
  34. package/buckaroo_js/components/DFViewerParts/Displayer.d.ts.map +1 -0
  35. package/buckaroo_js/components/DFViewerParts/Displayer.js +221 -0
  36. package/buckaroo_js/components/DFViewerParts/Displayer.js.map +1 -0
  37. package/buckaroo_js/components/DFViewerParts/HistogramCell.d.ts +20 -0
  38. package/buckaroo_js/components/DFViewerParts/HistogramCell.d.ts.map +1 -0
  39. package/buckaroo_js/components/DFViewerParts/HistogramCell.js +184 -0
  40. package/buckaroo_js/components/DFViewerParts/HistogramCell.js.map +1 -0
  41. package/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.d.ts +5 -0
  42. package/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.d.ts.map +1 -0
  43. package/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.js +18 -0
  44. package/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.js.map +1 -0
  45. package/buckaroo_js/components/DFViewerParts/gridUtils.d.ts +24 -0
  46. package/buckaroo_js/components/DFViewerParts/gridUtils.d.ts.map +1 -0
  47. package/buckaroo_js/components/DFViewerParts/gridUtils.js +230 -0
  48. package/buckaroo_js/components/DFViewerParts/gridUtils.js.map +1 -0
  49. package/buckaroo_js/components/DependentTabs.d.ts +33 -0
  50. package/buckaroo_js/components/DependentTabs.d.ts.map +1 -0
  51. package/buckaroo_js/components/DependentTabs.js +108 -0
  52. package/buckaroo_js/components/DependentTabs.js.map +1 -0
  53. package/buckaroo_js/components/OperationDetail.d.ts +16 -0
  54. package/buckaroo_js/components/OperationDetail.d.ts.map +1 -0
  55. package/buckaroo_js/components/OperationDetail.js +144 -0
  56. package/buckaroo_js/components/OperationDetail.js.map +1 -0
  57. package/buckaroo_js/components/OperationUtils.d.ts +17 -0
  58. package/buckaroo_js/components/OperationUtils.d.ts.map +1 -0
  59. package/buckaroo_js/components/OperationUtils.js +14 -0
  60. package/buckaroo_js/components/OperationUtils.js.map +1 -0
  61. package/buckaroo_js/components/Operations.d.ts +24 -0
  62. package/buckaroo_js/components/Operations.d.ts.map +1 -0
  63. package/buckaroo_js/components/Operations.js +209 -0
  64. package/buckaroo_js/components/Operations.js.map +1 -0
  65. package/buckaroo_js/components/StatusBar.d.ts +12 -0
  66. package/buckaroo_js/components/StatusBar.d.ts.map +1 -0
  67. package/buckaroo_js/components/StatusBar.js +155 -0
  68. package/buckaroo_js/components/StatusBar.js.map +1 -0
  69. package/buckaroo_js/components/WidgetTypes.d.ts +25 -0
  70. package/buckaroo_js/components/WidgetTypes.d.ts.map +1 -0
  71. package/buckaroo_js/components/WidgetTypes.js +3 -0
  72. package/buckaroo_js/components/WidgetTypes.js.map +1 -0
  73. package/buckaroo_js/components/bakedOperationDefaults.d.ts +5 -0
  74. package/buckaroo_js/components/bakedOperationDefaults.d.ts.map +1 -0
  75. package/buckaroo_js/components/bakedOperationDefaults.js +15 -0
  76. package/buckaroo_js/components/bakedOperationDefaults.js.map +1 -0
  77. package/buckaroo_js/components/utils.d.ts +294 -0
  78. package/buckaroo_js/components/utils.d.ts.map +1 -0
  79. package/buckaroo_js/components/utils.js +143 -0
  80. package/buckaroo_js/components/utils.js.map +1 -0
  81. package/buckaroo_js/extension.d.ts +2 -0
  82. package/buckaroo_js/extension.d.ts.map +1 -0
  83. package/buckaroo_js/extension.js +20 -0
  84. package/buckaroo_js/extension.js.map +1 -0
  85. package/buckaroo_js/index.d.ts +25 -0
  86. package/buckaroo_js/index.d.ts.map +1 -0
  87. package/buckaroo_js/index.js +46 -0
  88. package/buckaroo_js/index.js.map +1 -0
  89. package/buckaroo_js/vendor/RechartExtra.d.ts +38 -0
  90. package/buckaroo_js/vendor/RechartExtra.d.ts.map +1 -0
  91. package/buckaroo_js/vendor/RechartExtra.js +17 -0
  92. package/buckaroo_js/vendor/RechartExtra.js.map +1 -0
  93. package/buckaroo_js/vendor/RechartTooltip.d.ts +82 -0
  94. package/buckaroo_js/vendor/RechartTooltip.d.ts.map +1 -0
  95. package/buckaroo_js/vendor/RechartTooltip.js +232 -0
  96. package/buckaroo_js/vendor/RechartTooltip.js.map +1 -0
  97. package/codecov.yml +16 -0
  98. package/eslint.config.mjs +88 -0
  99. package/examples/App.tsx +160 -0
  100. package/examples/CodeBlock.tsx +27 -0
  101. package/examples/CodePenButton.tsx +77 -0
  102. package/examples/ReadmeBlock.tsx +11 -0
  103. package/examples/app.css +29 -0
  104. package/examples/ex/ColumnsEditorEx.tsx +5 -0
  105. package/examples/ex/CommandViewerEx.tsx +20 -0
  106. package/examples/ex/DFViewerEx.tsx +3 -0
  107. package/examples/ex/DFViewerEx_large.tsx +266 -0
  108. package/examples/ex/DFViewerEx_real_summary.tsx +20 -0
  109. package/examples/ex/DFViewerEx_short_data.tsx +22 -0
  110. package/examples/ex/DFViewerEx_string_index.tsx +1012 -0
  111. package/examples/ex/HistogramEx.tsx +67 -0
  112. package/examples/ex/StatusBarEx.tsx +46 -0
  113. package/examples/ex/WidgetDCFCellEx.tsx +6 -0
  114. package/examples/example.css +20 -0
  115. package/examples/index-iframe.hnottml +24 -0
  116. package/examples/index-react18.tsx +8 -0
  117. package/examples/index.html +20 -0
  118. package/examples/jsx-loader.ts +16 -0
  119. package/examples/tsconfig.json +31 -0
  120. package/index.d.ts +2 -0
  121. package/index.d.ts.map +1 -0
  122. package/index.js +7 -0
  123. package/index.js.map +1 -0
  124. package/jest.config.js +24 -0
  125. package/package.json +117 -0
  126. package/screen-animation.gif +0 -0
  127. package/src/buckaroo_js/baked_data/colorMap.ts +523 -0
  128. package/src/buckaroo_js/baked_data/staticData.ts +503 -0
  129. package/src/buckaroo_js/components/ColumnsEditor.tsx +66 -0
  130. package/src/buckaroo_js/components/CommandUtils.ts +40 -0
  131. package/src/buckaroo_js/components/DCFCell.tsx +175 -0
  132. package/src/buckaroo_js/components/DFViewerParts/DFViewer.tsx +215 -0
  133. package/src/buckaroo_js/components/DFViewerParts/DFWhole.ts +190 -0
  134. package/src/buckaroo_js/components/DFViewerParts/Displayer.ts +215 -0
  135. package/src/buckaroo_js/components/DFViewerParts/HistogramCell.tsx +251 -0
  136. package/src/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.tsx +20 -0
  137. package/src/buckaroo_js/components/DFViewerParts/gridUtils.ts +290 -0
  138. package/src/buckaroo_js/components/DependentTabs.tsx +134 -0
  139. package/src/buckaroo_js/components/OperationDetail.tsx +203 -0
  140. package/src/buckaroo_js/components/OperationUtils.ts +33 -0
  141. package/src/buckaroo_js/components/Operations.tsx +243 -0
  142. package/src/buckaroo_js/components/StatusBar.tsx +190 -0
  143. package/src/buckaroo_js/components/WidgetTypes.tsx +42 -0
  144. package/src/buckaroo_js/components/bakedOperationDefaults.ts +14 -0
  145. package/src/buckaroo_js/components/utils.ts +60 -0
  146. package/src/buckaroo_js/extension.ts +15 -0
  147. package/src/buckaroo_js/index.ts +34 -0
  148. package/src/buckaroo_js/style/dcf-npm.css +244 -0
  149. package/src/buckaroo_js/style/icons/arrow-down-short-dark.svg +4 -0
  150. package/src/buckaroo_js/style/icons/arrow-down-short.svg +4 -0
  151. package/src/buckaroo_js/style/icons/arrow-up-short-dark.svg +4 -0
  152. package/src/buckaroo_js/style/icons/arrow-up-short.svg +4 -0
  153. package/src/buckaroo_js/style/icons/filter-dark.svg +3 -0
  154. package/src/buckaroo_js/style/icons/filter.svg +3 -0
  155. package/src/buckaroo_js/vendor/RechartExtra.ts +60 -0
  156. package/src/buckaroo_js/vendor/RechartTooltip.tsx +357 -0
  157. package/src/index.tsx +3 -0
  158. package/tsconfig.json +41 -0
  159. package/webpack.config.ts +97 -0
@@ -0,0 +1,1012 @@
1
+ import React, { useState} from 'react';
2
+ import { extraComponents } from 'buckaroo';
3
+ //import { DFData, DFViewerConfig } from 'buckaroo';
4
+
5
+
6
+ const data = [
7
+ {
8
+ "index": 0,
9
+ "a": 5,
10
+ "b": 2.8571428571
11
+ },
12
+ {
13
+ "index": 1,
14
+ "a": 28,
15
+ "b": 12.8571428571
16
+ },
17
+ {
18
+ "index": 2,
19
+ "a": 47,
20
+ "b": 2.8571428571
21
+ },
22
+ {
23
+ "index": 3,
24
+ "a": 4,
25
+ "b": 32.8571428571
26
+ },
27
+ {
28
+ "index": 4,
29
+ "a": 29,
30
+ "b": 30
31
+ },
32
+ {
33
+ "index": 5,
34
+ "a": 26,
35
+ "b": 38.5714285714
36
+ },
37
+ {
38
+ "index": 6,
39
+ "a": 29,
40
+ "b": 12.8571428571
41
+ },
42
+ {
43
+ "index": 7,
44
+ "a": 49,
45
+ "b": 18.5714285714
46
+ },
47
+ {
48
+ "index": 8,
49
+ "a": 22,
50
+ "b": 4.2857142857
51
+ },
52
+ {
53
+ "index": 9,
54
+ "a": 32,
55
+ "b": 35.7142857143
56
+ },
57
+ {
58
+ "index": 10,
59
+ "a": 19,
60
+ "b": 8.5714285714
61
+ },
62
+ {
63
+ "index": 11,
64
+ "a": 32,
65
+ "b": 27.1428571429
66
+ },
67
+ {
68
+ "index": 12,
69
+ "a": 44,
70
+ "b": 24.2857142857
71
+ }
72
+ ]
73
+
74
+ const summary_stats_data =[
75
+ {
76
+ "index": "dtype",
77
+ "a": "int64",
78
+ "b": "float64"
79
+ },
80
+ {
81
+ "index": "is_numeric",
82
+ "a": true,
83
+ "b": true
84
+ },
85
+ {
86
+ "index": "is_integer",
87
+ "a": true,
88
+ "b": false
89
+ },
90
+ {
91
+ "index": "is_datetime",
92
+ "a": false,
93
+ "b": false
94
+ },
95
+ {
96
+ "index": "is_bool",
97
+ "a": false,
98
+ "b": false
99
+ },
100
+ {
101
+ "index": "is_float",
102
+ "a": false,
103
+ "b": true
104
+ },
105
+ {
106
+ "index": "is_string",
107
+ "a": false,
108
+ "b": false
109
+ },
110
+ {
111
+ "index": "memory_usage",
112
+ "a": 1732,
113
+ "b": 1732
114
+ },
115
+ {
116
+ "index": "length",
117
+ "a": 200,
118
+ "b": 200
119
+ },
120
+ {
121
+ "index": "nan_count",
122
+ "a": 0,
123
+ "b": 0
124
+ },
125
+ {
126
+ "index": "value_counts",
127
+ "a": [
128
+ 7,
129
+ 7,
130
+ 7,
131
+ 7,
132
+ 7,
133
+ 6,
134
+ 6,
135
+ 6,
136
+ 6,
137
+ 6,
138
+ 6,
139
+ 6,
140
+ 5,
141
+ 5,
142
+ 5,
143
+ 5,
144
+ 5,
145
+ 5,
146
+ 5,
147
+ 5,
148
+ 4,
149
+ 4,
150
+ 4,
151
+ 4,
152
+ 4,
153
+ 4,
154
+ 4,
155
+ 4,
156
+ 4,
157
+ 4,
158
+ 3,
159
+ 3,
160
+ 3,
161
+ 3,
162
+ 3,
163
+ 3,
164
+ 3,
165
+ 3,
166
+ 2,
167
+ 2,
168
+ 2,
169
+ 2,
170
+ 2,
171
+ 2,
172
+ 2,
173
+ 2,
174
+ 1,
175
+ 1,
176
+ 1
177
+ ],
178
+ "b": [
179
+ 12,
180
+ 11,
181
+ 10,
182
+ 10,
183
+ 10,
184
+ 10,
185
+ 9,
186
+ 9,
187
+ 8,
188
+ 8,
189
+ 7,
190
+ 7,
191
+ 7,
192
+ 7,
193
+ 7,
194
+ 7,
195
+ 7,
196
+ 7,
197
+ 6,
198
+ 6,
199
+ 5,
200
+ 5,
201
+ 5,
202
+ 4,
203
+ 4,
204
+ 3,
205
+ 3,
206
+ 3,
207
+ 3
208
+ ]
209
+ },
210
+ {
211
+ "index": "mode",
212
+ "a": 2,
213
+ "b": 7.1428571429
214
+ },
215
+ {
216
+ "index": "min",
217
+ "a": 1,
218
+ "b": 1.4285714286
219
+ },
220
+ {
221
+ "index": "max",
222
+ "a": 49,
223
+ "b": 41.4285714286
224
+ },
225
+ {
226
+ "index": "mean",
227
+ "a": 24.275,
228
+ "b": 19.4571428571
229
+ },
230
+ {
231
+ "index": "histogram_args",
232
+ "a": {
233
+ "meat_histogram": [
234
+ [
235
+ 29,
236
+ 20,
237
+ 11,
238
+ 20,
239
+ 10,
240
+ 26,
241
+ 16,
242
+ 17,
243
+ 20,
244
+ 18
245
+ ],
246
+ [
247
+ 2,
248
+ 6.6,
249
+ 11.2,
250
+ 15.8,
251
+ 20.4,
252
+ 25,
253
+ 29.6,
254
+ 34.2,
255
+ 38.8,
256
+ 43.4,
257
+ 48
258
+ ]
259
+ ],
260
+ "normalized_populations": [
261
+ 0.1550802139,
262
+ 0.1069518717,
263
+ 0.0588235294,
264
+ 0.1069518717,
265
+ 0.0534759358,
266
+ 0.1390374332,
267
+ 0.0855614973,
268
+ 0.0909090909,
269
+ 0.1069518717,
270
+ 0.0962566845
271
+ ],
272
+ "low_tail": 1,
273
+ "high_tail": 49
274
+ },
275
+ "b": {
276
+ "meat_histogram": [
277
+ [
278
+ 22,
279
+ 30,
280
+ 17,
281
+ 17,
282
+ 16,
283
+ 22,
284
+ 26,
285
+ 11,
286
+ 13,
287
+ 12
288
+ ],
289
+ [
290
+ 2.8571428571,
291
+ 6.5714285714,
292
+ 10.2857142857,
293
+ 14,
294
+ 17.7142857143,
295
+ 21.4285714286,
296
+ 25.1428571429,
297
+ 28.8571428571,
298
+ 32.5714285714,
299
+ 36.2857142857,
300
+ 40
301
+ ]
302
+ ],
303
+ "normalized_populations": [
304
+ 0.1182795699,
305
+ 0.1612903226,
306
+ 0.0913978495,
307
+ 0.0913978495,
308
+ 0.0860215054,
309
+ 0.1182795699,
310
+ 0.1397849462,
311
+ 0.0591397849,
312
+ 0.0698924731,
313
+ 0.064516129
314
+ ],
315
+ "low_tail": 1.4285714286,
316
+ "high_tail": 41.4285714286
317
+ }
318
+ },
319
+ {
320
+ "index": "_type",
321
+ "a": "integer",
322
+ "b": "float"
323
+ },
324
+ {
325
+ "index": "type",
326
+ "a": "integer",
327
+ "b": "float"
328
+ },
329
+ {
330
+ "index": "min_digits",
331
+ "a": 1,
332
+ "b": 1
333
+ },
334
+ {
335
+ "index": "max_digits",
336
+ "a": 2,
337
+ "b": 2
338
+ },
339
+ {
340
+ "index": "unique_count",
341
+ "a": 3,
342
+ "b": 0
343
+ },
344
+ {
345
+ "index": "empty_count",
346
+ "a": 0,
347
+ "b": 0
348
+ },
349
+ {
350
+ "index": "distinct_count",
351
+ "a": 49,
352
+ "b": 29
353
+ },
354
+ {
355
+ "index": "distinct_per",
356
+ "a": 0.245,
357
+ "b": 0.145
358
+ },
359
+ {
360
+ "index": "empty_per",
361
+ "a": 0,
362
+ "b": 0
363
+ },
364
+ {
365
+ "index": "unique_per",
366
+ "a": 0.015,
367
+ "b": 0
368
+ },
369
+ {
370
+ "index": "nan_per",
371
+ "a": 0,
372
+ "b": 0
373
+ },
374
+ {
375
+ "index": "histogram",
376
+ "a": [
377
+ {
378
+ "name": "1 - 1.0",
379
+ "tail": 1
380
+ },
381
+ {
382
+ "name": "2-7",
383
+ "population": 16
384
+ },
385
+ {
386
+ "name": "7-11",
387
+ "population": 11
388
+ },
389
+ {
390
+ "name": "11-16",
391
+ "population": 6
392
+ },
393
+ {
394
+ "name": "16-20",
395
+ "population": 11
396
+ },
397
+ {
398
+ "name": "20-25",
399
+ "population": 5
400
+ },
401
+ {
402
+ "name": "25-30",
403
+ "population": 14
404
+ },
405
+ {
406
+ "name": "30-34",
407
+ "population": 9
408
+ },
409
+ {
410
+ "name": "34-39",
411
+ "population": 9
412
+ },
413
+ {
414
+ "name": "39-43",
415
+ "population": 11
416
+ },
417
+ {
418
+ "name": "43-48",
419
+ "population": 10
420
+ },
421
+ {
422
+ "name": "49.0 - 49",
423
+ "tail": 1
424
+ }
425
+ ],
426
+ "b": [
427
+ {
428
+ "name": "1.4285714285714286 - 1.4285714285714286",
429
+ "tail": 1
430
+ },
431
+ {
432
+ "name": "3-7",
433
+ "population": 12
434
+ },
435
+ {
436
+ "name": "7-10",
437
+ "population": 16
438
+ },
439
+ {
440
+ "name": "10-14",
441
+ "population": 9
442
+ },
443
+ {
444
+ "name": "14-18",
445
+ "population": 9
446
+ },
447
+ {
448
+ "name": "18-21",
449
+ "population": 9
450
+ },
451
+ {
452
+ "name": "21-25",
453
+ "population": 12
454
+ },
455
+ {
456
+ "name": "25-29",
457
+ "population": 14
458
+ },
459
+ {
460
+ "name": "29-33",
461
+ "population": 6
462
+ },
463
+ {
464
+ "name": "33-36",
465
+ "population": 7
466
+ },
467
+ {
468
+ "name": "36-40",
469
+ "population": 6
470
+ },
471
+ {
472
+ "name": "41.42857142857143 - 41.42857142857143",
473
+ "tail": 1
474
+ }
475
+ ]
476
+ }
477
+ ];
478
+
479
+ export default function DFViewerExString() {
480
+ const [activeCol, setActiveCol] = useState('tripduration');
481
+
482
+ //const dfvConfig:DFViewerConfig = {
483
+
484
+ const dfvConfig:any = {
485
+ "pinned_rows": [
486
+ {
487
+ "primary_key_val": "dtype",
488
+ "displayer_args": {
489
+ "displayer": "obj"
490
+ }
491
+ },
492
+ {
493
+ "primary_key_val": "histogram",
494
+ "displayer_args": {
495
+ "displayer": "histogram"
496
+ }
497
+ }
498
+ ],
499
+ "column_config": [
500
+ {
501
+ "col_name": "index",
502
+ "displayer_args": {
503
+ "displayer": "obj"
504
+ }
505
+ },
506
+ {
507
+ "col_name": "a",
508
+ "displayer_args": {
509
+ "displayer": "obj"
510
+ }
511
+ },
512
+ {
513
+ "col_name": "b",
514
+ "displayer_args": {
515
+ "displayer": "obj"
516
+ }
517
+ }
518
+ ]
519
+ }
520
+
521
+ // {
522
+ // "pinned_rows": [
523
+ // {
524
+ // "primary_key_val": "dtype",
525
+ // "displayer_args": {
526
+ // "displayer": "obj"
527
+ // }
528
+ // },
529
+ // {
530
+ // "primary_key_val": "histogram",
531
+ // "displayer_args": {
532
+ // "displayer": "histogram"
533
+ // }
534
+ // }
535
+ // ],
536
+ // "column_config": [
537
+ // {
538
+ // "col_name": "index",
539
+ // "displayer_args": {
540
+ // "displayer": "obj"
541
+ // }
542
+ // },
543
+ // {
544
+ // "col_name": "a",
545
+ // "displayer_args": {
546
+ // "displayer": "obj"
547
+ // }
548
+ // },
549
+ // {
550
+ // "col_name": "b",
551
+ // "displayer_args": {
552
+ // "displayer": "obj"
553
+ // }
554
+ // }
555
+ // ]
556
+ // }
557
+ //const current: {'df':DFData, 'df_viewer_config':DFViewerConfig, 'summary_stats_data':DFData} = {
558
+
559
+ const current: {'df':any, 'df_viewer_config':any, 'summary_stats_data':any} = {
560
+ "df": [],
561
+ "df_viewer_config": {
562
+ "pinned_rows": [
563
+ {
564
+ "primary_key_val": "dtype",
565
+ "displayer_args": {
566
+ "displayer": "obj"
567
+ }
568
+ },
569
+ {
570
+ "primary_key_val": "histogram",
571
+ "displayer_args": {
572
+ "displayer": "histogram"
573
+ }
574
+ }
575
+ ],
576
+ "column_config": [
577
+ {
578
+ "col_name": "index",
579
+ "displayer_args": {
580
+ "displayer": "obj"
581
+ }
582
+ },
583
+ {
584
+ "col_name": "a",
585
+ "displayer_args": {
586
+ "displayer": "obj"
587
+ }
588
+ },
589
+ {
590
+ "col_name": "b",
591
+ "displayer_args": {
592
+ "displayer": "obj"
593
+ }
594
+ }
595
+ ]
596
+ },
597
+ "summary_stats_data": [
598
+ {
599
+ "index": "dtype",
600
+ "a": "int64",
601
+ "b": "float64"
602
+ },
603
+ {
604
+ "index": "is_numeric",
605
+ "a": true,
606
+ "b": true
607
+ },
608
+ {
609
+ "index": "is_integer",
610
+ "a": true,
611
+ "b": false
612
+ },
613
+ {
614
+ "index": "is_datetime",
615
+ "a": false,
616
+ "b": false
617
+ },
618
+ {
619
+ "index": "is_bool",
620
+ "a": false,
621
+ "b": false
622
+ },
623
+ {
624
+ "index": "is_float",
625
+ "a": false,
626
+ "b": true
627
+ },
628
+ {
629
+ "index": "is_string",
630
+ "a": false,
631
+ "b": false
632
+ },
633
+ {
634
+ "index": "memory_usage",
635
+ "a": 1732,
636
+ "b": 1732
637
+ },
638
+ {
639
+ "index": "length",
640
+ "a": 200,
641
+ "b": 200
642
+ },
643
+ {
644
+ "index": "nan_count",
645
+ "a": 0,
646
+ "b": 0
647
+ },
648
+ {
649
+ "index": "value_counts",
650
+ "a": [
651
+ 12,
652
+ 9,
653
+ 8,
654
+ 7,
655
+ 7,
656
+ 7,
657
+ 7,
658
+ 7,
659
+ 6,
660
+ 6,
661
+ 5,
662
+ 5,
663
+ 5,
664
+ 5,
665
+ 5,
666
+ 5,
667
+ 5,
668
+ 5,
669
+ 4,
670
+ 4,
671
+ 4,
672
+ 4,
673
+ 4,
674
+ 4,
675
+ 4,
676
+ 4,
677
+ 4,
678
+ 3,
679
+ 3,
680
+ 3,
681
+ 3,
682
+ 3,
683
+ 3,
684
+ 3,
685
+ 3,
686
+ 3,
687
+ 2,
688
+ 2,
689
+ 2,
690
+ 2,
691
+ 2,
692
+ 2,
693
+ 2,
694
+ 2,
695
+ 1,
696
+ 1,
697
+ 1,
698
+ 1,
699
+ 1
700
+ ],
701
+ "b": [
702
+ 11,
703
+ 11,
704
+ 11,
705
+ 9,
706
+ 9,
707
+ 9,
708
+ 9,
709
+ 8,
710
+ 8,
711
+ 8,
712
+ 8,
713
+ 7,
714
+ 7,
715
+ 7,
716
+ 7,
717
+ 7,
718
+ 7,
719
+ 7,
720
+ 6,
721
+ 6,
722
+ 5,
723
+ 5,
724
+ 5,
725
+ 5,
726
+ 4,
727
+ 4,
728
+ 4,
729
+ 4,
730
+ 2
731
+ ]
732
+ },
733
+ {
734
+ "index": "mode",
735
+ "a": 6,
736
+ "b": 1.4285714286
737
+ },
738
+ {
739
+ "index": "min",
740
+ "a": 1,
741
+ "b": 1.4285714286
742
+ },
743
+ {
744
+ "index": "max",
745
+ "a": 49,
746
+ "b": 41.4285714286
747
+ },
748
+ {
749
+ "index": "mean",
750
+ "a": 23.375,
751
+ "b": 21.5285714286
752
+ },
753
+ {
754
+ "index": "histogram_args",
755
+ "a": {
756
+ "meat_histogram": [
757
+ [
758
+ 33,
759
+ 18,
760
+ 13,
761
+ 22,
762
+ 11,
763
+ 18,
764
+ 20,
765
+ 15,
766
+ 17,
767
+ 23
768
+ ],
769
+ [
770
+ 2,
771
+ 6.6,
772
+ 11.2,
773
+ 15.8,
774
+ 20.4,
775
+ 25,
776
+ 29.6,
777
+ 34.2,
778
+ 38.8,
779
+ 43.4,
780
+ 48
781
+ ]
782
+ ],
783
+ "normalized_populations": [
784
+ 0.1736842105,
785
+ 0.0947368421,
786
+ 0.0684210526,
787
+ 0.1157894737,
788
+ 0.0578947368,
789
+ 0.0947368421,
790
+ 0.1052631579,
791
+ 0.0789473684,
792
+ 0.0894736842,
793
+ 0.1210526316
794
+ ],
795
+ "low_tail": 1,
796
+ "high_tail": 48.01
797
+ },
798
+ "b": {
799
+ "meat_histogram": [
800
+ [
801
+ 13,
802
+ 23,
803
+ 12,
804
+ 23,
805
+ 15,
806
+ 22,
807
+ 23,
808
+ 10,
809
+ 21,
810
+ 16
811
+ ],
812
+ [
813
+ 2.8571428571,
814
+ 6.5714285714,
815
+ 10.2857142857,
816
+ 14,
817
+ 17.7142857143,
818
+ 21.4285714286,
819
+ 25.1428571429,
820
+ 28.8571428571,
821
+ 32.5714285714,
822
+ 36.2857142857,
823
+ 40
824
+ ]
825
+ ],
826
+ "normalized_populations": [
827
+ 0.0730337079,
828
+ 0.1292134831,
829
+ 0.0674157303,
830
+ 0.1292134831,
831
+ 0.0842696629,
832
+ 0.1235955056,
833
+ 0.1292134831,
834
+ 0.0561797753,
835
+ 0.1179775281,
836
+ 0.0898876404
837
+ ],
838
+ "low_tail": 1.4285714286,
839
+ "high_tail": 41.4285714286
840
+ }
841
+ },
842
+ {
843
+ "index": "_type",
844
+ "a": "integer",
845
+ "b": "float"
846
+ },
847
+ {
848
+ "index": "type",
849
+ "a": "integer",
850
+ "b": "float"
851
+ },
852
+ {
853
+ "index": "min_digits",
854
+ "a": 1,
855
+ "b": 1
856
+ },
857
+ {
858
+ "index": "max_digits",
859
+ "a": 2,
860
+ "b": 2
861
+ },
862
+ {
863
+ "index": "unique_count",
864
+ "a": 5,
865
+ "b": 0
866
+ },
867
+ {
868
+ "index": "empty_count",
869
+ "a": 0,
870
+ "b": 0
871
+ },
872
+ {
873
+ "index": "distinct_count",
874
+ "a": 49,
875
+ "b": 29
876
+ },
877
+ {
878
+ "index": "distinct_per",
879
+ "a": 0.245,
880
+ "b": 0.145
881
+ },
882
+ {
883
+ "index": "empty_per",
884
+ "a": 0,
885
+ "b": 0
886
+ },
887
+ {
888
+ "index": "unique_per",
889
+ "a": 0.025,
890
+ "b": 0
891
+ },
892
+ {
893
+ "index": "nan_per",
894
+ "a": 0,
895
+ "b": 0
896
+ },
897
+ {
898
+ "index": "histogram",
899
+ "a": [
900
+ {
901
+ "name": "1 - 1.0",
902
+ "tail": 1
903
+ },
904
+ {
905
+ "name": "2-7",
906
+ "population": 17
907
+ },
908
+ {
909
+ "name": "7-11",
910
+ "population": 9
911
+ },
912
+ {
913
+ "name": "11-16",
914
+ "population": 7
915
+ },
916
+ {
917
+ "name": "16-20",
918
+ "population": 12
919
+ },
920
+ {
921
+ "name": "20-25",
922
+ "population": 6
923
+ },
924
+ {
925
+ "name": "25-30",
926
+ "population": 9
927
+ },
928
+ {
929
+ "name": "30-34",
930
+ "population": 11
931
+ },
932
+ {
933
+ "name": "34-39",
934
+ "population": 8
935
+ },
936
+ {
937
+ "name": "39-43",
938
+ "population": 9
939
+ },
940
+ {
941
+ "name": "43-48",
942
+ "population": 12
943
+ },
944
+ {
945
+ "name": "48.00999999999999 - 49",
946
+ "tail": 1
947
+ }
948
+ ],
949
+ "b": [
950
+ {
951
+ "name": "1.4285714285714286 - 1.4285714285714286",
952
+ "tail": 1
953
+ },
954
+ {
955
+ "name": "3-7",
956
+ "population": 7
957
+ },
958
+ {
959
+ "name": "7-10",
960
+ "population": 13
961
+ },
962
+ {
963
+ "name": "10-14",
964
+ "population": 7
965
+ },
966
+ {
967
+ "name": "14-18",
968
+ "population": 13
969
+ },
970
+ {
971
+ "name": "18-21",
972
+ "population": 8
973
+ },
974
+ {
975
+ "name": "21-25",
976
+ "population": 12
977
+ },
978
+ {
979
+ "name": "25-29",
980
+ "population": 13
981
+ },
982
+ {
983
+ "name": "29-33",
984
+ "population": 6
985
+ },
986
+ {
987
+ "name": "33-36",
988
+ "population": 12
989
+ },
990
+ {
991
+ "name": "36-40",
992
+ "population": 9
993
+ },
994
+ {
995
+ "name": "41.42857142857143 - 41.42857142857143",
996
+ "tail": 1
997
+ }
998
+ ]
999
+ }
1000
+ ]
1001
+ }
1002
+
1003
+ //const working = {'df':data, 'df_viewer_config': dfvConfig, 'summary_stats_data':summary_stats_data};
1004
+ const working = {'df':data, 'df_viewer_config': dfvConfig, 'summary_stats_data':summary_stats_data};
1005
+
1006
+
1007
+ return <extraComponents.DFViewer df_data={current.df}
1008
+ df_viewer_config={current.df_viewer_config}
1009
+ summary_stats_data={current.summary_stats_data}
1010
+ activeCol={activeCol} setActiveCol={setActiveCol} />;
1011
+ }
1012
+