--- title: "Most improved week-over-week" subtitle: "Data with the Stars · An Artometrics project" date: 2026-11-03 format: html: toc: true embed-resources: true theme: cosmo pdf: documentclass: article geometry: margin=1in execute: echo: false warning: false message: false --- **Finding.** Largest WoW jump: Skai Jackson S29 week 4 (+3.333). ```{r} #| label: setup #| include: false source("R/_setup.R") ``` ## Charts ```{r} #| label: 17_wow_alltime #| fig-cap: "17_wow_alltime" #| echo: false # Rebuild chart with ggplot2 from bundled CSVs / story data.csv story_dir <- file.path(root, "public/downloads/stories", "17_most_improved_wow") df <- read_csv(file.path(story_dir, "data.csv"), show_col_types = FALSE) # Prefer a pre-defined plot expression file if present; else smart default plot_r <- file.path(root, "reports/qmd/R/plots", "17_wow_alltime.R") if (file.exists(plot_r)) { source(plot_r, local = TRUE) # expects object `p` } else { # Default: if typical named mean columns, bar them num_cols <- names(df)[sapply(df, is.numeric)] chr_cols <- names(df)[sapply(df, function(z) is.character(z) || is.factor(z))] ycol <- intersect(c("mean","wins","delta","boost","composite","accuracy","n","perfects","share","lift","pro_mean","resid","streak","guest_mean","field_mean","pts"), num_cols) ycol <- if (length(ycol)) ycol[[1]] else num_cols[[1]] xcol <- intersect(c("dance_style","pro","celebrity","judge","bucket","theme_key","hometown_state","checkpoint","label","song","professional","role","era","bin","metric"), chr_cols) xcol <- if (length(xcol)) xcol[[1]] else if (length(chr_cols)) chr_cols[[1]] else NULL if (!is.null(xcol)) { dd <- df if (nrow(dd) > 20) dd <- dd[1:20,] dd[[xcol]] <- as.character(dd[[xcol]]) dd <- dd[!duplicated(dd[[xcol]]), , drop = FALSE] dd[[xcol]] <- factor(dd[[xcol]], levels = rev(unique(dd[[xcol]]))) p <- ggplot(dd, aes(.data[[ycol]], .data[[xcol]], fill = .data[[ycol]])) + geom_col() + scale_fill_gradient(low = "#A8DADC", high = "#6B4CE6") + labs(title = "17_wow_alltime", x = ycol, y = NULL) + theme_dwts() + theme(legend.position = "none") } else { p <- ggplot(df, aes(.data[[num_cols[[1]]]])) + geom_histogram(bins = 30, fill = "#6B4CE6", color = "white") + labs(title = "17_wow_alltime") + theme_dwts() } } save_both(p, "17_wow_alltime") p ``` [PNG](charts/17_wow_alltime.png){download="17_wow_alltime.png"} · [SVG](charts/17_wow_alltime.svg){download="17_wow_alltime.svg"} ```{r} #| label: 17_wow_hist #| fig-cap: "17_wow_hist" #| echo: false # Rebuild chart with ggplot2 from bundled CSVs / story data.csv story_dir <- file.path(root, "public/downloads/stories", "17_most_improved_wow") df <- read_csv(file.path(story_dir, "data.csv"), show_col_types = FALSE) # Prefer a pre-defined plot expression file if present; else smart default plot_r <- file.path(root, "reports/qmd/R/plots", "17_wow_hist.R") if (file.exists(plot_r)) { source(plot_r, local = TRUE) # expects object `p` } else { # Default: if typical named mean columns, bar them num_cols <- names(df)[sapply(df, is.numeric)] chr_cols <- names(df)[sapply(df, function(z) is.character(z) || is.factor(z))] ycol <- intersect(c("mean","wins","delta","boost","composite","accuracy","n","perfects","share","lift","pro_mean","resid","streak","guest_mean","field_mean","pts"), num_cols) ycol <- if (length(ycol)) ycol[[1]] else num_cols[[1]] xcol <- intersect(c("dance_style","pro","celebrity","judge","bucket","theme_key","hometown_state","checkpoint","label","song","professional","role","era","bin","metric"), chr_cols) xcol <- if (length(xcol)) xcol[[1]] else if (length(chr_cols)) chr_cols[[1]] else NULL if (!is.null(xcol)) { dd <- df if (nrow(dd) > 20) dd <- dd[1:20,] dd[[xcol]] <- as.character(dd[[xcol]]) dd <- dd[!duplicated(dd[[xcol]]), , drop = FALSE] dd[[xcol]] <- factor(dd[[xcol]], levels = rev(unique(dd[[xcol]]))) p <- ggplot(dd, aes(.data[[ycol]], .data[[xcol]], fill = .data[[ycol]])) + geom_col() + scale_fill_gradient(low = "#A8DADC", high = "#6B4CE6") + labs(title = "17_wow_hist", x = ycol, y = NULL) + theme_dwts() + theme(legend.position = "none") } else { p <- ggplot(df, aes(.data[[num_cols[[1]]]])) + geom_histogram(bins = 30, fill = "#6B4CE6", color = "white") + labs(title = "17_wow_hist") + theme_dwts() } } save_both(p, "17_wow_hist") p ``` [PNG](charts/17_wow_hist.png){download="17_wow_hist.png"} · [SVG](charts/17_wow_hist.svg){download="17_wow_hist.svg"} ```{r} #| label: 17_wow_s35 #| fig-cap: "17_wow_s35" #| echo: false # Rebuild chart with ggplot2 from bundled CSVs / story data.csv story_dir <- file.path(root, "public/downloads/stories", "17_most_improved_wow") df <- read_csv(file.path(story_dir, "data.csv"), show_col_types = FALSE) # Prefer a pre-defined plot expression file if present; else smart default plot_r <- file.path(root, "reports/qmd/R/plots", "17_wow_s35.R") if (file.exists(plot_r)) { source(plot_r, local = TRUE) # expects object `p` } else { # Default: if typical named mean columns, bar them num_cols <- names(df)[sapply(df, is.numeric)] chr_cols <- names(df)[sapply(df, function(z) is.character(z) || is.factor(z))] ycol <- intersect(c("mean","wins","delta","boost","composite","accuracy","n","perfects","share","lift","pro_mean","resid","streak","guest_mean","field_mean","pts"), num_cols) ycol <- if (length(ycol)) ycol[[1]] else num_cols[[1]] xcol <- intersect(c("dance_style","pro","celebrity","judge","bucket","theme_key","hometown_state","checkpoint","label","song","professional","role","era","bin","metric"), chr_cols) xcol <- if (length(xcol)) xcol[[1]] else if (length(chr_cols)) chr_cols[[1]] else NULL if (!is.null(xcol)) { dd <- df if (nrow(dd) > 20) dd <- dd[1:20,] dd[[xcol]] <- as.character(dd[[xcol]]) dd <- dd[!duplicated(dd[[xcol]]), , drop = FALSE] dd[[xcol]] <- factor(dd[[xcol]], levels = rev(unique(dd[[xcol]]))) p <- ggplot(dd, aes(.data[[ycol]], .data[[xcol]], fill = .data[[ycol]])) + geom_col() + scale_fill_gradient(low = "#A8DADC", high = "#6B4CE6") + labs(title = "17_wow_s35", x = ycol, y = NULL) + theme_dwts() + theme(legend.position = "none") } else { p <- ggplot(df, aes(.data[[num_cols[[1]]]])) + geom_histogram(bins = 30, fill = "#6B4CE6", color = "white") + labs(title = "17_wow_s35") + theme_dwts() } } save_both(p, "17_wow_s35") p ``` [PNG](charts/17_wow_s35.png){download="17_wow_s35.png"} · [SVG](charts/17_wow_s35.svg){download="17_wow_s35.svg"} ## Data Analysis CSV: [data.csv](../../public/downloads/stories/17_most_improved_wow/data.csv){download="17_most_improved_wow-data.csv"} Source tables: `performances.csv`, `scores.csv`, `contestants.csv`, `seasons.csv` under `/downloads/`.