I am trying to create a heatmap with real estate objects, which shows where the objects with low and where the objects with high prices are located. However, the current heatmap only shows where the density of objects in general is the highest / lowest.
Thanks a lot!
Best, Nicole
ggmap(London) +
stat_density2d(aes(x = listing.longitude,
y = listing.latitude,
fill = ..level..,
alpha = ..level..),
size = 2,
bins = 4,
data = Properties_forsale,
geom = "polygon") +
scale_fill_gradient(low = "green",
high = "red") +
geom_tile(data = Properties_forsale,
aes(x = listing.longitude,
y = listing.latitude,
col = listing.price,
alpha = 0.5)
)