MCPcopy Create free account
hub / github.com/microsoft/SandDance / inferAll

Function inferAll

packages/sanddance-specs/src/inference.ts:63–77  ·  view source on GitHub ↗
(columns: Column[], data: object[])

Source from the content-addressed store, hash-verified

61 * @param data Array of data objects.
62 */
63export function inferAll(columns: Column[], data: object[]) {
64 columns.forEach(column => {
65 if (column) {
66 if (typeof column.quantitative !== 'boolean') {
67 column.quantitative = isQuantitative(column);
68 }
69 if (!column.stats) {
70 column.stats = getStats(data, column);
71 }
72 if (column.type === 'string' && typeof column.isColorData !== 'boolean') {
73 checkIsColorData(data, column);
74 }
75 }
76 });
77}
78
79function checkIsColorData(data: object[], column: Column) {
80 if (!column.stats.hasColorData) {

Callers 2

buildFunction · 0.90
getColumnsFromDataFunction · 0.70

Calls 4

isQuantitativeFunction · 0.70
getStatsFunction · 0.70
checkIsColorDataFunction · 0.70
forEachMethod · 0.45

Tested by

no test coverage detected