This is a dot density viz fo human population. Each dot represents 200 people. This was create by taking the total population counts for each census tract (similar to counties just some counties are split up). Each dot is then randomly plotted in its respective census area. Turns out giving an interesting visualization though a bit missleading to the shape of the popualted areas.

library(plyr)
library(maptools)
## Loading required package: sp
## Checking rgeos availability: TRUE
## 
## Attaching package: 'maptools'
## The following object is masked from 'package:sp':
## 
##     nowrapSpatialLines
# Virginia population data
virpop <- read.csv("data/ACS_14_5YR_B01003_with_ann.csv", stringsAsFactors=FALSE)
virpop <- virpop[-1,]
virpop <- rename(virpop, c("GEO.id"= "geoid","GEO.id2"="geoid2", "GEO.display.label"="geoname", "HD01_VD01"="totalpop", "HD02_VD01"="maroferror"))

virpop.sub <- virpop[,c(2,4)]
virpop.sub$totalpop <- as.numeric(virpop.sub$totalpop)


# Virginia shapefile for Census tracts
vir.shp <- readShapePoly("data/cb_2015_51_tract_500k/cb_2015_51_tract_500k.shp", proj4string=CRS("+proj=longlat"))
virpolys <- SpatialPolygonsDataFrame(vir.shp, data=as(vir.shp, "data.frame"))


virdata <- merge(virpolys@data, virpop.sub, by.x="GEOID", by.y="geoid2", sort=FALSE)
virvar <- virdata$totalpop/200

par(mar=c(0,0,0,0))
virdots.rand <- dotsInPolys(virpolys, as.integer(virvar), f="random")


plot(virpolys, lwd=0.1)
plot(virdots.rand, add=TRUE, pch=19, cex=0.1, col="#00880030")