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

'Breaks not unique' - viz_leaflet_an target function script #9

Open
danaj0495 opened this issue Nov 3, 2022 · 0 comments
Open

'Breaks not unique' - viz_leaflet_an target function script #9

danaj0495 opened this issue Nov 3, 2022 · 0 comments

Comments

@danaj0495
Copy link
Contributor

Error:

! Error running targets::tar_make()
  Target errors: targets::tar_meta(fields = error, complete_only = TRUE)
  Tips: https://books.ropensci.org/targets/debugging.html
  Last error: 'breaks' are not unique

Attributable number for some scenarios can be very small – colourQuantile in r script viz_leaflet_an cannot handle these small numbers, will have quantile cutoffs with same break numbers

Fix:

r script viz_leaflet_an.R
Changed:

  pal1 <- colorQuantile(
    palette = "RdYlBu",
    domain = sf_an$attributable, n = 5, reverse = TRUE
  )

To:

  pal1 <- colorNumeric(
    palette = "RdYlBu",
    domain = sf_an$attributable
  )

This creates a continuous palette instead of a categorical palette

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

No branches or pull requests

1 participant