diff --git a/CensusExternalModule.php b/CensusExternalModule.php index 850e445..27b4a05 100755 --- a/CensusExternalModule.php +++ b/CensusExternalModule.php @@ -76,12 +76,16 @@ function getSharedArgs($censusYear){ $censusYear = (int)$censusYear; // NOTE: The US census is conducted every 10 years on years ending in 0 $mostRecentCensusYear = (int) (floor($censusYear / 10) * 10); - if ($mostRecentCensusYear !== $censusYear) { + // HACK: US Census site eliminated most vintages and benchmarks in August 2024 + if (!in_array($censusYear, [2010, 2020])) { $censusYear = $mostRecentCensusYear; } + if ($mostRecentCensusYear == $censusYear) { // NOTE: vintage Census is chosen for similarity to Census2020_Current scheme, namely the presence of data in "Census Blocks" field of API results // see comments on related PR for further details // https://github.com/vanderbilt-redcap/Census-Tract-Geocoding-External-Module/pull/4 - $benchmark = "Public_AR_ACS{$censusYear}"; - $vintage = "Census{$mostRecentCensusYear}_ACS{$censusYear}"; + // HACK: At the release of ACS 2024, all other ACS benchmarks were eliminated as well as all non ACS2024 vintages + $ACS_year = 2024; + $benchmark = "Public_AR_ACS{$ACS_year}"; + $vintage = "Census{$mostRecentCensusYear}_ACS{$ACS_year}"; } else { $benchmark = "Public_AR_Current"; $vintage = "Census{$censusYear}_Current"; diff --git a/config.json b/config.json index e628052..bc01f00 100755 --- a/config.json +++ b/config.json @@ -77,7 +77,6 @@ "type": "dropdown", "developer_comment": "Please do not attempt to add a 'current' choice; despite census.gov supporting it, this has broken things in the past due to changes in their API", "choices": [ - { "value": "2023", "name": "2023" }, { "value": "2020", "name": "2020" }, { "value": "2010", "name": "2010" } ]