Learn R Programming

prism (version 0.2.1)

pd_image: Quick spatial image of prism data

Description

pd_image() makes a spatial image plot of the specified prism data (single variable and time step.). It is meant for rapid visualization, but more detailed plots will require other methods.

prism_image() is the deprecated version of pd_image().

Usage

pd_image(pd, col = "heat")

prism_image(prismfile, col = "heat")

Value

Invisibly returns gg object of the image.

Arguments

pd, prismfile

the name of a single file to be plotted, this is most easily found through prism_archive_ls() or prism_archive_subset().

col

the color pattern to use. The default is heat, the other valid option is "redblue".

See Also

prism_archive_ls(), prism_archive_subset(), ggplot2::geom_raster()

Examples

Run this code
if (FALSE) {
get_prism_dailys(
  type = "tmean",
  minDate = "2013-06-01",
  maxDate = "2013-06-14",
  keepZip = FALSE
)

# get June 5th
pd <- prism_archive_subset("tmean", "daily", dates = "2013-06-05")

# and plot it
pd_image(pd)
}

Run the code above in your browser using DataLab