Hello everyone,
Here is a section of code that I have:
mydata <- read.csv("data/svi2020.csv")
countypop$pop_2015[2044:2131] <- mydata$"AREA_SQMI"
plot_usmap(data = countypop, values = "pop_2015", include = c("OH"), color = "black") +
scale_fill_gradient(low = "white", high = "black",
name = "chosen_column") +
theme(legend.position = "right") +
labs(title = paste("input$datasetname", " [", sep = ""))
Here is that same code, in a Shiny App's server.R:
output$testmap <- renderPlot({
mydata <- read.csv("data/svi2020.csv")
countypop$pop_2015[2044:2131] <- mydata$"AREA_SQMI"
plot_usmap(data = countypop, values = "pop_2015", include = c("OH"), color = "black") +
scale_fill_gradient(low = "white", high = "black",
name = "chosen_column") +
theme(legend.position = "right") +
labs(title = paste("input$datasetname", " [", sep = ""))
})
The first outputs the following to the plot window (see attachment)
However, in the Shiny App, the labels (700,600,...) on the scale are not shown. Why might this be happening? Thanks!