Skip to content

Instantly share code, notes, and snippets.

@addiversitas
Created October 24, 2020 15:20
Show Gist options
  • Save addiversitas/d08d86c8f1012be7ee85dc4eb260b79a to your computer and use it in GitHub Desktop.
Save addiversitas/d08d86c8f1012be7ee85dc4eb260b79a to your computer and use it in GitHub Desktop.
loading the world borders data set
library(rgdal)
#you only have to do this once!
download.file("http://thematicmapping.org/downloads/TM_WORLD_BORDERS_SIMPL-0.3.zip" , destfile="world_shape_file.zip")
system("unzip world_shape_file.zip")
#loading the world borders spatial polygons data frame
world_spdf <- readOGR(
dsn= getwd() ,
layer="TM_WORLD_BORDERS_SIMPL-0.3",
verbose=FALSE
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment