Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added basic stacked bar plots #20

Merged
merged 8 commits into from
May 23, 2024
Merged

added basic stacked bar plots #20

merged 8 commits into from
May 23, 2024

Conversation

nikhil153
Copy link
Contributor

@nikhil153 nikhil153 commented May 22, 2024

Example of binarized stacked bar for 3+ threshold:
3+_stackedbar

Example of stacked bar showing all Likert levels:
all_levels_stackedbar

Example of binarized stacked bar, stratified by party:
party_3+_stackedbar

@nikhil153 nikhil153 requested a review from alyssadai May 22, 2024 22:08
@michellewang
Copy link
Contributor

michellewang commented May 23, 2024

Just a note here: there is survey data showing up in the notebook because its outputs haven't been cleared. We might want to clear the notebook and/or remove/comment out the df.head() calls, then rewrite Git history (I think a git commit --amend --no-edit then git push -f should do it, but there might be other ways too)

@alyssadai
Copy link
Collaborator

Thanks a lot for catching that @michellewang! Just forced pushed to remove the notebook - let me know if things still don't look right.

@michellewang
Copy link
Contributor

Looks good to me! Also realized that my screenshots in the other PRs also technically show data (in map colours/hoverboxes/bar plots) -- should I remove those as well or do you think it is less of an issue?

- fix typos in variable names
- add type hinting
- use data loader
@alyssadai
Copy link
Collaborator

@michellewang I believe that’s fine for now, since that’s likely the desired behaviour for the plots in the app anyways !

@alyssadai alyssadai changed the title added basic stacked bar plots notebook added basic stacked bar plots May 23, 2024
@alyssadai
Copy link
Collaborator

alyssadai commented May 23, 2024

Thanks @nikhil153 for your work on this 🎉. I pushed some minor clarity-related changes to the code and simplified the plot formatting a bit so it looks more like the Yale climate map bar plots.

The stacked bars are currently still missing full-text labels for the actual outcomes ("Moderately agree", "Agree", etc...), but because I think we need additional info about which ones to use when the bars are binarized, I've opened a separate issue for that.

Will merge this as is for now!

@alyssadai alyssadai merged commit 0d02679 into main May 23, 2024
1 check passed
@alyssadai alyssadai deleted the dive_bar branch May 23, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create function to generate stacked barplot for a single subquestion
3 participants