Skip to content

Instantly share code, notes, and snippets.

View USMortality's full-sized avatar

USMortality.com USMortality

View GitHub Profile
@USMortality
USMortality / deploy.sh
Created June 6, 2024 12:50
Deploy latest SFTPGo on Dokku Server
# Variables
APP_NAME="sftpgo"
DOMAIN="ftp.example.com"
EMAIL="[email protected]"
ENABLE_LETS_ENCRYPT=true # Set to false to disable Let's Encrypt setup
# Create Dokku app
dokku apps:create $APP_NAME
# Set up domain
@USMortality
USMortality / chart_germany_livebirths.r
Last active March 13, 2025 18:16
Live Births [Germany]
library(readr)
library(dplyr)
library(tsibble)
library(TTR)
library(ggplot2)
library(tidyr)
library(fable)
sf <- 2
width <- 600 * sf
@USMortality
USMortality / chart_germany_death_rates.r
Last active February 13, 2025 03:37
Yearly Death Rates [Germany]
library(readr)
library(tidyr)
library(ggplot2)
library(dplyr)
sf <- 2
width <- 600 * sf
height <- 335 * sf
options(vsc.dev.args = list(width = width, height = height, res = 72 * sf))
@USMortality
USMortality / .chart_world_gdp_ppp_vs_temp.r
Last active March 10, 2025 14:53
GDP (PPP) vs Avg Temp [World]
library(readr)
library(rvest)
library(dplyr)
library(ggpubr)
sf <- 2
width <- 1440 * sf
height <- 960 * sf
options(vsc.dev.args = list(width = width, height = height, res = 72 * sf))
@USMortality
USMortality / .chart_olympic_medals.r
Last active March 10, 2025 14:53
Olympic Medals (2024) [World]
library(rvest)
library(dplyr)
library(ggpubr)
library(readxl)
library(scales)
sf <- 2
width <- 1440 * sf
height <- 960 * sf
@USMortality
USMortality / chart_olympics_pop_per_medal.r
Last active October 25, 2024 00:13
Population per Medal in the Olympic Games since 1896 [World]
library(readr)
library(ggplot2)
library(scales)
library(dplyr)
sf <- 2
width <- 600 * sf
height <- 335 * sf
options(vsc.dev.args = list(width = width, height = height, res = 72 * sf))
@USMortality
USMortality / puhach_et_al_2022.r
Last active October 5, 2024 20:24
Reanalysis Puhach et al, 2022
# Study: https://www.nature.com/articles/s41591-022-01816-0
library(readxl)
library(dplyr)
library(ggplot2)
sf <- 2
options(vsc.dev.args = list(width = 600 * sf, height = 335 * sf, res = 72 * sf))
download.file(
@USMortality
USMortality / chart_germany_dead_births.r
Last active February 13, 2025 03:35
Rate of Death Births per All Births [Germany]
library(readr)
library(dplyr)
library(tsibble)
library(ggplot2)
library(tidyr)
library(scales)
sf <- 2
width <- 600 * sf
height <- 335 * sf
@USMortality
USMortality / cleanup.sh
Last active August 26, 2024 23:31
Ubuntu Cleanup Script
#!/bin/bash
# Update the package list and upgrade installed packages
sudo apt-get update && sudo apt-get upgrade -y
# Clean up APT cache
sudo apt-get clean
# Remove unnecessary packages
sudo apt-get autoremove -y
@USMortality
USMortality / chart_singapore_cmr_age.r
Last active October 25, 2024 00:12
Crude Mortality Rate by Age Group [Singapore]
library(readr)
library(tidyr)
library(ggplot2)
library(dplyr)
library(fable)
sf <- 2
width <- 600 * sf
height <- 335 * sf