Skip to content

Instantly share code, notes, and snippets.

Avatar

Ilari Scheinin ilarischeinin

View GitHub Profile
@ilarischeinin
ilarischeinin / snow.R
Created Nov 30, 2017
Plot snow depths for Helsinki winters
View snow.R
# snow.R: Plot snow depths for Helsinki winters
# Ilari Scheinin
# firstname.lastname@gmail.com
# MIT License
library(dplyr)
library(fmi)
library(ggplot2)
library(lubridate)
@ilarischeinin
ilarischeinin / 00-sharp-shooter.R
Last active Sep 3, 2020
Ranking NHL’s best shooters with Bayesian multilevel modeling - https://ilari.scheinin.fi/ranking-nhls-best-shooters/
View 00-sharp-shooter.R
# Ranking NHL’s best shooters with Bayesian multilevel modeling
# https://ilari.scheinin.fi/ranking-nhls-best-shooters/
# Ilari Scheinin
# firstname.lastname@gmail.com
# Code: MIT Licence
# Figures and tables: CC-BY
# For inclusion in the blog post, the main code is split into snippets in
# separate files named like *-chunk.R.
# This file exists purely for the boilerplate above, and for running the entire
View plot_dist.R
# plot_dist.R: convenience function for plotting distribution shapes.
# Ilari Scheinin
# firstname.lastname@gmail.com
# 2016-11-17
# MIT License
# distribution: a density or distribution function, such as dnorm, pbeta, ...
# parameters: a (possibly named) vector of parameters for the
# density/distribution function
View finland-dependency-ratio.R
library(pxweb)
library(dplyr)
library(stringr)
library(tidyr)
library(ggplot2)
library(animation)
api <- "http://pxnet2.stat.fi/PXWeb/api/v1/"
past_original <- get_pxweb_data(
View finland-pension-contributions.R
library(pxweb)
library(dplyr)
library(ggplot2)
api <- "http://pxnet2.stat.fi/PXWeb/api/v1/"
pension_fees <- get_pxweb_data(
url=paste0(api, "en/StatFin/jul/vermak/102_vermak_tau_120.px"),
dims=list(Verolaji = c("D61111_TYO", "D61121_TYO"), Sektori = c("S13141"),
Tieto = c("Suhde1"), Vuosi = c("*")),
View finland-population-structure.R
library(pxweb)
library(dplyr)
library(stringr)
library(ggplot2)
library(animation)
api <- "http://pxnet2.stat.fi/PXWeb/api/v1/"
past_original <- get_pxweb_data(
url=paste0(api, "en/StatFin/vrm/vaerak/125_vaerak_tau_106.px"),