I'm using D3 to create sets of polygons and I'd like to be able to outline the sets. For instance, if you have a set of path elements, such as all the states of Mexico, Canada, and the United States, and you wanted to procedurally draw a border around the path elements that share the same attribute (such as their ccode) is there an established way to do this?
Obviously, I could overlay a national path, but what I want to do is be able to draw these borders dynamically based on different attributes on-the-fly, and I'm using the geo example because I think it's the most comprehensible.