Remove locally extreme days metric
This commit is contained in:
@@ -360,25 +360,7 @@ const METRICS = {
|
||||
}
|
||||
};
|
||||
|
||||
const DETAIL_ONLY_METRICS = {
|
||||
oldExtremeDays: {
|
||||
label: "Previous Extreme Days / Year",
|
||||
type: "numeric",
|
||||
unit: "days",
|
||||
source: {
|
||||
description:
|
||||
"Older app proxy preserved for comparison. It came from NOAA 1991-2020 normals using monthly proxy thresholds before the daily nClimGrid replacement was added.",
|
||||
links: [
|
||||
{
|
||||
label: "NOAA NCEI U.S. Climate Normals",
|
||||
url: "https://www.ncei.noaa.gov/products/land-based-station/us-climate-normals"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const DETAIL_METRICS = { ...METRICS, ...DETAIL_ONLY_METRICS };
|
||||
const DETAIL_METRICS = METRICS;
|
||||
const DATA_METRIC_KEYS = Object.keys(METRICS);
|
||||
const COUNTY_DETAIL_METRIC_KEYS = [...DATA_METRIC_KEYS];
|
||||
const METRIC_GROUPS = [
|
||||
@@ -390,7 +372,7 @@ const METRIC_GROUPS = [
|
||||
{
|
||||
key: "temperatureExtremes",
|
||||
label: "Temperature & Extremes",
|
||||
metricKeys: ["avgTempF", "avgDiurnalTempRangeF", "extremeDays", "absoluteExtremeDays", "humidHeatDays"]
|
||||
metricKeys: ["avgTempF", "avgDiurnalTempRangeF", "absoluteExtremeDays", "humidHeatDays"]
|
||||
},
|
||||
{
|
||||
key: "precipitationMoisture",
|
||||
@@ -534,12 +516,9 @@ function getSourceEntries() {
|
||||
return [...BASE_SOURCE_ENTRIES, ...metricEntries];
|
||||
}
|
||||
|
||||
// Keep retired internal audit tags out of the selected-county panel.
|
||||
// Normalize source text for the selected-county panel.
|
||||
function getVisibleSourceTag(sourceText) {
|
||||
return String(sourceText)
|
||||
.split(" + ")
|
||||
.filter((tag) => !tag.includes("locally-extreme") && !tag.startsWith("extremeDays=") && !tag.startsWith("oldExtremeDays="))
|
||||
.join(" + ");
|
||||
return String(sourceText);
|
||||
}
|
||||
|
||||
// Render the scrollable sources dialog without injecting source text as HTML.
|
||||
@@ -914,10 +893,6 @@ function sanitizeOverrideRecord(rawRecord) {
|
||||
}
|
||||
});
|
||||
|
||||
Object.keys(DETAIL_ONLY_METRICS).forEach((metricKey) => {
|
||||
sanitizedRecord[metricKey] = parseNullableNumber(rawRecord[metricKey]);
|
||||
});
|
||||
|
||||
return sanitizedRecord;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user