Skip to content

Commit

Permalink
Bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
TJohnsonAZ committed May 21, 2024
1 parent a05b6cf commit 601023c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions epymorph/geo/adrio/census/adrio_census.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def fetch_sf(self, scope: CensusScope) -> GeoDataFrame:
sort_param = ['state', 'county', 'tract']

case TractScope('county', includes):
data_df = concat(tracts(state=s, county=c)
data_df = concat(tracts(state=s, county=c, year=scope.year)
for s, c in map(COUNTY.decompose, includes))

data_df = data_df.rename(
Expand All @@ -354,7 +354,7 @@ def fetch_sf(self, scope: CensusScope) -> GeoDataFrame:
sort_param = ['state', 'county', 'tract']

case TractScope('tract', includes):
data_df = concat(tracts(state=s, county=c)
data_df = concat(tracts(state=s, county=c, year=scope.year)
for s, c, t in map(TRACT.decompose, includes))

data_df = data_df.rename(
Expand All @@ -374,7 +374,7 @@ def fetch_sf(self, scope: CensusScope) -> GeoDataFrame:
sort_param = ['state', 'county', 'tract', 'block group']

case BlockGroupScope('county', includes):
data_df = concat(block_groups(state=s, county=c)
data_df = concat(block_groups(state=s, county=c, year=scope.year)
for s, c in map(COUNTY.decompose, includes))

data_df = data_df.rename(columns={
Expand All @@ -383,7 +383,7 @@ def fetch_sf(self, scope: CensusScope) -> GeoDataFrame:
sort_param = ['state', 'county', 'tract', 'block group']

case BlockGroupScope('tract', includes):
data_df = concat(block_groups(state=s, county=c)
data_df = concat(block_groups(state=s, county=c, year=scope.year)
for s, c, t in map(TRACT.decompose, includes))

data_df = data_df.rename(columns={
Expand All @@ -395,7 +395,7 @@ def fetch_sf(self, scope: CensusScope) -> GeoDataFrame:
sort_param = ['state', 'county', 'tract', 'block_group']

case BlockGroupScope('block group', includes):
data_df = concat(block_groups(state=s, county=c)
data_df = concat(block_groups(state=s, county=c, year=scope.year)
for s, c, t, bg in map(BLOCK_GROUP.decompose, includes))

data_df = data_df.rename(columns={
Expand Down
2 changes: 1 addition & 1 deletion epymorph/geo/dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(self, spec: DynamicGeoSpec, adrios: dict[str, ADRIO]):
raise ValueError("Geo must contain an attribute called 'label'.")
self._adrios = adrios
labels = self._adrios[LABEL.name].get_value()
super().__init__(spec, len(labels))
super().__init__(spec, labels.size)

# events
self.fetch_start = Event()
Expand Down

0 comments on commit 601023c

Please sign in to comment.