diff --git a/migrations/acs.sql b/migrations/acs.sql index 8d6e3f1..578540c 100644 --- a/migrations/acs.sql +++ b/migrations/acs.sql @@ -1,5 +1,5 @@ CREATE SCHEMA IF NOT EXISTS acs; -DROP TABLE IF EXISTS acs.:"TABLE_NAME"; +DROP TABLE IF EXISTS acs."2021", acs.:"TABLE_NAME"; DROP INDEX IF EXISTS acs.:INDEX_NAME; CREATE TEMP TABLE tmp ( diff --git a/special-calculations/data/constants.js b/special-calculations/data/constants.js index 86a338c..5eab6b4 100644 --- a/special-calculations/data/constants.js +++ b/special-calculations/data/constants.js @@ -8,14 +8,14 @@ const PREV_YEAR = 'Y2006-2010'; // TODO: update with actual previous year const GEOGRAPHY_VERSION = '2023-08-29'; const DECENNIAL_SCHEMA_NAME = 'decennial'; const DECENNIAL_LATEST_TABLE_NAME = '2020'; -const DECENNIAL_LATEST_VERSION = '2024-04-16'; +const DECENNIAL_LATEST_VERSION = '2024-04-29'; const DECENNIAL_EARLIEST_TABLE_NAME = '2010'; -const DECENNIAL_EARLIEST_VERSION = '2024-04-16'; +const DECENNIAL_EARLIEST_VERSION = '2024-04-29'; const ACS_SCHEMA_NAME = 'acs'; const ACS_LATEST_TABLE_NAME = '2022'; -const ACS_LATEST_VERSION = '2024-04-01'; +const ACS_LATEST_VERSION = '2024-04-19'; const ACS_EARLIEST_TABLE_NAME = '2010'; -const ACS_EARLIEST_VERSION = '2024-04-01'; +const ACS_EARLIEST_VERSION = '2024-04-19'; const ACS_METADATA_FULL_PATH = `"${ACS_SCHEMA_NAME}"."metadata"`; const ACS_LATEST_TABLE_FULL_PATH = `"${ACS_SCHEMA_NAME}"."${ACS_LATEST_TABLE_NAME}"`; const ACS_EARLIEST_TABLE_FULL_PATH = `"${ACS_SCHEMA_NAME}"."${ACS_EARLIEST_TABLE_NAME}"`; diff --git a/utils/data-processor.js b/utils/data-processor.js index ea4b6f4..da22b9f 100644 --- a/utils/data-processor.js +++ b/utils/data-processor.js @@ -174,7 +174,7 @@ class DataProcessor { */ recalculateIsReliable(row, wasCoded) { // top- or bottom-coded values are not reliable - if (!row.correlationCoefficient) return; + if (!row.correlationCoefficient && !wasCoded) return; row.isReliable = wasCoded ? false : executeFormula(this.data, row.variable, 'isReliable'); } }