Skip to content

Instantly share code, notes, and snippets.

View MauricioCely's full-sized avatar

Iván Mauricio Cely Toro MauricioCely

View GitHub Profile
@MauricioCely
MauricioCely / stacked_map.R
Created October 14, 2020 00:24
Creating a stacked map in R using ggplot2 and gganimate
library(tidyverse) # Easily Install and Load the 'Tidyverse'
library(ggnewscale) # Multiple Fill and Colour Scales in 'ggplot2'
library(gganimate) # A Grammar of Animated Graphics
library(hrbrthemes) # Additional Themes, Theme Components and Utilities for 'ggplot2'
library(rgdal) # Bindings for the 'Geospatial' Data Abstraction Library
library(pals) # Color Palettes, Colormaps, and Tools to Evaluate Them
library(transformr) # Polygon and Path Transformations
# Download Colombia Map ---------------------------------------------------
@MauricioCely
MauricioCely / scale_maps.R
Created January 11, 2021 14:27
Add scale bar and north indicator in map in GGPLOT
library("ggspatial")
library("rnaturalearth")
library("rnaturalearthdata")
world <- ne_countries(scale = "medium", returnclass = "sf")
########## Option 1 ##########
ggplot(data = world) +
geom_sf() +