I created a density map but R has chosen bin sizes that are too wide. I want to create my own bin sizes. https://i.stack.imgur.com/p49qc.jpg
The image shows bin sizes at a full integer and it does not produce anything meaningful. I also cannot get the Esri.WorldGrayCanvas base map to show up but that's less important.
library(tmap)
library(tmaptools)
library(leaflet)
library(tidyverse)
us_geo = read_shape("taxi_zones_sp.shp",as.sf = T,stringsAsFactors = F)
popmap = append_data(us_geo
,dropoffs
,key.shp = "Taxi_zone"
,key.data = "pu_taxi_zone")
#turn na's into zero.
popmap = popmap %>%
mutate_all(funs(replace(., is.na(.), 0)))
my_map =
tm_shape(popmap) +
tm_fill("perc", palette = "Oranges"
,title = "pickup density (%)", id = "Taxi_zone") +
tm_borders(alpha=.4)
leaflet() %>%
setView(lng = -74.058913, lat = 40.689852, zoom = 10) %>%
addProviderTiles("Esri.WorldGrayCanvas") + my_map
I would like to have 0 show up as white and the rest show up in .5 increments. and if possible, the Esri.WorldGrayCanvas to show up in my map. I also want to keep the map in a static format. So icons/controls like zooming and panning are not ideal.