The 'congressional_districts()' function has a cutoff at 'year >= 2024' for per-state file downloads, but per-state files are available for 2022 and 2023. This affects the 'cb=False' case.
Current behavior:
- 2022 and 2023 years attempt to download a national file (tl_{year}_us_cd118.zip)
- This fails with both HTTP and FTP errors
Downloading VA 2023... HTTP download failed, trying FTP as fallback... Downloading tl_2023_us_cd118.zip from Census FTP... ✗ Failed VA 2023: Download failed with both HTTP and FTP; check your internet connection or the status of the Census Bureau website at https://www2.census.gov/geo/tiger/ or ftp://ftp2.census.gov/geo/tiger/
Expected behavior:
- 2022 and 2023 should use per-state URLs, same as 2024+
Verified per-state files exist at:
Suggested fix: change if year >= 2024 to if year >= 2022 on line 104
Environment:
- pygris version: 0.2.1
- Python 3.12
- Windows 10
The 'congressional_districts()' function has a cutoff at 'year >= 2024' for per-state file downloads, but per-state files are available for 2022 and 2023. This affects the 'cb=False' case.
Current behavior:
Downloading VA 2023... HTTP download failed, trying FTP as fallback... Downloading tl_2023_us_cd118.zip from Census FTP... ✗ Failed VA 2023: Download failed with both HTTP and FTP; check your internet connection or the status of the Census Bureau website at https://www2.census.gov/geo/tiger/ or ftp://ftp2.census.gov/geo/tiger/Expected behavior:
Verified per-state files exist at:
Suggested fix: change
if year >= 2024toif year >= 2022on line 104Environment: