Birisi bana emlak veri setine (https://docs.google.com/spreadsheets/d/1g_awI6hnD80IVeZDOWpvU_NHdHxsk_Uyo8HML9p-yHo/edit#gid=0) göre çokgen bir harita oluşturmama yardımcı olabilir mi? Farklı emlak fiyatlarını temsil eden farklı renkler ile Sacramento bölgesel bir harita almak istiyorum.R (uzaysal veri) Çokgen Haritaları
Aşağıda sağladığım kod, örnek bir çokgen R koduyla geldi. "Birleştirme" işlevinin poligon haritalarında nasıl çalıştığını anlayamıyorum.
,#load libraries
library(ggmap)
library(ggplot2)
library(gpclib)
library(rgeos)
getClass("Polygon")
getClass("SpatialPolygons")
realestate.f <- fortify(realestate, region = "zip")
realestate.f <- merge(realestate.f, realestate, by.x = "longitude", by.y = "latitude")
head(realestate.f)
Map <- ggplot(realestate.f, aes(longitude, latitude, price)) +
geom_polygon() + coord_equal() +
labs(x = "longitude", y = "latitude", "price") +
ggtitle("Sacramento Real Estate Prices")
Map + scale_fill_gradient(low = "white", high = "black")`