Skip to content

Commit 9c44544

Browse files
author
Eric Tsai
committed
bar charts are broken out by county
1 parent 696ef98 commit 9c44544

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/election_anomaly/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,9 +1044,9 @@ def bar(
10441044
print("Data not created.")
10451045
return
10461046
jurisdiction_id = db.name_to_id(self.session, "ReportingUnit", jurisdiction)
1047-
most_granular_id = db.name_to_id(
1048-
self.session, "ReportingUnitType", d["sub_reporting_unit_type"]
1049-
)
1047+
# for now, bar charts can only handle jurisdictions where county is one level
1048+
# down from the jurisdiction
1049+
most_granular_id = db.name_to_id( self.session, "ReportingUnitType", "county")
10501050
hierarchy = db.get_jurisdiction_hierarchy(
10511051
self.session, jurisdiction_id, most_granular_id
10521052
)

0 commit comments

Comments
 (0)