Learn R Programming

bioRad (version 0.4.0)

map: Map a plan position indicator (ppi)

Description

Plot a ppi on a Google Maps, OpenStreetMap, Stamen Maps or Naver Map base layer map using ggmap

Usage

map(x, ...)

# S3 method for ppi map(x, map, param, alpha = 0.7, xlim, ylim, zlim = c(-20, 20), ratio, radar_size = 3, radar_color = "red", n_color = 1000, radar.size = 3, radar.color = "red", n.color = 1000, ...)

Arguments

x

An object of class ppi.

...

Arguments passed to low level ggmap function.

map

The basemap to use, result of a call to download_basemap.

param

The scan parameter to plot.

alpha

Transparency of the data, value between 0 and 1.

xlim

Range of x values to plot (degrees longitude), as atomic vector of length 2.

ylim

Range of y values to plot (degrees latitude), as an atomic vector of length 2.

zlim

The range of values to plot.

ratio

Aspect ratio between x and y scale, by default \(1/cos(latitude radar * pi/180)\).

radar_size

Size of the symbol indicating the radar position.

radar_color

Color of the symbol indicating the radar position.

n_color

The number of colors (>=1) to be in the palette.

radar.size

Deprecated argument, use radar_size instead.

radar.color

Deprecated argument, use radar_color instead.

n.color

Deprecated argument, use n_color instead.

Value

A ggmap object (a classed raster object with a bounding box attribute).

Methods (by class)

  • ppi: plot a 'ppi' object on a map

Details

Available scan parameters for mapping can by printed to screen by summary(x). Commonly available parameters are:

"DBZH", "DBZ"

(Logged) reflectivity factor [dBZ]

"VRADH", "VRAD"

Radial velocity [m/s]. Radial velocities towards the radar are negative, while radial velocities away from the radar are positive

"RHOHV"

Correlation coefficient [unitless]. Correlation between vertically polarized and horizontally polarized reflectivity factor

"PHIDP"

Differential phase [degrees]

"ZDR"

(Logged) differential reflectivity [dB]

The scan parameters are named according to the OPERA data information model (ODIM), see Table 16 in the ODIM specification.

Examples

Run this code
# NOT RUN {
# load an example scan:
data(example_scan)
# make ppi's for all scan parameters in the scan
ppi <- project_as_ppi(example_scan)
# grab a basemap that matches the extent of the ppi:
# }
# NOT RUN {
basemap <- download_basemap(ppi)
# }
# NOT RUN {
# map the radial velocity scan parameter onto the basemap:
# }
# NOT RUN {
map(ppi, map = basemap, param = "VRADH")
# }
# NOT RUN {
# extend the plotting range of velocities, from -50 to 50 m/s:
# }
# NOT RUN {
map(ppi, map = basemap, param = "VRADH", zlim = c(-50, 50))
# }
# NOT RUN {
# give the data less transparency:
# }
# NOT RUN {
map(ppi, map = basemap, alpha = 0.9)
# }
# NOT RUN {
# change the appearance of the symbol indicating the radar location:
# }
# NOT RUN {
map(ppi, map = basemap, radar_size = 5, radar_color = "green")
# }
# NOT RUN {
# crop the map:
# }
# NOT RUN {
map(ppi, map = basemap, xlim = c(12.4, 13.2), ylim = c(56, 56.5))
# }

Run the code above in your browser using DataLab