We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if one of the values in the column is NA... no circles are rendered
good behaviour could be to have a na.rm type argument, if TRUE, dont render NA circles, if FALSE, NAs can be rendered as a separate category
The text was updated successfully, but these errors were encountered:
reproducible example:
library(mapgl) library(sf) library(dplyr)
nc <- st_read(system.file('shape/nc.shp', package = 'sf'))
numcolors <- 6 nc <- nc %>% mutate(zz = sample(letters[1:numcolors], nrow(.), replace = T)) magma_pal <- viridisLite::magma(numcolors) magma_substr_pal <- substr(magma_pal, 1, 7)
mapboxgl() %>% fit_bounds(nc, animate = F) %>% add_circle_layer( id = 'GC Zones', source = nc, circle_color = match_expr( column = 'zz', values = unique(nc$zz), stops = magma_substr_pal ) ) %>% add_legend( 'GC Zones', values = unique(nc$zz), colors = magma_substr_pal, type = 'categorical' )
nc$zz[1] <- NA numcolors <- 7 magma_pal <- viridisLite::magma(numcolors) magma_substr_pal <- substr(magma_pal, 1, 7)
Sorry, something went wrong.
No branches or pull requests
if one of the values in the column is NA... no circles are rendered
good behaviour could be to have a na.rm type argument, if TRUE, dont render NA circles, if FALSE, NAs can be rendered as a separate category
The text was updated successfully, but these errors were encountered: