Skip to content

Instantly share code, notes, and snippets.

@MirzaCengic
MirzaCengic / elevation_lines.R
Last active January 7, 2020 23:06
Elevation map in the style of Joy Division's Unknown Pleasures
# Elevation lines map for the #30DayMapChallenge
# Author: Mirza Čengić | [email protected]
pacman::p_load(Rahat, tidyverse, raster, topo.ridges)
raster_bih <- getData(name = "alt", country = "BA")
raster_bih_agg <- aggregate(raster_bih, fact = 5)
raster_bih_agg[is.na(raster_bih_agg)] <- 0
@Ryo-N7
Ryo-N7 / epl_goal_contribution_matrix_18-19.r
Last active April 1, 2021 14:19
Goal contribution matrix for Premier League 2018-2019
# pkgs
pacman::p_load(tidyverse, polite, scales, ggimage, ggforce,
rvest, glue, extrafont, ggrepel, magick)
loadfonts()
## add_logo function from Thomas Mock
add_logo <- function(plot_path, logo_path, logo_position, logo_scale = 10){
# Requires magick R Package https://github.com/ropensci/magick