qmplot(lon, lat, data = crime)
qmplot(lon, lat, data = crime, colour = offense)
qmplot(lon, lat, data = crime, geom = c('point','density2d'))
qmplot(lon, lat, data = crime) + facet_wrap(~ offense)
qmplot(lon, lat, data = crime, fullpage = FALSE) + facet_wrap(~ offense)
qmplot(lon, lat, data = crime, fullpage = FALSE, colour = offense) +
facet_wrap(~ month)
qmplot(long, lat, xend = long + delta_long,
yend = lat + delta_lat, data = seals, geom = 'segment')
library(scales)
library(grid)
qmplot(lon, lat, data = wind, size = I(.5), alpha = I(.5))
# thin down data set...
s <- seq(1, 227, 8)
thinwind <- subset(wind,
lon %in% unique(wind$lon)[s] &
lat %in% unique(wind$lat)[s]
)
# for some reason adding arrows to the following plot bugs
qmplot(lon, lat, data = thinwind, geom = 'tile', fill = spd, alpha = spd) +
geom_leg(aes(xend = lon + delta_lon, yend = lat + delta_lat)) +
scale_fill_gradient2(low = 'green', mid = muted('green'), high = 'red') +
scale_alpha(range = c(.1, .75))
Run the code above in your browser using DataLab