This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // ============================================================================= | |
| // emr.sc -- import it in predef.sc | |
| import ammonite.ops._ | |
| // add emr jars and config dir to interp class path | |
| // | |
| def loadEmrJars() = { | |
| // /etc/zeppelin/conf/zeppelin-env.sh | |
| val libDirs = List( // | |
| "/usr/lib/hadoop-lzo/lib", | |
| "/usr/lib/spark/jars", | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | library(maps) | |
| library(geosphere) | |
| library(plyr) | |
| library(ggplot2) | |
| library(sp) | |
| airports <- read.csv("http://www.stanford.edu/~cengel/cgi-bin/anthrospace/wp-content/uploads/2012/03/airports.csv", as.is=TRUE, header=TRUE) | |
| flights <- read.csv("http://www.stanford.edu/~cengel/cgi-bin/anthrospace/wp-content/uploads/2012/03/PEK-openflights-export-2012-03-19.csv", as.is=TRUE, header=TRUE) | |
| # aggregate nunber of flights |