Skip to content

Instantly share code, notes, and snippets.

View USMortality's full-sized avatar

USMortality.com USMortality

View GitHub Profile
@USMortality
USMortality / chart_fertility_vs_vaccination_europe.r
Created June 18, 2025 16:17
COVID-19 Vaccinations vs. Excess Fertility [Europe]
library(tidyverse)
library(ggpubr)
library(tsibble)
library(fable)
library(ggpmisc)
library(ggrepel)
library(scales)
sf <- 2
width <- 1200 * sf
@USMortality
USMortality / chart_mortality_ucd_chapter_usa.r
Created June 14, 2025 16:41
Total Deaths/Mortality by Selected UCD Chapters [USA, Western Census Region]
library(data.table)
library(ggplot2)
sf <- 2
width <- 900 * sf
height <- 450 * sf
options(vsc.dev.args = list(width = width, height = height, res = 72 * sf))
# Load data
s <- fread(
@USMortality
USMortality / chart_vaccine_mcd_usa.r
Last active June 8, 2025 20:47
Vaccine Related Deaths [USA]
library(data.table)
library(ggplot2)
sf <- 2
width <- 600 * sf
height <- 335 * sf
options(vsc.dev.args = list(width = width, height = height, res = 72 * sf))
# All potential vaccine related ICD10 codes
elevated_icd10 <- c(
@USMortality
USMortality / chart_usa_cancer_incidence_mortality.r
Created May 29, 2025 15:30
Crude Cancer Incidence & Mortality [USA]
library(readr)
library(tidyr)
library(ggplot2)
library(dplyr)
library(fable)
library(tsibble)
sf <- 2
width <- 900 * sf
height <- 450 * sf
@USMortality
USMortality / .chart_world_easmr_v_gvt_stringency.r
Last active April 15, 2025 13:47
eASMR vs Government Stringency [World]
library(readr)
library(scales)
library(ggrepel)
library(ggpubr)
library(ggpmisc)
sf <- 2
width <- 600 * sf
height <- 335 * sf
@USMortality
USMortality / .chart_world_easmr_correl.r
Last active April 15, 2025 13:47
ASMR Excess vs Confounders Correlation [World]
library(readr)
library(GGally)
sf <- 2
width <- 900 * sf
height <- 450 * sf
options(vsc.dev.args = list(width = width, height = height, res = 72 * sf))
source(paste0(
@USMortality
USMortality / .chart_world_easmr_vaxx_adj.r
Last active April 15, 2025 13:47
Adjusted Excess Age-Standardized Mortality Rate (eASMR*) vs Share of Population COVID-19 Vaccinated (1st) [World]
library(readr)
library(scales)
library(ggpubr)
library(ggpmisc)
library(ggrepel)
source(paste0(
"https://gist.githubusercontent.com/USMortality/",
"cf0dc23d0d5ca609539fe11c9c089fcc/raw/asmr_country_dataset.r"
))
@USMortality
USMortality / .chart_usa_counties_vs_hsa.r
Last active April 15, 2025 01:39
Continental Counties vs Health Service Areas (HSA) [USA]
library(tigris)
library(ggplot2)
library(dplyr)
library(readxl)
library(sf)
sf <- 2
width <- 1920 * sf
height <- 1080 * sf
@USMortality
USMortality / chart_usa_sp500.r
Last active April 15, 2025 01:29
Stocks SP500 [USA]
library(tidyverse)
library(tsibble)
library(ggrepel)
library(quantmod)
sf <- 2
width <- 600 * sf
height <- 335 * sf
options(vsc.dev.args = list(width = width, height = height, res = 72 * sf))
@USMortality
USMortality / deploy.sh
Last active April 14, 2025 20:18
Dokku deploy script
#!/usr/bin/env bash
# Require IP argument or environment variable
IP="${1:-${IP}}"
if [ -z "$IP" ]; then
echo "❌ Error: IP is required."
echo "Usage: IP=1.2.3.4 ./deploy.sh"
echo " or: ./deploy.sh 1.2.3.4"
exit 1