Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alyssa Dai <[email protected]>
  • Loading branch information
surchs and alyssadai authored Sep 27, 2024
1 parent 4ec6353 commit bffac74
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/create_prerendered_figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@

def make_full_set_of_barplots(state=None, stratify=None, threshold=None):
"""
This returns a dictionary keyed on the question
with the value being the plotly graph object figure for that question.
This returns a dictionary for all questions where keys are question IDs
and values are the plotly graph object figure for each question.
"""
return {
question: make_stacked_bar(question, "all", state, stratify, threshold)
question: make_stacked_bar(question, "all", state, stratify, threshold, NUM_DECIMALS)
for question in UNIQUE_QUESTIONS
}

Expand All @@ -46,7 +46,7 @@ def make_all_figures():
# For state level figures, we don't stratify by party
if state is not None and stratify:
continue
for threshold in [None, "3+"]:
for threshold in [None, DEFAULT_QUESTION["outcome"]]:
key = (state, stratify, threshold)
figures[key] = make_full_set_of_barplots(*key)
return figures
Expand Down

0 comments on commit bffac74

Please sign in to comment.