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
10 changes: 5 additions & 5 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>`_ (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>`_ (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>`_ (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>`_ (2022, 2021, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009)
* acs1: `ACS 1 Year Estimates <https://www.census.gov/data/developers/data-sets/acs-1year.html>`_ (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>`_ (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>`_ (2022, 2021, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009)
* acs1dp: `ACS 1 Year Estimates, Data Profiles <https://www.census.gov/data/developers/data-sets/acs-1year.html>`_ (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)
* 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
14 changes: 7 additions & 7 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 = 2022
default_year = 2023
dataset = 'acs5'

years = (2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009)
years = (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(2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011)
@supported_years(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(2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011)
@supported_years(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 Expand Up @@ -422,10 +422,10 @@ class ACS3DpClient(ACS3Client):

class ACS1Client(ACSClient):

default_year = 2022
default_year = 2023
dataset = 'acs1'

years = (2022, 2021, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005)
years = (2023, 2022, 2021, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005)

@supported_years()
def state_county_subdivision(self, fields, state_fips,
Expand All @@ -440,7 +440,7 @@ class ACS1DpClient(ACS1Client):

dataset = 'acs1/profile'

years = (2022, 2021, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012)
years = (2023, 2022, 2021, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012)


class SF1Client(Client):
Expand Down
5 changes: 3 additions & 2 deletions census/tests/test_census.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,15 @@ 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'),
('state_congressional_district',
'Congressional District 6 (118th Congress), Maryland'),
('state_legislative_district_upper',
'State Senate District 6 (2022), Maryland'),
'State Senate District 6 (2022); Maryland'),
('state_legislative_district_lower',
'State Legislative District 6 (2022), Maryland'),
'State Legislative District 6 (2022); Maryland'),
('state_zipcode', 'ZCTA5 20877'),
)

Expand Down