Shapefiles downloader

Utilities to download shapefiles from US Census website

class CensusShapeCollection(value)[source]

An enumeration.

genz = 'genz'
tiger = 'tiger'
class GISDownloader[source]

Geographic Downloader downloads shape files for given dates from https://www.census.gov/

COUNTY_TEMPLATE = 'https://www2.census.gov/geo/tiger/GENZ{year}/shp/cb_{year}_us_county_500k.zip'
ZCTA_GENZ_TEMPLATE = 'https://www2.census.gov/geo/tiger/GENZ{year}/shp/cb_{year}_us_zcta510_500k.zip'
ZCTA_TIGER_URLs = {2008: 'https://www2.census.gov/geo/tiger/TIGER2008/tl_2008_us_zcta500.zip', 2010: 'https://www2.census.gov/geo/tiger/TIGER2010/ZCTA5/2010/tl_2010_us_zcta510.zip', 2012: 'https://www2.census.gov/geo/tiger/TIGER2012/ZCTA5/tl_2012_us_zcta510.zip', 2013: 'https://www2.census.gov/geo/tiger/TIGER2013/ZCTA5/tl_2013_us_zcta510.zip', 2014: 'https://www2.census.gov/geo/tiger/TIGER2014/ZCTA5/tl_2014_us_zcta510.zip', 2015: 'https://www2.census.gov/geo/tiger/TIGER2015/ZCTA5/tl_2015_us_zcta510.zip', 2016: 'https://www2.census.gov/geo/tiger/TIGER2016/ZCTA5/tl_2016_us_zcta510.zip', 2017: 'https://www2.census.gov/geo/tiger/TIGER2017/ZCTA5/tl_2017_us_zcta510.zip', 2018: 'https://www2.census.gov/geo/tiger/TIGER2018/ZCTA5/tl_2018_us_zcta510.zip', 2019: 'https://www2.census.gov/geo/tiger/TIGER2019/ZCTA5/tl_2019_us_zcta510.zip', 2020: 'https://www2.census.gov/geo/tiger/TIGER2020/ZCTA520/tl_2020_us_zcta520.zip', 2021: 'https://www2.census.gov/geo/tiger/TIGER2021/ZCTA520/tl_2021_us_zcta520.zip', 2022: 'https://www2.census.gov/geo/tiger/TIGER2022/ZCTA520/tl_2022_us_zcta520.zip'}
classmethod download_shapes(source: CensusShapeCollection, year: int, output_dir: Optional[str] = None, strict: bool = False) None[source]
classmethod download_zcta(source: CensusShapeCollection, year: int, output_dir: Optional[str] = None, strict: bool = False) None[source]
classmethod download_county(year: int, output_dir: Optional[str] = None, strict: bool = False) None[source]
y = 2022