We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is your feature request related to a problem? Please describe. Useful to have all info in one plot
Describe the solution you'd like
Describe alternatives you've considered manual
Additional context
Something like this...
Probably needs an lapply rather than the first three subsets. And some way to define what level to use...
bubblekpiplot <- function(kpis = kpis, kpi, title, lkup){ bubbledat <- kpis %>% `[[`(., kpi) %>% `[[`(., "lowest_level") %>% `[[`(., "calc") %>% left_join(lkup) rowdat<- kpis %>% `[[`(., kpi) %>% `[[`(., "upper_level") %>% `[[`(., "calc") overall <- kpis %>% `[[`(., kpi) %>% `[[`(., "overall") %>% `[[`(., "calc") bubbledat %>% ggplot(aes(x = stat, y = upper_level, size = N, pch = "Site")) + geom_vline(aes(xintercept = stat), data = overall, lty = 2, col = "grey") + geom_point(aes(x = stat, y = upper_level, pch = "Level"), data = rowdat, inherit.aes = FALSE, # size = 2 ) + geom_point(col = unibeRed(.5)) + myggtheme() + # xlim(0,100) + scale_y_discrete(limits=rev) + ggtitle(title) + guides(size = guide_legend(title = "N participants in site", fill = NA, order = 2, nrow = 1), shape = guide_legend(order = 1, col = "black")) + theme(plot.title.position = "plot", axis.title.x = element_blank()) + scale_shape_manual(values = c(Site = 1, Country = 3), name = "", guide = guide_legend(override.aes = list(col = c("black", unibeRed(.5)), size = 2))) + scale_size_continuous(guide = guide_legend(nrow = 1, override.aes = list(fill = NA), fill = NA)) + labs(caption = "The dashed vertical line represents the trial as a whole") }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is your feature request related to a problem? Please describe.
Useful to have all info in one plot
Describe the solution you'd like
Describe alternatives you've considered
manual
Additional context
Something like this...
Probably needs an lapply rather than the first three subsets. And some way to define what level to use...
The text was updated successfully, but these errors were encountered: