70 likes | 285 Views
Raster and R. Building and Visualizing. What is Raster Data?. A rectangular grid containing pixels. Each pixel contains a value Value is represented by a color. Raster space-time plots. Raster Stacks & Bricks Multidimensional raster objects Multi-layer ( red,green,blue )
E N D
Raster and R Building and Visualizing
What is Raster Data? • A rectangular grid containing pixels. • Each pixel contains a value • Value is represented by a color.
Raster space-time plots • Raster Stacks & Bricks • Multidimensional raster objects • Multi-layer (red,green,blue) • Multi-dim (time series, multi variable) stack[row# ,col#, Z#] Y Z X
Raster space-time plots • Multi-dimentional Raster Stack • Good for time-series of rasters, or multivariate analysis Time Series stack[x,y, c(cwd2010) ] Y CWD 2010 By Month X
Setup Raster Stack Data grep() Helpful Functions dir() grep(‘a’, c( ‘a’, ‘b’, ‘c’, ‘a’ ) ) dir(‘your//Data//Location’) grep(‘c’, c( ‘tab’, ‘car’, ‘bat’ ) )
Create Raster Stacks and Assign Name Labels paste() names() names(rstack) = c(Jan’,’Feb’) Helpful Functions paste(c(‘Jan',‘Feb', ‘Mar‘...), sep=' ') Y Feb X Jan
Sources • Information for the Raster package from cran created by Robert Hijmans • RasterVis package Github created by OscarLamiguero. • And Mike Mann in Geography Department