I want to produce a heat map where with a color pallet of green to red, but values of 0 are in white. I got started with geom_tile heatmap with different high fill colours based
You can use scale_fill_gradientn():
scale_fill_gradientn()
ggplot(df,aes(x = Var1,y = Var2, fill = z)) + geom_tile() + scale_fill_gradientn(colours = c("white", "green", "red"), values = c(0,0.1,1))