Skip to content

Instantly share code, notes, and snippets.

Stefan Schmutz sschmutz

Block or report user

Report or block sschmutz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sschmutz
sschmutz / map_switzerland.R
Last active Jan 25, 2019
get data and plot map of Switzerland on a canton level
View map_switzerland.R
# load packages -----------------------------------------------------------
library(here)
library(sf)
library(ggplot2)
# download and read map data ----------------------------------------------
url_gadm <- "https://biogeo.ucdavis.edu/data/gadm3.6/shp/gadm36_CHE_shp.zip"
download.file(url = url_gadm,
destfile = here("gadm36_CHE_shp.zip"))
@sschmutz
sschmutz / 538_santa.R
Created Jan 3, 2019
538 Riddler Express - helping Santa
View 538_santa.R
library(tidyverse)
# define amount of trials for the Monte Carlo Simulation
trial_n <- 1e5
order <- NULL
n_smaller <- NULL
# generate random order for each trial
for (trial in 1:trial_n) {
set.seed(181231 + trial)
View geom_slat.R
library(tidyverse)
# define dimensions
width <- 0.5
height <- 16.5
spike <- 2
# create vectors for polygon
i <- rep(1:30, each = 6)
x_pol <- rep(0.5 * width * c(-1, 1, 1, 0, -1, -1), 30)
View qpcr_animation.R
library(googlesheets)
library(dplyr)
library(readr)
library(ggplot2)
library(gganimate)
# Sharing Link of Google Sheet
qpcr_data_url <-
"https://docs.google.com/spreadsheets/d/1iJSVC2JgcSm1fYTJmTBwpqBJKhfhXQpzdfN6ktCfib8/edit?usp=sharing"
You can’t perform that action at this time.