Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
saketkc committed Jan 17, 2024
1 parent c8a066f commit 8f2b415
Show file tree
Hide file tree
Showing 362 changed files with 110 additions and 52,752 deletions.
2 changes: 1 addition & 1 deletion R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ FitMultinom <- function(data,
#' @export
#'
FitMultinomWeekly <- function(variant_df, newdata_df) {
model <- multinom(formula = lineage_collapsed ~ ns(WeekYearCollected, 2), weights = n, data = variant_df, maxit = 1000)
model <- multinom(formula = lineage_collapsed ~ ns(WeekYearCollected, 2), weights = n, data = variant_df, maxit = 1000, trace = FALSE)
preds <- predict(model, newdata = newdata_df, type = "prob")
x <- sweep(x = preds, MARGIN = 1, STATS = newdata_df$n, FUN = "*")
mode(x) <- "integer"
Expand Down
8 changes: 5 additions & 3 deletions R/visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ PlotMullerDailyPrevalence <- function(df, ncol = 4) {
#' @importFrom patchwork wrap_plots
#' @export
#'
PlotVariantPrevalenceAnimated <- function(df, title = NULL, caption = "**Source: gisaid.org** <br>", colors = NULL, date_breaks = "14 days", trans_y = "identity") {
PlotVariantPrevalenceAnimated <- function(df, title = NULL, caption = "**Source: gisaid.org** <br>",
colors = NULL, date_breaks = "14 days", trans_y = "identity") {
if (!is.null(colors)) {
color_values <- colors
} else {
Expand All @@ -255,7 +256,8 @@ PlotVariantPrevalenceAnimated <- function(df, title = NULL, caption = "**Source:
) +
geom_line() +
scale_x_yearweek(date_breaks = date_breaks, date_labels = "%d %b %Y", guide = guide_axis(angle = 90)) +
scale_y_continuous(labels = label_number(accuracy = 1, scale_cut = cut_short_scale())) + # , trans = trans_y) +
scale_y_continuous(labels = label_number(accuracy = NULL, scale_cut = cut_short_scale())) + # , trans = trans_y) +
#scale_y_continuous(labels = label_number(accuracy = 1, scale_cut = cut_short_scale()), trans = trans_y) +
geom_label(hjust = 0, aes(label = variant), nudge_x = 10, show.legend = FALSE) +
geom_point() +
coord_cartesian(ylim = c(0, NA), clip = "off") +
Expand All @@ -269,7 +271,7 @@ PlotVariantPrevalenceAnimated <- function(df, title = NULL, caption = "**Source:
caption = paste0(caption, Sys.Date())
) +
theme(legend.position = "bottom", axis.title.y = element_text(margin = margin(t = 0, r = 20, b = 0, l = 0)))
anim <- the_anim + transition_reveal(Date) + view_follow(fixed_y = c(0, NA), fixed_x = T)
anim <- the_anim + transition_reveal(Date) + view_follow(fixed_y = T, fixed_x = T)
anim <- animate(anim, renderer = gifski_renderer(), height = 900, width = 1100, res = 150, nframes = 300, rewind = T, end_pause = 30)
return(anim)
}
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed docs/articles/Bengaluru_animated.gif
Binary file not shown.
Binary file removed docs/articles/Bengaluru_animated_2021.gif
Binary file not shown.
Binary file removed docs/articles/Bengaluru_animated_2022.gif
Binary file not shown.
Binary file modified docs/articles/Brazil_animated.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/Brazil_animated_2021.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/Brazil_animated_2023.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/Brazil_animated_2024.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/articles/Chennai_animated.gif
Binary file not shown.
Binary file removed docs/articles/Chennai_animated_2021.gif
Binary file not shown.
Binary file removed docs/articles/Chennai_animated_2022.gif
Binary file not shown.
Binary file modified docs/articles/Germany_animated.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/Germany_animated_2021.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/Germany_animated_2023.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/Germany_animated_2024.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/articles/Gujarat_animated.gif
Binary file not shown.
Binary file removed docs/articles/Gujarat_animated_2021.gif
Binary file not shown.
Binary file removed docs/articles/Gujarat_animated_2022.gif
Binary file not shown.
Binary file modified docs/articles/IN_animated.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/IN_animated_2021.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/IN_animated_2022.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/IN_animated_2023.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/IN_animated_latest.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 11 additions & 3 deletions docs/articles/Introduction.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/articles/Introduction_files/figure-html/unnamed-chunk-10-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed docs/articles/Jaipur_animated.gif
Diff not rendered.
Binary file removed docs/articles/Jaipur_animated_2021.gif
Diff not rendered.
Binary file removed docs/articles/Jaipur_animated_2022.gif
Diff not rendered.
Binary file removed docs/articles/Kolkata_animated.gif
Diff not rendered.
Binary file removed docs/articles/Kolkata_animated_2021.gif
Diff not rendered.
Binary file removed docs/articles/Kolkata_animated_2022.gif
Diff not rendered.
Binary file removed docs/articles/Maharashtra_animated.gif
Diff not rendered.
Binary file removed docs/articles/Maharashtra_animated_2021.gif
Diff not rendered.
Binary file removed docs/articles/Maharashtra_animated_2022.gif
Diff not rendered.
Loading

0 comments on commit 8f2b415

Please sign in to comment.