geoSR: Plot Squares in Different Colors

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/geoSR.R

Description

Plot Icelandic statistical squares in different colors, based on specified levels.

Usage

1
geoSR(sr, z, levels, grid = FALSE, ...)

Arguments

sr

squares or subsquares.

z

values for each square.

levels

threshold levels for splitting the values into categories.

grid

passed to geoplot.

...

passed to geoplot.

Details

If levels is a named vector, the names are used as level-specific colors, ignoring the last element.

The levels should go lower and higher than the range of z values.

Value

Invisible NULL.

Note

Convenience wrapper for the reitaplott function.

The 3-digit Icelandic statistical squares are 0.5 degrees latitude and 1 degree longitude, defined in the range 60–70<c2><b0>N and 0–50<c2><b0>W.

The bottom-left corner of square 0 is at 60<c2><b0>N 0<c2><b0>. From there, the numbering system is best explained with a table:

49<c2><b0>W 48<c2><b0>W ... 1<c2><b0>W 0<c2><b0>W
69.5<c2><b0>N 999 998 ... 951 950
69.0<c2><b0>N 949 948 ... 901 900
... ... ... ... ... ...
60.5<c2><b0>N 099 098 ... 051 050
60.0<c2><b0>N 049 048 ... 001 000

The 4-digit subsquares divide each square into quadrants (NW, NE, SW, SE), appending a number to indicate the quadrant:

***1 ***2
***3 ***4

Author(s)

Arni Magnusson.

See Also

geoplot and reitaplott are the underlying drawing functions.

colorRampPalette can be used to create a ramp of level-specific colors.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Use existing palette
geoSR(561:560, c(0.3,3), levels=c(0,1,10))

# Pass colors along with levels
lev <- c(0, 1, 10)
names(lev) <- c("brown", "orange", NA)
geoSR(561:560, c(0.3,3), lev)

# Subsquares
geoSR(5611:5612, c(0.3,3), lev)

# Color ramp
z <- (0:10) / 10
lev <- (0:10) / 10
ramp <- colorRampPalette(c("khaki1","gold","orange","darkorange2","red",
                           "darkred","black"))
names(lev) <- ramp(length(lev))
geoSR(724:715, z, lev)

Example output

Loading required package: maps
Loading required package: mapdata

geo documentation built on May 29, 2017, 5:36 p.m.