Getting Started

Quick Start

macOS

  1. If not already, install Homebrew
  2. Run brew install sbt
  3. Run sbt new s22s/raster-frames.g8

Linux

  1. Install sbt
  2. Run sbt new s22s/raster-frames.g8

Windows

  1. Install sbt
  2. Run sbt new s22s/raster-frames.g8

General Setup

RasterFrames is published via Maven Central.

To use RasterFrames, add the following library dependencies:

sbt
libraryDependencies += "io.astraea" %% "raster-frames" % "x.y.z"
Maven
<dependency>
  <groupId>io.astraea</groupId>
  <artifactId>raster-frames_2.11</artifactId>
  <version>x.y.z</version>
</dependency>
Gradle
dependencies {
  compile group: 'io.astraea', name: 'raster-frames_2.11', version: 'x.y.z'
}
sbt
libraryDependencies += "io.astraea" %% "raster-frames-datasource" % "x.y.z"
Maven
<dependency>
  <groupId>io.astraea</groupId>
  <artifactId>raster-frames-datasource_2.11</artifactId>
  <version>x.y.z</version>
</dependency>
Gradle
dependencies {
  compile group: 'io.astraea', name: 'raster-frames-datasource_2.11', version: 'x.y.z'
}

It assumes that SparkSQL 2.2.x is available in the runtime classpath. Here’s how to add it explicitly:

sbt
libraryDependencies += "org.apache.spark" % "spark-sql" % "2.2.0"
Maven
<dependency>
  <groupId>org.apache.spark</groupId>
  <artifactId>spark-sql</artifactId>
  <version>2.2.0</version>
</dependency>
Gradle
dependencies {
  compile group: 'org.apache.spark', name: 'spark-sql', version: '2.2.0'
}
Note

Most of the following examples are shown using the Spark DataFrames API. However, many could also be rewritten to use the Spark SQL API instead. We hope to add more examples in that form in the future.