Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(rgdal)
- ldnwards <- readOGR("LDN_wards.shp", "LDN_wards")
- library(dplyr)
- le10cen11$CODE <- le10cen11$ward.code
- ldnwards@data <- left_join(le10cen11, ldnwards@data, by=c("CODE"), copy=TRUE)
- ldm_f <- fortify(ldnwards@data, region="CODE")
- ldm_f <- left_join(ldm_f, ldnwards@data)
- names(ldm_f) # i think the problem is revealed here, there are no variables here that allow ggplot to visualise i.e. that could be used as x= and y= arguments such as long/lat or 'Easting' and 'Northing'
- map <- ggplot(ldm_f, aes(fill = ldnwards$turnout) +
- geom_polygon() +
- coord_equal() +
- labs(x = "Easting (m)", y = "Northing (m)",
- fill = "ldm_f$turnout") +
- ggtitle("London Turnout by Ward")
- map
- Error: unexpected symbol in:
- "
- map"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement