--- title: "Season 35 power rankings (weekly) \u2014 provisional" 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 --- > **Note:** data-quality note **Finding.** Provisional judge ranking through week 8; S35 name scrape is garbled \u2014 repair cast map before publishing as power rankings. ```{r} #| label: setup #| include: false source("R/_setup.R") ``` ## Charts ```{r} #| label: 03_s35_cumulative #| fig-cap: "03_s35_cumulative" #| echo: false # Rebuild chart with ggplot2 from bundled CSVs / story data.csv story_dir <- file.path(root, "public/downloads/stories", "03_season35_power_rankings") 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", "03_s35_cumulative.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 = "03_s35_cumulative", 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 = "03_s35_cumulative") + theme_dwts() } } save_both(p, "03_s35_cumulative") p ``` [PNG](charts/03_s35_cumulative.png){download="03_s35_cumulative.png"} · [SVG](charts/03_s35_cumulative.svg){download="03_s35_cumulative.svg"} ```{r} #| label: 03_s35_field #| fig-cap: "03_s35_field" #| echo: false # Rebuild chart with ggplot2 from bundled CSVs / story data.csv story_dir <- file.path(root, "public/downloads/stories", "03_season35_power_rankings") 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", "03_s35_field.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 = "03_s35_field", 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 = "03_s35_field") + theme_dwts() } } save_both(p, "03_s35_field") p ``` [PNG](charts/03_s35_field.png){download="03_s35_field.png"} · [SVG](charts/03_s35_field.svg){download="03_s35_field.svg"} ```{r} #| label: 03_s35_power #| fig-cap: "03_s35_power" #| echo: false # Rebuild chart with ggplot2 from bundled CSVs / story data.csv story_dir <- file.path(root, "public/downloads/stories", "03_season35_power_rankings") 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", "03_s35_power.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 = "03_s35_power", 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 = "03_s35_power") + theme_dwts() } } save_both(p, "03_s35_power") p ``` [PNG](charts/03_s35_power.png){download="03_s35_power.png"} · [SVG](charts/03_s35_power.svg){download="03_s35_power.svg"} ## Data Analysis CSV: [data.csv](../../public/downloads/stories/03_season35_power_rankings/data.csv){download="03_season35_power_rankings-data.csv"} Source tables: `performances.csv`, `scores.csv`, `contestants.csv`, `seasons.csv` under `/downloads/`.