From 0318fc836e08caa32058f9bf80333307d8832bea Mon Sep 17 00:00:00 2001 From: Ajai Tirumali Date: Sat, 11 Nov 2023 23:49:38 +0530 Subject: [PATCH 1/2] add new statTypes --- .../src/main/java/org/datacommons/util/DcidGenerator.java | 4 ++++ util/src/main/java/org/datacommons/util/Vocabulary.java | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/util/src/main/java/org/datacommons/util/DcidGenerator.java b/util/src/main/java/org/datacommons/util/DcidGenerator.java index d5ea3eba..e56d022b 100644 --- a/util/src/main/java/org/datacommons/util/DcidGenerator.java +++ b/util/src/main/java/org/datacommons/util/DcidGenerator.java @@ -111,6 +111,10 @@ public class DcidGenerator { Vocabulary.CONFIDENCE_INTERVAL_UPPER_LIMIT, Vocabulary.KURTOSIS, Vocabulary.SKEWNESS, + Vocabulary.VARIENCE_VALUE, + Vocabulary.PALMA_RATIO, + Vocabulary.RANKING_VALUE, + Vocabulary.DECILE_VALUE, Vocabulary.MEASUREMENT_DENOMINATOR, Vocabulary.MEASUREMENT_QUALIFIER, Vocabulary.SCALING_FACTOR); diff --git a/util/src/main/java/org/datacommons/util/Vocabulary.java b/util/src/main/java/org/datacommons/util/Vocabulary.java index fe89dea8..7961956b 100644 --- a/util/src/main/java/org/datacommons/util/Vocabulary.java +++ b/util/src/main/java/org/datacommons/util/Vocabulary.java @@ -153,6 +153,10 @@ public final class Vocabulary { public static final String CONFIDENCE_INTERVAL_UPPER_LIMIT = "confidenceIntervalUpperLimit"; public static final String KURTOSIS = "kurtosisValue"; public static final String SKEWNESS = "skewnessValue"; + public static final String VARIENCE_VALUE = "varianceValue"; + public static final String PALMA_RATIO = "palmaRatio"; + public static final String RANKING_VALUE = "rankingValue"; + public static final String DECILE_VLUE = "decileValue"; public static final String MEASUREMENT_RESULT = "measurementResult"; // Quantity/QuantityRange props @@ -333,7 +337,9 @@ public static boolean isStatValueProperty(String val) { || lcVal.endsWith("stderror") || lcVal.endsWith("samplesize") || lcVal.endsWith("growthrate") - || lcVal.endsWith("limit"); + || lcVal.endsWith("limit") + || lcVal.endsWith("palmaratio"); + } public static boolean isStatVar(String type) { From 6920df5314a87210b0e70bebf63abb89554e3906 Mon Sep 17 00:00:00 2001 From: Ajai Tirumali Date: Tue, 14 Nov 2023 12:58:04 +0530 Subject: [PATCH 2/2] change rank statype to existing rankFromTop/Bottom --- util/src/main/java/org/datacommons/util/DcidGenerator.java | 3 ++- util/src/main/java/org/datacommons/util/Vocabulary.java | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/util/src/main/java/org/datacommons/util/DcidGenerator.java b/util/src/main/java/org/datacommons/util/DcidGenerator.java index e56d022b..80023dc4 100644 --- a/util/src/main/java/org/datacommons/util/DcidGenerator.java +++ b/util/src/main/java/org/datacommons/util/DcidGenerator.java @@ -113,7 +113,8 @@ public class DcidGenerator { Vocabulary.SKEWNESS, Vocabulary.VARIENCE_VALUE, Vocabulary.PALMA_RATIO, - Vocabulary.RANKING_VALUE, + Vocabulary.RANK_FROM_TOP, + Vocabulary.RANK_FROM_BOTTOM, Vocabulary.DECILE_VALUE, Vocabulary.MEASUREMENT_DENOMINATOR, Vocabulary.MEASUREMENT_QUALIFIER, diff --git a/util/src/main/java/org/datacommons/util/Vocabulary.java b/util/src/main/java/org/datacommons/util/Vocabulary.java index 7961956b..5f130228 100644 --- a/util/src/main/java/org/datacommons/util/Vocabulary.java +++ b/util/src/main/java/org/datacommons/util/Vocabulary.java @@ -155,7 +155,8 @@ public final class Vocabulary { public static final String SKEWNESS = "skewnessValue"; public static final String VARIENCE_VALUE = "varianceValue"; public static final String PALMA_RATIO = "palmaRatio"; - public static final String RANKING_VALUE = "rankingValue"; + public static final String RANK_FROM_TOP = "rankFromTop"; + public static final String RANK_FROM_BOTTOM = "rankFromBottom"; public static final String DECILE_VLUE = "decileValue"; public static final String MEASUREMENT_RESULT = "measurementResult"; @@ -338,7 +339,8 @@ public static boolean isStatValueProperty(String val) { || lcVal.endsWith("samplesize") || lcVal.endsWith("growthrate") || lcVal.endsWith("limit") - || lcVal.endsWith("palmaratio"); + || lcVal.endsWith("palmaratio") + || lcVal.startsWith("rank"); }