Contiguous USA

The USA as inferred from topology.

I converted Robert Sedgewick's topological map of the USA to a real map by running it through Graphviz.

Roger suggests that students would take to programming if they had interesting datasets for problems. I agree. webpage

I was surprised how well the picture came out. Graphviz just happened to orient north to the top of the page. It did find a different way to place the states of the far northeast. Everything else worked out well.

@lines = `cat contiguous-usa.txt`; open D, ">"; print D "graph US {\nnode [style=filled,color=yellow]"; for (@lines) {print D "$1 -- $2;\n" if /(\w\w) (\w\w)/} print D "}\n";