Skip to content

Instantly share code, notes, and snippets.

Sarah popovs

  • Sea Around Us
  • Vancouver, BC
Block or report user

Report or block popovs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View World map Robinson projection - ggplot.R
# ======================================================================================
# Create a simple world map in Robinson projection with labeled graticules using ggplot
# ======================================================================================
# Set a working directory with setwd() or work with an RStudio project
# __________ Set libraries
library(rgdal) # for spTransform() & project()
library(ggplot2) # for ggplot()
popovs / snippets.R
Created Feb 1, 2018 — forked from mbacou/snippets.R
Working with attributes inside SpatialPolygonsDataFrame objects
View snippets.R
## Example procedure for working with data (attributes) inside SpatialPolygonsDataFrame objects
# Load my favorite libraries for that sort of work
# Load 2 shapefiles that, say, we want to merge.
# Note that you can read pretty much any spatial format using readOGR().
tza.l2 <- readOGR("./analysis/TZA-AC-07/maps", "tza-ac-07_L2")
tza.l1 <- readOGR("./analysis/TZA-AC-07/maps", "tza-ac-07_L1")
You can’t perform that action at this time.