Skip to content
New issue

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

leaflet: update popup code when leafpop updates to include #269

Open
davidhodge931 opened this issue Sep 28, 2021 · 0 comments
Open

leaflet: update popup code when leafpop updates to include #269

davidhodge931 opened this issue Sep 28, 2021 · 0 comments

Comments

@davidhodge931
Copy link
Contributor

Currently like this:

if(is.null(popup_vars_vctr)){
    popup_data <- data %>%
      dplyr::relocate(.data$geometry, .after = tidyselect::last_col()) %>%
      janitor::clean_names(case = "sentence") 
  }
  else {
    popup_data <- data %>%
      dplyr::select(popup_vars_vctr) %>%
      dplyr::relocate(.data$geometry, .after = tidyselect::last_col()) %>%
      janitor::clean_names(case = "sentence") 
  }
  
  popup <- leafpop::popupTable(popup_data, zcol = 1:ncol(popup_data) - 1, row.numbers = FALSE, feature.id = FALSE)

Once leafpop is updated per r-spatial/leafpop#26 then modify code:

if(is.null(popup_vars_vctr)){
    popup_data <- data %>%
      janitor::clean_names(case = "sentence") 
  }
  else {
    popup_data <- data %>%
      dplyr::select(popup_vars_vctr) %>%
      janitor::clean_names(case = "sentence") 
  }
 
  popup <- leafpop::popupTable(popup_data, drop_geometry = TRUE, row.numbers = FALSE, feature.id = FALSE)

You will need to update DESCRIPTION to require the new minimum version of leafpop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant