Skip to content

Instantly share code, notes, and snippets.

View USMortality's full-sized avatar

USMortality.com USMortality

View GitHub Profile
@USMortality
USMortality / chart_world_measles_cases_vaxx.r
Created November 15, 2024 15:44
Measles Cases & Vaxx Coverage [World]
library(jsonlite)
library(tibble)
library(dplyr)
library(ggplot2)
library(scales)
sf <- 2
width <- 600 * sf
height <- 335 * sf
@USMortality
USMortality / chart_usa_measles.r
Last active March 7, 2025 15:19
Measles Cases & Deaths [USA]
library(readr)
library(dplyr)
library(fable)
library(ggplot2)
library(ggrepel)
sf <- 2
width <- 600 * sf
height <- 335 * sf
@USMortality
USMortality / chart_usa_elections_president_percentage_eligible_d_r.r
Created November 11, 2024 01:56
Democratic & Republican Votes as Percentage of Voting Eligible Population [USA]
# Required libraries
library(ggplot2)
library(dplyr)
library(tsibble)
library(fable)
library(feasts)
library(readr)
sf <- 2
width <- 600 * sf
@USMortality
USMortality / chart_usa_electoral_college.r
Created November 8, 2024 16:04
Electoral College Votes by Presidential Election [USA]
library(ggplot2)
library(dplyr)
library(readr)
sf <- 2
width <- 600 * sf
height <- 335 * sf
options(vsc.dev.args = list(width = width, height = height, res = 72 * sf))
@USMortality
USMortality / chart_usa_elections_president_percentage_eligible.r
Created November 8, 2024 15:31
Votes as Percentage of Voting Eligible Population [USA]
# Required libraries
library(ggplot2)
library(dplyr)
library(tsibble)
library(fable)
library(feasts)
library(readr)
sf <- 2
width <- 600 * sf
@USMortality
USMortality / chart_usa_democratic_votes.r
Last active November 20, 2024 23:24
Democratic Popular Votes by Presidential Election (with Forecasts) [USA]
library(ggplot2)
library(dplyr)
library(tsibble)
library(fable)
library(feasts)
sf <- 2
width <- 600 * sf
height <- 335 * sf
@USMortality
USMortality / chart_usa_popular_vote.r
Last active December 7, 2024 14:45
Popular Vote Presidential Elections [USA]
@USMortality
USMortality / .chart_world_eCMR.r
Last active April 4, 2025 20:34
Excess mortality: Deaths from all causes compared to projection [World]
library(readr)
library(dplyr)
library(ggplot2)
library(tsibble)
library(fable)
library(lubridate)
library(stringr)
sf <- 2
width <- 540 * sf
@USMortality
USMortality / chart_usa_election_forecast_models.r
Last active November 22, 2024 02:12
US Presidential Elections: Seven Major Polling-Based Forecasts
# Load required libraries
library(ggplot2)
library(ggrepel)
library(grid)
library(dplyr)
library(magick)
library(gridExtra)
sf <- 2
width <- 600 * sf
@USMortality
USMortality / chart_germany_asmr_asd.r
Last active February 13, 2025 03:31
Excess CMR vs Excess ASMR vs. Excess ASD (%) [Germany]
library(readr)
library(tidyr)
library(ggplot2)
library(dplyr)
library(stringr)
library(scales)
library(lubridate)
library(tsibble)
source(paste0(