@gen3/frontend 0.10.78 → 0.10.80
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/LICENSE +201 -0
- package/dist/cjs/index.js +130 -98
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/components/Content/TextContent.d.ts +28 -7
- package/dist/dts/components/Content/TextContent.d.ts.map +1 -1
- package/dist/dts/components/Content/TextContent.js +31 -13
- package/dist/dts/components/Content/TextContent.js.map +1 -1
- package/dist/dts/components/Login/CredentialsLogin.d.ts.map +1 -1
- package/dist/dts/components/Login/CredentialsLogin.js +1 -1
- package/dist/dts/components/Login/CredentialsLogin.js.map +1 -1
- package/dist/dts/components/Login/LoginButton.d.ts.map +1 -1
- package/dist/dts/components/Login/LoginButton.js.map +1 -1
- package/dist/dts/components/Login/LoginPanel.d.ts.map +1 -1
- package/dist/dts/components/Login/LoginPanel.js +2 -1
- package/dist/dts/components/Login/LoginPanel.js.map +1 -1
- package/dist/dts/components/Profile/CredentialsTable.d.ts.map +1 -1
- package/dist/dts/components/Profile/CredentialsTable.js +3 -4
- package/dist/dts/components/Profile/CredentialsTable.js.map +1 -1
- package/dist/dts/components/Profile/ExternalProviderCard.d.ts +2 -0
- package/dist/dts/components/Profile/ExternalProviderCard.d.ts.map +1 -1
- package/dist/dts/components/Profile/ExternalProviderCard.js +13 -11
- package/dist/dts/components/Profile/ExternalProviderCard.js.map +1 -1
- package/dist/dts/components/Profile/ExternalProvidersPanel.d.ts.map +1 -1
- package/dist/dts/components/Profile/ExternalProvidersPanel.js +2 -2
- package/dist/dts/components/Profile/ExternalProvidersPanel.js.map +1 -1
- package/dist/dts/components/facets/FacetEnumList.d.ts.map +1 -1
- package/dist/dts/components/facets/FacetEnumList.js +43 -53
- package/dist/dts/components/facets/FacetEnumList.js.map +1 -1
- package/dist/dts/components/facets/MultiSelectValueFacet.d.ts.map +1 -1
- package/dist/dts/components/facets/MultiSelectValueFacet.js +14 -31
- package/dist/dts/components/facets/MultiSelectValueFacet.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.js +3 -3
- package/dist/dts/features/CohortBuilder/CohortPanel.js.map +1 -1
- package/dist/dts/features/CohortBuilder/FiltersPanel.js +1 -1
- package/dist/dts/features/CohortBuilder/Panels/AccordianPanel.d.ts +4 -0
- package/dist/dts/features/CohortBuilder/Panels/AccordianPanel.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/Panels/AccordianPanel.js +23 -0
- package/dist/dts/features/CohortBuilder/Panels/AccordianPanel.js.map +1 -0
- package/dist/dts/features/CohortBuilder/Panels/DropdownPanel.d.ts +4 -0
- package/dist/dts/features/CohortBuilder/Panels/DropdownPanel.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/Panels/DropdownPanel.js +39 -0
- package/dist/dts/features/CohortBuilder/Panels/DropdownPanel.js.map +1 -0
- package/dist/dts/features/CohortBuilder/Panels/TabbedPanel.d.ts +3 -0
- package/dist/dts/features/CohortBuilder/Panels/TabbedPanel.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/Panels/TabbedPanel.js +34 -0
- package/dist/dts/features/CohortBuilder/Panels/TabbedPanel.js.map +1 -0
- package/dist/dts/features/CohortBuilder/Panels/types.d.ts +11 -0
- package/dist/dts/features/CohortBuilder/Panels/types.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/Panels/types.js.map +1 -0
- package/dist/dts/features/CohortDistance/CohortDistanceApp.d.ts +4 -0
- package/dist/dts/features/CohortDistance/CohortDistanceApp.d.ts.map +1 -0
- package/dist/dts/features/{CohortDiversity/CohortDiversityApp.js → CohortDistance/CohortDistanceApp.js} +9 -9
- package/dist/dts/features/CohortDistance/CohortDistanceApp.js.map +1 -0
- package/dist/dts/features/{CohortDiversity → CohortDistance}/ComnparisonCard.d.ts +2 -2
- package/dist/dts/features/CohortDistance/ComnparisonCard.d.ts.map +1 -0
- package/dist/dts/features/CohortDistance/ComnparisonCard.js.map +1 -0
- package/dist/dts/features/{CohortDiversity → CohortDistance}/ComparisonCards.d.ts +2 -2
- package/dist/dts/features/CohortDistance/ComparisonCards.d.ts.map +1 -0
- package/dist/dts/features/CohortDistance/ComparisonCards.js.map +1 -0
- package/dist/dts/features/CohortDistance/appApi.d.ts +8 -0
- package/dist/dts/features/CohortDistance/appApi.d.ts.map +1 -0
- package/dist/dts/features/CohortDistance/appApi.js +4 -0
- package/dist/dts/features/CohortDistance/appApi.js.map +1 -0
- package/dist/dts/features/CohortDistance/charts/BarComparison.d.ts.map +1 -0
- package/dist/dts/features/CohortDistance/charts/BarComparison.js.map +1 -0
- package/dist/dts/features/{CohortDiversity → CohortDistance}/charts/ChartCard.d.ts +3 -3
- package/dist/dts/features/CohortDistance/charts/ChartCard.d.ts.map +1 -0
- package/dist/dts/features/{CohortDiversity → CohortDistance}/charts/ChartCard.js +3 -3
- package/dist/dts/features/CohortDistance/charts/ChartCard.js.map +1 -0
- package/dist/dts/features/{CohortDiversity → CohortDistance}/charts/ComparisonCharts.d.ts +2 -2
- package/dist/dts/features/CohortDistance/charts/ComparisonCharts.d.ts.map +1 -0
- package/dist/dts/features/CohortDistance/charts/ComparisonCharts.js.map +1 -0
- package/dist/dts/features/CohortDistance/charts/RadarComparison.d.ts.map +1 -0
- package/dist/dts/features/CohortDistance/charts/RadarComparison.js.map +1 -0
- package/dist/dts/features/{CohortDiversity/charts/diversityChartsFactory.d.ts → CohortDistance/charts/cohortDistanceChartsFactory.d.ts} +3 -3
- package/dist/dts/features/CohortDistance/charts/cohortDistanceChartsFactory.d.ts.map +1 -0
- package/dist/dts/features/{CohortDiversity/charts/diversityChartsFactory.js → CohortDistance/charts/cohortDistanceChartsFactory.js} +3 -3
- package/dist/dts/features/CohortDistance/charts/cohortDistanceChartsFactory.js.map +1 -0
- package/dist/dts/features/CohortDistance/charts/types.d.ts.map +1 -0
- package/dist/dts/features/CohortDistance/charts/types.js.map +1 -0
- package/dist/dts/features/CohortDistance/charts/utils.d.ts.map +1 -0
- package/dist/dts/features/CohortDistance/charts/utils.js.map +1 -0
- package/dist/dts/features/{CohortDiversity/diversityApi.d.ts → CohortDistance/cohortDistanceApi.d.ts} +14 -14
- package/dist/dts/features/CohortDistance/cohortDistanceApi.d.ts.map +1 -0
- package/dist/dts/features/{CohortDiversity/diversityApi.js → CohortDistance/cohortDistanceApi.js} +5 -5
- package/dist/dts/features/CohortDistance/cohortDistanceApi.js.map +1 -0
- package/dist/dts/features/CohortDistance/registerApp.d.ts +3 -0
- package/dist/dts/features/CohortDistance/registerApp.d.ts.map +1 -0
- package/dist/dts/features/{CohortDiversity → CohortDistance}/registerApp.js +5 -5
- package/dist/dts/features/CohortDistance/registerApp.js.map +1 -0
- package/dist/dts/features/CohortDistance/statistics/StatisticsCard.d.ts.map +1 -0
- package/dist/dts/features/CohortDistance/statistics/StatisticsCard.js.map +1 -0
- package/dist/dts/features/{CohortDiversity → CohortDistance}/statistics/StatisticsPanel.d.ts +2 -2
- package/dist/dts/features/CohortDistance/statistics/StatisticsPanel.d.ts.map +1 -0
- package/dist/dts/features/CohortDistance/statistics/StatisticsPanel.js.map +1 -0
- package/dist/dts/features/CohortDistance/statistics/data/data.d.ts +2 -0
- package/dist/dts/features/CohortDistance/statistics/data/data.d.ts.map +1 -0
- package/dist/dts/features/{CohortDiversity → CohortDistance}/statistics/data/data.js +1 -1
- package/dist/dts/features/CohortDistance/statistics/data/data.js.map +1 -0
- package/dist/dts/features/{CohortDiversity → CohortDistance}/statistics/data/tests/processHistogramResponse.unit.test.d.ts.map +1 -1
- package/dist/dts/features/{CohortDiversity → CohortDistance}/statistics/data/tests/processHistogramResponse.unit.test.js +6 -6
- package/dist/dts/features/CohortDistance/statistics/data/tests/processHistogramResponse.unit.test.js.map +1 -0
- package/dist/dts/features/CohortDistance/statistics/data/utils.d.ts.map +1 -0
- package/dist/dts/features/CohortDistance/statistics/data/utils.js.map +1 -0
- package/dist/dts/features/{CohortDiversity → CohortDistance}/statistics/queries.d.ts +1 -1
- package/dist/dts/features/CohortDistance/statistics/queries.d.ts.map +1 -0
- package/dist/dts/features/{CohortDiversity → CohortDistance}/statistics/queries.js +1 -1
- package/dist/dts/features/CohortDistance/statistics/queries.js.map +1 -0
- package/dist/dts/features/{CohortDiversity → CohortDistance}/types.d.ts +6 -6
- package/dist/dts/features/CohortDistance/types.d.ts.map +1 -0
- package/dist/dts/features/CohortDistance/types.js +2 -0
- package/dist/dts/features/CohortDistance/types.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/CohortSimilarityApp.d.ts +4 -0
- package/dist/dts/features/CohortSimilarity/CohortSimilarityApp.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/CohortSimilarityApp.js +54 -0
- package/dist/dts/features/CohortSimilarity/CohortSimilarityApp.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/ComnparisonCard.d.ts +15 -0
- package/dist/dts/features/CohortSimilarity/ComnparisonCard.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/ComnparisonCard.js +32 -0
- package/dist/dts/features/CohortSimilarity/ComnparisonCard.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/ComparisonCards.d.ts +15 -0
- package/dist/dts/features/CohortSimilarity/ComparisonCards.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/ComparisonCards.js +14 -0
- package/dist/dts/features/CohortSimilarity/ComparisonCards.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/appApi.d.ts +8 -0
- package/dist/dts/features/CohortSimilarity/appApi.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/appApi.js +4 -0
- package/dist/dts/features/CohortSimilarity/appApi.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/BarComparison.d.ts +5 -0
- package/dist/dts/features/CohortSimilarity/charts/BarComparison.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/BarComparison.js +70 -0
- package/dist/dts/features/CohortSimilarity/charts/BarComparison.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/ChartCard.d.ts +16 -0
- package/dist/dts/features/CohortSimilarity/charts/ChartCard.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/ChartCard.js +45 -0
- package/dist/dts/features/CohortSimilarity/charts/ChartCard.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/ComparisonCharts.d.ts +13 -0
- package/dist/dts/features/CohortSimilarity/charts/ComparisonCharts.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/ComparisonCharts.js +18 -0
- package/dist/dts/features/CohortSimilarity/charts/ComparisonCharts.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/RadarComparison.d.ts +5 -0
- package/dist/dts/features/CohortSimilarity/charts/RadarComparison.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/RadarComparison.js +90 -0
- package/dist/dts/features/CohortSimilarity/charts/RadarComparison.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/cohortSimilarityChartsFactory.d.ts +6 -0
- package/dist/dts/features/CohortSimilarity/charts/cohortSimilarityChartsFactory.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/cohortSimilarityChartsFactory.js +24 -0
- package/dist/dts/features/CohortSimilarity/charts/cohortSimilarityChartsFactory.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/types.d.ts +12 -0
- package/dist/dts/features/CohortSimilarity/charts/types.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/types.js +2 -0
- package/dist/dts/features/CohortSimilarity/charts/types.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/utils.d.ts +2 -0
- package/dist/dts/features/CohortSimilarity/charts/utils.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/charts/utils.js +4 -0
- package/dist/dts/features/CohortSimilarity/charts/utils.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/cohortSimilarityApi.d.ts +141 -0
- package/dist/dts/features/CohortSimilarity/cohortSimilarityApi.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/cohortSimilarityApi.js +14 -0
- package/dist/dts/features/CohortSimilarity/cohortSimilarityApi.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/registerApp.d.ts +3 -0
- package/dist/dts/features/CohortSimilarity/registerApp.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/registerApp.js +19 -0
- package/dist/dts/features/CohortSimilarity/registerApp.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/statistics/StatisticsCard.d.ts +9 -0
- package/dist/dts/features/CohortSimilarity/statistics/StatisticsCard.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/statistics/StatisticsCard.js +68 -0
- package/dist/dts/features/CohortSimilarity/statistics/StatisticsCard.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/statistics/StatisticsPanel.d.ts +13 -0
- package/dist/dts/features/CohortSimilarity/statistics/StatisticsPanel.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/statistics/StatisticsPanel.js +16 -0
- package/dist/dts/features/CohortSimilarity/statistics/StatisticsPanel.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/statistics/data/data.d.ts +2 -0
- package/dist/dts/features/CohortSimilarity/statistics/data/data.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/statistics/data/data.js +50 -0
- package/dist/dts/features/CohortSimilarity/statistics/data/data.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/statistics/data/tests/processHistogramResponse.unit.test.d.ts +2 -0
- package/dist/dts/features/CohortSimilarity/statistics/data/tests/processHistogramResponse.unit.test.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/statistics/data/tests/processHistogramResponse.unit.test.js +365 -0
- package/dist/dts/features/CohortSimilarity/statistics/data/tests/processHistogramResponse.unit.test.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/statistics/data/tests/similarityResponse.json +228 -0
- package/dist/dts/features/CohortSimilarity/statistics/data/utils.d.ts +49 -0
- package/dist/dts/features/CohortSimilarity/statistics/data/utils.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/statistics/data/utils.js +146 -0
- package/dist/dts/features/CohortSimilarity/statistics/data/utils.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/statistics/queries.d.ts +6 -0
- package/dist/dts/features/CohortSimilarity/statistics/queries.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/statistics/queries.js +24 -0
- package/dist/dts/features/CohortSimilarity/statistics/queries.js.map +1 -0
- package/dist/dts/features/CohortSimilarity/types.d.ts +26 -0
- package/dist/dts/features/CohortSimilarity/types.d.ts.map +1 -0
- package/dist/dts/features/CohortSimilarity/types.js +2 -0
- package/dist/dts/features/CohortSimilarity/types.js.map +1 -0
- package/dist/dts/features/DataLibrary/tables/DatasetContentsTable.d.ts.map +1 -1
- package/dist/dts/features/DataLibrary/tables/DatasetContentsTable.js +1 -1
- package/dist/dts/features/DataLibrary/tables/DatasetContentsTable.js.map +1 -1
- package/dist/dts/index.d.ts +2 -2
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/index.js +2 -2
- package/dist/dts/index.js.map +1 -1
- package/dist/esm/index.js +131 -99
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +16 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/dist/dts/features/CohortDiversity/CohortDiversityApp.d.ts +0 -4
- package/dist/dts/features/CohortDiversity/CohortDiversityApp.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/CohortDiversityApp.js.map +0 -1
- package/dist/dts/features/CohortDiversity/ComnparisonCard.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/ComnparisonCard.js.map +0 -1
- package/dist/dts/features/CohortDiversity/ComparisonCards.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/ComparisonCards.js.map +0 -1
- package/dist/dts/features/CohortDiversity/appApi.d.ts +0 -8
- package/dist/dts/features/CohortDiversity/appApi.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/appApi.js +0 -4
- package/dist/dts/features/CohortDiversity/appApi.js.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/BarComparison.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/BarComparison.js.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/ChartCard.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/ChartCard.js.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/ComparisonCharts.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/ComparisonCharts.js.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/RadarComparison.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/RadarComparison.js.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/diversityChartsFactory.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/diversityChartsFactory.js.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/types.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/types.js.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/utils.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/charts/utils.js.map +0 -1
- package/dist/dts/features/CohortDiversity/diversityApi.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/diversityApi.js.map +0 -1
- package/dist/dts/features/CohortDiversity/registerApp.d.ts +0 -3
- package/dist/dts/features/CohortDiversity/registerApp.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/registerApp.js.map +0 -1
- package/dist/dts/features/CohortDiversity/statistics/StatisticsCard.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/statistics/StatisticsCard.js.map +0 -1
- package/dist/dts/features/CohortDiversity/statistics/StatisticsPanel.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/statistics/StatisticsPanel.js.map +0 -1
- package/dist/dts/features/CohortDiversity/statistics/data/data.d.ts +0 -2
- package/dist/dts/features/CohortDiversity/statistics/data/data.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/statistics/data/data.js.map +0 -1
- package/dist/dts/features/CohortDiversity/statistics/data/tests/processHistogramResponse.unit.test.js.map +0 -1
- package/dist/dts/features/CohortDiversity/statistics/data/utils.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/statistics/data/utils.js.map +0 -1
- package/dist/dts/features/CohortDiversity/statistics/queries.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/statistics/queries.js.map +0 -1
- package/dist/dts/features/CohortDiversity/types.d.ts.map +0 -1
- package/dist/dts/features/CohortDiversity/types.js.map +0 -1
- /package/dist/dts/features/{CohortDiversity/charts → CohortBuilder/Panels}/types.js +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/ComnparisonCard.js +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/ComparisonCards.js +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/charts/BarComparison.d.ts +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/charts/BarComparison.js +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/charts/ComparisonCharts.js +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/charts/RadarComparison.d.ts +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/charts/RadarComparison.js +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/charts/types.d.ts +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance/charts}/types.js +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/charts/utils.d.ts +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/charts/utils.js +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/statistics/StatisticsCard.d.ts +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/statistics/StatisticsCard.js +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/statistics/StatisticsPanel.js +0 -0
- /package/dist/dts/features/{CohortDiversity/statistics/data/tests/diversityResponse.json → CohortDistance/statistics/data/tests/distanceResponse.json} +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/statistics/data/tests/processHistogramResponse.unit.test.d.ts +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/statistics/data/utils.d.ts +0 -0
- /package/dist/dts/features/{CohortDiversity → CohortDistance}/statistics/data/utils.js +0 -0
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import similarityData from './similarityResponse.json';
|
|
2
|
+
import { getStaticSimilarityData } from '../data';
|
|
3
|
+
import { normalizeAgeOfIndex, processHistogramResponseAsPercentage, alignData, } from '../utils';
|
|
4
|
+
// Define the test
|
|
5
|
+
describe('Testing the processHistogramResponseAsPercentage function', function () {
|
|
6
|
+
it('Should correctly process percentage data', function () {
|
|
7
|
+
var result = processHistogramResponseAsPercentage(similarityData.data);
|
|
8
|
+
var expectedResult = {
|
|
9
|
+
age_at_index: [
|
|
10
|
+
{
|
|
11
|
+
count: 3.6189318749578017,
|
|
12
|
+
key: '85-89',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
count: 11.834447370197825,
|
|
16
|
+
key: '75-84',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
count: 17.311457700357842,
|
|
20
|
+
key: '65-74',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
count: 26.01444872054554,
|
|
24
|
+
key: '50-64',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
count: 11.280804807237864,
|
|
28
|
+
key: '40-49',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
count: 9.406522179461211,
|
|
32
|
+
key: '30-39',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
count: 6.815204915265681,
|
|
36
|
+
key: '18-29',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
count: 0.32948484234690434,
|
|
40
|
+
key: '16-17',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
count: 0.3281344946323679,
|
|
44
|
+
key: '12-15',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
count: 0.4159070960772399,
|
|
48
|
+
key: '5-11',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
count: 0.7669975018567281,
|
|
52
|
+
key: '0-4',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
ethnicity: [
|
|
56
|
+
{
|
|
57
|
+
count: 74.32313820808858,
|
|
58
|
+
key: 'Not Hispanic or Latino',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
count: 9.040577948821822,
|
|
62
|
+
key: 'Not Reported',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
count: 7.294578353926136,
|
|
66
|
+
key: 'Hispanic or Latino',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
count: 9.34170548916346,
|
|
70
|
+
key: 'no data',
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
race: [
|
|
74
|
+
{
|
|
75
|
+
count: 45.33387347241915,
|
|
76
|
+
key: 'White',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
count: 27.849571264600637,
|
|
80
|
+
key: 'Black or African American',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
count: 7.5214367699682665,
|
|
84
|
+
key: 'Not Reported',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
count: 4.742421173452164,
|
|
88
|
+
key: 'Asian',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
count: 2.6547836067787456,
|
|
92
|
+
key: 'Other',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
count: 0.22820876375666735,
|
|
96
|
+
key: 'American Indian or Alaska Native',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
count: 0.2133549388967659,
|
|
100
|
+
key: 'Native Hawaiian or other Pacific Islander',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
count: 11.456350010127608,
|
|
104
|
+
key: 'no data',
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
sex: [
|
|
108
|
+
{
|
|
109
|
+
count: 46.581594760650866,
|
|
110
|
+
key: 'Female',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
count: 44.84234690432786,
|
|
114
|
+
key: 'Male',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
count: 0.028357302005266354,
|
|
118
|
+
key: 'Not Reported',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
count: 8.547701033016002,
|
|
122
|
+
key: 'no data',
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
};
|
|
126
|
+
expect(result).toEqual(expectedResult);
|
|
127
|
+
});
|
|
128
|
+
it('Should normalize the results', function () {
|
|
129
|
+
var result = processHistogramResponseAsPercentage(similarityData.data);
|
|
130
|
+
var normalized = normalizeAgeOfIndex(result);
|
|
131
|
+
var expectedResult = {
|
|
132
|
+
age_at_index: [
|
|
133
|
+
{
|
|
134
|
+
count: 3.6189318749578017,
|
|
135
|
+
key: '85-89 Years',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
count: 11.834447370197825,
|
|
139
|
+
key: '75-84 Years',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
count: 17.311457700357842,
|
|
143
|
+
key: '65-74 Years',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
count: 26.01444872054554,
|
|
147
|
+
key: '50-64 Years',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
count: 11.280804807237864,
|
|
151
|
+
key: '40-49 Years',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
count: 9.406522179461211,
|
|
155
|
+
key: '30-39 Years',
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
count: 6.815204915265681,
|
|
159
|
+
key: '18-29 Years',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
count: 0.32948484234690434,
|
|
163
|
+
key: '16-17 Years',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
count: 0.3281344946323679,
|
|
167
|
+
key: '12-15 Years',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
count: 0.4159070960772399,
|
|
171
|
+
key: '5-11 Years',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
count: 0.7669975018567281,
|
|
175
|
+
key: '0-4 Years',
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
ethnicity: [
|
|
179
|
+
{
|
|
180
|
+
count: 74.32313820808858,
|
|
181
|
+
key: 'Not Hispanic or Latino',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
count: 9.040577948821822,
|
|
185
|
+
key: 'Not Reported',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
count: 7.294578353926136,
|
|
189
|
+
key: 'Hispanic or Latino',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
count: 9.34170548916346,
|
|
193
|
+
key: 'no data',
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
race: [
|
|
197
|
+
{
|
|
198
|
+
count: 45.33387347241915,
|
|
199
|
+
key: 'White',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
count: 27.849571264600637,
|
|
203
|
+
key: 'Black or African American',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
count: 7.5214367699682665,
|
|
207
|
+
key: 'Not Reported',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
count: 4.742421173452164,
|
|
211
|
+
key: 'Asian',
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
count: 2.6547836067787456,
|
|
215
|
+
key: 'Other',
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
count: 0.22820876375666735,
|
|
219
|
+
key: 'American Indian or Alaska Native',
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
count: 0.2133549388967659,
|
|
223
|
+
key: 'Native Hawaiian or other Pacific Islander',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
count: 11.456350010127608,
|
|
227
|
+
key: 'no data',
|
|
228
|
+
},
|
|
229
|
+
],
|
|
230
|
+
sex: [
|
|
231
|
+
{
|
|
232
|
+
count: 46.581594760650866,
|
|
233
|
+
key: 'Female',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
count: 44.84234690432786,
|
|
237
|
+
key: 'Male',
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
count: 0.028357302005266354,
|
|
241
|
+
key: 'Not Reported',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
count: 8.547701033016002,
|
|
245
|
+
key: 'no data',
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
};
|
|
249
|
+
expect(normalized).toEqual(expectedResult);
|
|
250
|
+
});
|
|
251
|
+
it('Should align the source data with the ground data', function () {
|
|
252
|
+
var result = processHistogramResponseAsPercentage(similarityData.data);
|
|
253
|
+
var normalized = normalizeAgeOfIndex(result);
|
|
254
|
+
var ground = getStaticSimilarityData('census');
|
|
255
|
+
var aligned = alignData(normalized, ground);
|
|
256
|
+
var expectedResult = {
|
|
257
|
+
age_at_index: [
|
|
258
|
+
{
|
|
259
|
+
count: 0.7669975018567281,
|
|
260
|
+
key: '0-4 Years',
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
count: 0.4159070960772399,
|
|
264
|
+
key: '5-11 Years',
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
count: 0.3281344946323679,
|
|
268
|
+
key: '12-15 Years',
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
count: 0.32948484234690434,
|
|
272
|
+
key: '16-17 Years',
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
count: 6.815204915265681,
|
|
276
|
+
key: '18-29 Years',
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
count: 9.406522179461211,
|
|
280
|
+
key: '30-39 Years',
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
count: 11.280804807237864,
|
|
284
|
+
key: '40-49 Years',
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
count: 26.01444872054554,
|
|
288
|
+
key: '50-64 Years',
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
count: 17.311457700357842,
|
|
292
|
+
key: '65-74 Years',
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
count: 11.834447370197825,
|
|
296
|
+
key: '75-84 Years',
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
count: 3.6189318749578017,
|
|
300
|
+
key: '85-89 Years',
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
ethnicity: [
|
|
304
|
+
{
|
|
305
|
+
count: 7.294578353926136,
|
|
306
|
+
key: 'Hispanic or Latino',
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
count: 74.32313820808858,
|
|
310
|
+
key: 'Not Hispanic or Latino',
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
count: 9.040577948821822,
|
|
314
|
+
key: 'Not Reported',
|
|
315
|
+
},
|
|
316
|
+
],
|
|
317
|
+
race: [
|
|
318
|
+
{
|
|
319
|
+
count: 45.33387347241915,
|
|
320
|
+
key: 'White',
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
count: 27.849571264600637,
|
|
324
|
+
key: 'Black or African American',
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
count: 4.742421173452164,
|
|
328
|
+
key: 'Asian',
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
count: 2.6547836067787456,
|
|
332
|
+
key: 'Other',
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
count: 0.22820876375666735,
|
|
336
|
+
key: 'American Indian or Alaska Native',
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
count: 0,
|
|
340
|
+
key: 'Native Hawaiian or Other Pacific Islander',
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
count: 7.5214367699682665,
|
|
344
|
+
key: 'Not Reported',
|
|
345
|
+
},
|
|
346
|
+
],
|
|
347
|
+
sex: [
|
|
348
|
+
{
|
|
349
|
+
count: 46.581594760650866,
|
|
350
|
+
key: 'Female',
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
count: 44.84234690432786,
|
|
354
|
+
key: 'Male',
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
count: 0.028357302005266354,
|
|
358
|
+
key: 'Not Reported',
|
|
359
|
+
},
|
|
360
|
+
],
|
|
361
|
+
};
|
|
362
|
+
expect(aligned).toEqual(expectedResult);
|
|
363
|
+
});
|
|
364
|
+
});
|
|
365
|
+
//# sourceMappingURL=processHistogramResponse.unit.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processHistogramResponse.unit.test.js","sourceRoot":"","sources":["../../../../../../../src/features/CohortSimilarity/statistics/data/tests/processHistogramResponse.unit.test.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAGlD,OAAO,EACL,mBAAmB,EACnB,oCAAoC,EACpC,SAAS,GACV,MAAM,UAAU,CAAC;AAElB,kBAAkB;AAClB,QAAQ,CAAC,2DAA2D,EAAE;IACpE,EAAE,CAAC,0CAA0C,EAAE;QAC7C,IAAM,MAAM,GAAG,oCAAoC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAEzE,IAAM,cAAc,GAAqB;YACvC,YAAY,EAAE;gBACZ;oBACE,KAAK,EAAE,kBAAkB;oBACzB,GAAG,EAAE,OAAO;iBACb;gBACD;oBACE,KAAK,EAAE,kBAAkB;oBACzB,GAAG,EAAE,OAAO;iBACb;gBACD;oBACE,KAAK,EAAE,kBAAkB;oBACzB,GAAG,EAAE,OAAO;iBACb;gBACD;oBACE,KAAK,EAAE,iBAAiB;oBACxB,GAAG,EAAE,OAAO;iBACb;gBACD;oBACE,KAAK,EAAE,kBAAkB;oBACzB,GA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iBAAiB;oBACxB,GAAG,EAAE,wBAAwB;iBAC9B;gBACD;oBACE,KAAK,EAAE,iBAAiB;oBACxB,GAAG,EAAE,cAAc;iBACpB;aACF;YACD,IAAI,EAAE;gBACJ;oBACE,KAAK,EAAE,iBAAiB;oBACxB,GAAG,EAAE,OAAO;iBACb;gBACD;oBACE,KAAK,EAAE,kBAAkB;oBACzB,GAAG,EAAE,2BAA2B;iBACjC;gBACD;oBACE,KAAK,EAAE,iBAAiB;oBACxB,GAAG,EAAE,OAAO;iBACb;gBACD;oBACE,KAAK,EAAE,kBAAkB;oBACzB,GAAG,EAAE,OAAO;iBACb;gBACD;oBACE,KAAK,EAAE,mBAAmB;oBAC1B,GAAG,EAAE,kCAAkC;iBACxC;gBACD;oBACE,KAAK,EAAE,CAAC;oBACR,GAAG,EAAE,2CAA2C;iBACjD;gBACD;oBACE,KAAK,EAAE,kBAAkB;oBACzB,GAAG,EAAE,cAAc;iBACpB;aACF;YACD,GAAG,EAAE;gBACH;oBACE,KAAK,EAAE,kBAAkB;oBACzB,GAAG,EAAE,QAAQ;iBACd;gBACD;oBACE,KAAK,EAAE,iBAAiB;oBACxB,GAAG,EAAE,MAAM;iBACZ;gBACD;oBACE,KAAK,EAAE,oBAAoB;oBAC3B,GAAG,EAAE,cAAc;iBACpB;aACF;SACF,CAAC;QAEF,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"_aggregation": {
|
|
4
|
+
"case": {
|
|
5
|
+
"_totalCount": 74055,
|
|
6
|
+
"sex": {
|
|
7
|
+
"histogram": [
|
|
8
|
+
{
|
|
9
|
+
"key": "Female",
|
|
10
|
+
"count": 34496
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"key": "Male",
|
|
14
|
+
"count": 33208
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"key": "Not Reported",
|
|
18
|
+
"count": 21
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"key": "no data",
|
|
22
|
+
"count": 6330
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"ethnicity": {
|
|
27
|
+
"histogram": [
|
|
28
|
+
{
|
|
29
|
+
"key": "Not Hispanic or Latino",
|
|
30
|
+
"count": 55040
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"key": "Not Reported",
|
|
34
|
+
"count": 6695
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"key": "Hispanic or Latino",
|
|
38
|
+
"count": 5402
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"key": "no data",
|
|
42
|
+
"count": 6918
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"race": {
|
|
47
|
+
"histogram": [
|
|
48
|
+
{
|
|
49
|
+
"key": "White",
|
|
50
|
+
"count": 33572
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"key": "Black or African American",
|
|
54
|
+
"count": 20624
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"key": "Not Reported",
|
|
58
|
+
"count": 5570
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"key": "Asian",
|
|
62
|
+
"count": 3512
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"key": "Other",
|
|
66
|
+
"count": 1966
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"key": "American Indian or Alaska Native",
|
|
70
|
+
"count": 169
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"key": "Native Hawaiian or other Pacific Islander",
|
|
74
|
+
"count": 158
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"key": "no data",
|
|
78
|
+
"count": 8484
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"case_0_4": {
|
|
84
|
+
"age_at_index": {
|
|
85
|
+
"histogram": [
|
|
86
|
+
{
|
|
87
|
+
"key": [
|
|
88
|
+
0,
|
|
89
|
+
4
|
|
90
|
+
],
|
|
91
|
+
"count": 568
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"case_5_11": {
|
|
97
|
+
"age_at_index": {
|
|
98
|
+
"histogram": [
|
|
99
|
+
{
|
|
100
|
+
"key": [
|
|
101
|
+
5,
|
|
102
|
+
11
|
|
103
|
+
],
|
|
104
|
+
"count": 308
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"case_12_15": {
|
|
110
|
+
"age_at_index": {
|
|
111
|
+
"histogram": [
|
|
112
|
+
{
|
|
113
|
+
"key": [
|
|
114
|
+
12,
|
|
115
|
+
15
|
|
116
|
+
],
|
|
117
|
+
"count": 243
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"case_16_17": {
|
|
123
|
+
"age_at_index": {
|
|
124
|
+
"histogram": [
|
|
125
|
+
{
|
|
126
|
+
"key": [
|
|
127
|
+
16,
|
|
128
|
+
17
|
|
129
|
+
],
|
|
130
|
+
"count": 244
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"case_18_29": {
|
|
136
|
+
"age_at_index": {
|
|
137
|
+
"histogram": [
|
|
138
|
+
{
|
|
139
|
+
"key": [
|
|
140
|
+
18,
|
|
141
|
+
29
|
|
142
|
+
],
|
|
143
|
+
"count": 5047
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"case_30_39": {
|
|
149
|
+
"age_at_index": {
|
|
150
|
+
"histogram": [
|
|
151
|
+
{
|
|
152
|
+
"key": [
|
|
153
|
+
30,
|
|
154
|
+
39
|
|
155
|
+
],
|
|
156
|
+
"count": 6966
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"case_40_49": {
|
|
162
|
+
"age_at_index": {
|
|
163
|
+
"histogram": [
|
|
164
|
+
{
|
|
165
|
+
"key": [
|
|
166
|
+
40,
|
|
167
|
+
49
|
|
168
|
+
],
|
|
169
|
+
"count": 8354
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"case_50_64": {
|
|
175
|
+
"age_at_index": {
|
|
176
|
+
"histogram": [
|
|
177
|
+
{
|
|
178
|
+
"key": [
|
|
179
|
+
50,
|
|
180
|
+
64
|
|
181
|
+
],
|
|
182
|
+
"count": 19265
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"case_65_74": {
|
|
188
|
+
"age_at_index": {
|
|
189
|
+
"histogram": [
|
|
190
|
+
{
|
|
191
|
+
"key": [
|
|
192
|
+
65,
|
|
193
|
+
74
|
|
194
|
+
],
|
|
195
|
+
"count": 12820
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"case_75_84": {
|
|
201
|
+
"age_at_index": {
|
|
202
|
+
"histogram": [
|
|
203
|
+
{
|
|
204
|
+
"key": [
|
|
205
|
+
75,
|
|
206
|
+
84
|
|
207
|
+
],
|
|
208
|
+
"count": 8764
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"case_85_plus": {
|
|
214
|
+
"age_at_index": {
|
|
215
|
+
"histogram": [
|
|
216
|
+
{
|
|
217
|
+
"key": [
|
|
218
|
+
85,
|
|
219
|
+
89
|
|
220
|
+
],
|
|
221
|
+
"count": 2680
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { AggregationsData } from '@gen3/core';
|
|
2
|
+
/**
|
|
3
|
+
* Converts a deeply nested data structure of numbers into a structured aggregation data format.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, Record<string, Record<string, number>>>} data - The input data where the structure
|
|
6
|
+
* consists of three levels of nested records:
|
|
7
|
+
* - The outermost level is keyed by source identifiers.
|
|
8
|
+
* - The middle level is keyed by aggregation identifiers.
|
|
9
|
+
* - The innermost level is keyed by histogram keys with corresponding numeric counts.
|
|
10
|
+
*
|
|
11
|
+
* @return {Record<string, AggregationsData>} - A newly structured data object where:
|
|
12
|
+
* - The outermost level is the same as the input.
|
|
13
|
+
* - Each aggregation identifier now maps to an array of histogram objects with key-count pairs.
|
|
14
|
+
*/
|
|
15
|
+
export declare const convertToAggregateData: (data: Record<string, Record<string, Record<string, number>>>) => Record<string, AggregationsData>;
|
|
16
|
+
/**
|
|
17
|
+
* Converts histogram response data into percentages based on the total counts.
|
|
18
|
+
*
|
|
19
|
+
* @param {Record<string, any>} data - The input data containing histogram details and total counts.
|
|
20
|
+
*
|
|
21
|
+
* @returns {AggregationsData} The processed histogram data where counts are converted to percentages.
|
|
22
|
+
*/
|
|
23
|
+
export declare const processHistogramResponseAsPercentage: (data: Record<string, any>) => AggregationsData;
|
|
24
|
+
/**
|
|
25
|
+
* Takes an object of type AggregationsData and normalizes the
|
|
26
|
+
* 'age_at_index' property by converting the age keys to a string format.
|
|
27
|
+
*
|
|
28
|
+
* This function checks if the 'age_at_index' key exists in the input object.
|
|
29
|
+
* If it does, it transforms each age entry by appending ' Years' to the age
|
|
30
|
+
* value and returns the updated object. If the 'age_at_index' key does not exist,
|
|
31
|
+
* it returns the original data.
|
|
32
|
+
*
|
|
33
|
+
* @param {AggregationsData} data - The input data object containing the age aggregations.
|
|
34
|
+
* @returns {AggregationsData} - The transformed data object with normalized age keys.
|
|
35
|
+
*/
|
|
36
|
+
export declare const normalizeAgeOfIndex: (data: AggregationsData) => AggregationsData;
|
|
37
|
+
/**
|
|
38
|
+
* Aligns the source data with the target structure by mapping items based on their keys and updating the counts.
|
|
39
|
+
*
|
|
40
|
+
* This function takes two sets of aggregation data, aligns them by their categories and individual keys,
|
|
41
|
+
* and updates the counts from the source data. If a category or its items are missing in the source data,
|
|
42
|
+
* a count of 0 is assigned to those items in the resulting aligned data structure.
|
|
43
|
+
*
|
|
44
|
+
* @param {AggregationsData} sourceData - The source aggregation data containing key-value pairs with the count.
|
|
45
|
+
* @param {AggregationsData} targetStructure - The target aggregation structure used to align and structure the result.
|
|
46
|
+
* @return {AggregationsData} The aligned data with updated counts from the source data, maintaining the target structure.
|
|
47
|
+
*/
|
|
48
|
+
export declare const alignData: (sourceData: AggregationsData, targetStructure: AggregationsData) => AggregationsData;
|
|
49
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CohortSimilarity/statistics/data/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAsB,MAAM,YAAY,CAAC;AAIlE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,SAC3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,KAC3D,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAoBjC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC,SACzC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KACxB,gBA2CF,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,SAAU,gBAAgB,qBAWzD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,eACR,gBAAgB,mBACX,gBAAgB,qBAuBlC,CAAC"}
|