Skip to content

Instantly share code, notes, and snippets.

View anhqle's full-sized avatar

Anh Le anhqle

View GitHub Profile
@anhqle
anhqle / subset.sql
Created November 13, 2013 00:11 — forked from andybega/subset.sql
CREATE TABLE afg_greg AS
SELECT *
FROM greg
WHERE ( ST_contains((SELECT the_geom FROM afg_adm0), geom) OR
ST_overlaps((SELECT the_geom FROM afg_adm0), geom) );
doInstall <- TRUE
toInstall <- c("twitteR", "dismo", "maps", "ggplot2")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
<<<<<<< HEAD
# make some change
=======
>>>>>>> 0f79b1430f148bded0527f9c67906de7c0667fce
# Truly the most ridiculous thing I could think of.
doInstall <- TRUE # Change to FALSE if you don't want packages installed.
toInstall <- c("XML", "png", "devtools", "RCurl")
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
# Some helper functions, lineFinder and makeTable
source_gist("818983")
source_gist("818986")