-
Notifications
You must be signed in to change notification settings - Fork 0
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
Paper figures #77
Paper figures #77
Conversation
This allows fontsizes to change when chaging the 'basefontsize' configurable parameter.
For the paper, we want a panel plot, with one panel for each medication group. Ideally we would make new measures to count patients with each medication type, but this has been done after-the-fact. Panel plots subsetting requires a measures file and measures pattern. But because the grouped medications measures do not exist in the measures file we cannot do this. Make a new action to make a measures file. This way it can be fed directly into a panel plot action.
These time series are easier to read when they are a bit wider. First actually allow the user to control how many columns are in the plot. And now that we are using a panel plot for multiple population level measures, allow the user to hide the legend (and resize accordingly) if the legend is redundant.
Depending on what type of plot we want to generate (a panel plot, or a single plot with plot measures report), we want to be able to make a season table and annotate the seasons in either case. Move this code into utils so it can be used by both scripts. Annotating the plot with max/min arrows and counts was a bit cluttered and confusing, and less necessary since we are not plotting on the log scale. Instead just plot a marker for the max, and refer to the season table.
Supplemental table
Measure tables can have ["REDACTED"] in them, which causes the column to be mixed type string and float. Use read_csv to specify null type, and that numerator, denominator, and value are floats at load time, rather than having to do it after the fact. Make sure all actions use this function rather than their own read_csv. And some other minor cleanup
Utilizing the new settings
Dummy data tends to have more redactions, and hits the case where there is no data for the season table, or only data for 2022/23. Return None in these cases.
9c2ca19
to
6918aa9
Compare
Table1 code was copied from another project. Use local utility functions where possible.
fde2625
to
2525e10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! One thing to note, is that our docs currently say all tables should be .csv
or .tsv
. I don't think you need to change them - we should think about how to support your workflow
The current workflow is to use pandoc with a template docx to make a formatted docx table |
Given feedback on figures from team meeting, the main goals were
This was achieved by switching from using plot_measures_report to using panel_plots for paper figures 1 and 2, which meant a chunk of code that was in panel plots (grouping the medication measures, generating the season tables and annotating seasonal max/min) had to move from plot_measures report into the shared utilities.
Panel plots were also modified to make a 1 column panel plot look better, as the width makes the panels more legible.
The project yaml has been updated to ensure that all papers/figures (including supplemental) are captured in an action.