Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ authors:
given-names: "Forest"
- name: "Contributors"
title: "census"
version: 0.8.25
date-released: 2026-01-07
version: 0.8.26
date-released: 2026-02-07
url: "https://github.com/datamade/census"
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ Datasets

For each dataset, the first year listed is the default.

* acs5: `ACS 5 Year Estimates <https://www.census.gov/data/developers/data-sets/acs-5year.html>`_ (2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009)
* acs5: `ACS 5 Year Estimates <https://www.census.gov/data/developers/data-sets/acs-5year.html>`_ (2024, 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009)
* acs3: `ACS 3 Year Estimates <https://www.census.gov/data/developers/data-sets/acs-3year.html>`_ (2013, 2012)
* acs1: `ACS 1 Year Estimates <https://www.census.gov/data/developers/data-sets/acs-1year.html>`_ (2024, 2023, 2022, 2021, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011)
* acs5dp: `ACS 5 Year Estimates, Data Profiles <https://www.census.gov/data/developers/data-sets/acs-5year.html>`_ (2023, 2022, 2021, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009)
* acs3dp: `ACS 3 Year Estimates, Data Profiles <https://www.census.gov/data/developers/data-sets/acs-3year.html>`_ (2013, 2012)
* acs1dp: `ACS 1 Year Estimates, Data Profiles <https://www.census.gov/data/developers/data-sets/acs-1year.html>`_ (2024, 2023, 2022, 2021, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011)
* acs5st: `ACS 5 Year Estimates, Subject Tables <https://www.census.gov/data/developers/data-sets/acs-5year.html>`_ (2023, 2022, 2021, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009)
* acs5st: `ACS 5 Year Estimates, Subject Tables <https://www.census.gov/data/developers/data-sets/acs-5year.html>`_ (2024, 2023, 2022, 2021, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009)
* sf1: `Census Summary File 1 <https://www.census.gov/data/datasets/2010/dec/summary-file-1.html>`_ (2010)
* pl: `Redistricting Data Summary File <https://www.census.gov/programs-surveys/decennial-census/about/rdo/summary-files.2020.html>`_ (2020, 2010, 2000)

Expand Down
8 changes: 4 additions & 4 deletions census/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,10 @@ def get(self, *args, **kwargs):

class ACS5Client(ACSClient):

default_year = 2023
default_year = 2024
dataset = 'acs5'

years = (2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009)
years = (2024, 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009)

@supported_years()
def state_county_subdivision(self, fields, state_fips,
Expand Down Expand Up @@ -359,7 +359,7 @@ def state_county_blockgroup(self, fields, state_fips, county_fips,
geo['in'] += ' tract:{}'.format(tract)
return self.get(fields, geo=geo, **kwargs)

@supported_years(2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011)
@supported_years(2024, 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011)
def zipcode(self, fields, zcta, **kwargs):
warnings.warn(
"zipcode has been deprecated; use state_zipcode instead",
Expand All @@ -370,7 +370,7 @@ def zipcode(self, fields, zcta, **kwargs):

return self.state_zipcode(fields, state_fips, zcta, **kwargs)

@supported_years(2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011)
@supported_years(2024, 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011)
def state_zipcode(self, fields, state_fips, zcta, **kwargs):
year = kwargs.get('year', self.default_year)
geo = {
Expand Down
11 changes: 5 additions & 6 deletions census/tests/test_census.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,14 @@ def test_acs5(self):
('Block Group 1; Census Tract 7007.06; '
'Montgomery County; Maryland')),
('state_place', 'Gaithersburg city, Maryland'),
# 2022 and 2023 ACS5 API calls use legislative districts from 2022 as their geography
('state_district',
'Congressional District 6 (118th Congress), Maryland'),
'Congressional District 6 (119th Congress), Maryland'),
('state_congressional_district',
'Congressional District 6 (118th Congress), Maryland'),
'Congressional District 6 (119th Congress), Maryland'),
('state_legislative_district_upper',
'State Senate District 6 (2022); Maryland'),
'State Senate District 6 (2024); Maryland'),
('state_legislative_district_lower',
'State Legislative District 6 (2022); Maryland'),
'State Legislative District 6 (2024); Maryland'),
('state_zipcode', 'ZCTA5 20877'),
)

Expand Down Expand Up @@ -213,7 +212,7 @@ def test_acs5st(self):
('us', 'United States'),
('state', 'Maryland'),
('state_congressional_district',
'Congressional District 6 (118th Congress), Maryland'),
'Congressional District 6 (119th Congress), Maryland'),
)

self.check_endpoints('acs5st', tests)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = census
version = 0.8.25
version = 0.8.26
author = Jeremy Carbaugh
author_email = jcarbaugh@sunlightfoundation.com
maintainer = Forest Gregg
Expand Down