Skip to content

Commit

Permalink
Merge pull request #6 from cesaraustralia/main
Browse files Browse the repository at this point in the history
Fixed colour palette
  • Loading branch information
alexsla authored Dec 18, 2023
2 parents eba0f17 + 1ded19d commit 77e4bfc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,17 @@ ui <- shinyUI(
server <- function(input, output, session){

map <- reactive({
aus_SA2 %>%
dplyr::filter(.data[[input$select_map]] >= quantile(.data[[input$select_map]], .env$input$select_quant_map)) %>%
aus_SA2_filt <- aus_SA2 %>%
dplyr::filter(.data[[input$select_map]] >= quantile(.data[[input$select_map]], .env$input$select_quant_map))

ncols <- max(round(length(unique(aus_SA2_filt %>% dplyr::pull(input$select_map)))/10, 0), 2)

aus_SA2_filt %>%
mapview(map.types = "Esri.WorldStreetMap",
layer.name = input$select_map,
zcol = input$select_map,
label = aus_SA2$SA2_NAME21,
col.regions = viridis::inferno(n = 100))
col.regions = viridis::inferno(n = ncols))
})

# the maps
Expand Down

0 comments on commit 77e4bfc

Please sign in to comment.