This is a demonstration of how to create a combination town/county map from a shapefile using TopoJSON and d3.js.
It includes a simplified version of the code used for the Massachusetts special Senate election results on The Huffington Post.
Download a shapefile of Massachusetts towns from the state's GIS site:
wget http://wsgw.mass.gov/data/gispub/shape/census2000/towns/census2000towns_poly.exe