Skip to content

Instantly share code, notes, and snippets.

View ilarischeinin's full-sized avatar

Ilari Scheinin ilarischeinin

View GitHub Profile
@ilarischeinin
ilarischeinin / snow.R
Created November 30, 2017 17:51
Plot snow depths for Helsinki winters
# 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 September 3, 2020 15:11
Ranking NHL’s best shooters with Bayesian multilevel modeling - https://ilari.scheinin.fi/ranking-nhls-best-shooters/
# 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
# 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
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(
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("*")),
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"),