Description Usage Arguments Value Examples
View source: R/assign_colors_df.R
Bin bivariate ST data and assign colors
1 | assign_colors.df(data, bounds, palette = NULL)
|
data |
a data frame with the variables of interest in the first two columns. |
bounds |
How should the data be binned? Use custom bounds or those returned from st_findNbounds. |
palette |
A palette built using Vizumap::build_palette or st_build_palette. |
data with two extra columns: bothVars, a factor, and hex_code, the color corresponding to each data point.
1 2 3 4 5 6 7 8 9 | temps.DF = as.data.frame(tmax)
names(temps.DF)[3] = "tmax"
tmin.DF = as.data.frame(tmin)
temps.DF$tmin = tmin.DF$tmin.nc
temps.DF = temps.DF[,c(3,4,1,2)]
bounds = st_findNbounds(temps.DF)
temps.DF = assign_colors.df()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.