Description Usage Arguments Value Examples
View source: R/st_bivariate_contour_map.r
Produce points and density contour map for bivariate data
1 |
data |
the data in long form, as returned from st_getAttributes or st_assign_colors. The first two columns should be the variables of interest. |
a ggplot
1 2 3 4 5 6 7 8 9 10 | library(stars)
# matched time to decadal time periods
time <- as.numeric(st_get_dimension_values(tmax, 2))
periods <- list(c(1950:1959), c(1960:1969), c(1970:1979), c(1980:1989),c(1990:1999))
decades <- lapply(periods, function(x, time) which(time %in% x), time)
# We wish to view data from 1990-1999
data = st_getAttributes(tmax[,,decades[[5]]], 1, tmin[,,decades[[5]]], 1)
colnames(data) = c("MaxTemp", "MinTemp")
st_bivariate_contour_map(data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.