Skip to content
Open
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
11 changes: 10 additions & 1 deletion census/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def state_county_tract(self, fields, state_fips,
'in': 'state:{} county:{}'.format(state_fips, county_fips),
}, **kwargs)

@supported_years()
@supported_years(2020, 2010)
def state_county_blockgroup(self, fields, state_fips, county_fips,
blockgroup, tract=None, **kwargs):
geo = {
Expand All @@ -575,6 +575,15 @@ def state_county_blockgroup(self, fields, state_fips, county_fips,
geo['in'] += ' tract:{}'.format(tract)
return self.get(fields, geo=geo, **kwargs)

@supported_years()
def state_county_block(self, fields, state_fips, county_fips,
tract, block, **kwargs):
return self.get(fields, geo={
'for': 'block:{}'.format(block),
'in': 'state:{} county:{} tract:{}'.format(
state_fips, county_fips, tract),
}, **kwargs)


class Census(object):

Expand Down
Loading