Repository navigation
Compute PRCDA entire-state non-PRCDA list from prcda.csv - #231
Conversation
The hard-coded ENTIRE_STATE_NON_PRCDA list in PrcdaUtils got out of sync with prcda.csv (MD and TN now have PRCDA counties), so unknown counties for those states returned 0 instead of 9. The list is now computed in CountryData when the PRCDA data is initialized: 50 states + DC minus the states present in the CSV, plus territories, provinces and military codes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@howew do you mind reviewing the changes? Thanks. |
|
We should probably factor in the ENTIRE_STATE_PRCDA list into the logic as well. There are states that don't have entries in the CSV, but we know all counties are PRCDA. That way there isn't any overlap between ENTIRE_STATE_PRCDA and ENTIRE_STATE_NON_PRCDA. Can you move the logic for ENTIRE_STATE_PRCDA into CountyData as well and factor it into the NON_PRCDA determination? The logic checks ENTIRE_STATE_PRCDA first, so even if there is overlap it will give you the right value... but it probably shouldn't have overlap, just in case the order of those if statements is ever changed. |
The entire-state PRCDA list now lives in CountryData next to the non-PRCDA list, and those states are excluded when computing the non-PRCDA list so the two can never overlap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Good call. I just made the change. |
|
|
Looks good to me!! |



Closes #230
The hard-coded ENTIRE_STATE_NON_PRCDA list in PrcdaUtils got out of sync with prcda.csv (MD and TN now have PRCDA counties), so unknown counties for those states returned 0 instead of 9. The list is now computed in CountryData when the PRCDA data is initialized: 50 states + DC minus the states present in the CSV, plus territories, provinces and military codes.