Click here to see the SAS code.
Click here to see the example.

---------------------------------------------------------------

In the US, each of the 50 states is divided into regions called 'counties'.
It is often desireable to find all the counties bordering a given county.

This code finds the bordering counties by finding counties with at least
1 x/y point in common with the 'center' county.  To add a "fuzz factor",
I convert the numeric x/y coordinates to character, and only compare out
to a certain number of decimal places.

After finding the adjoining counties, I plot them on a US map, and then
just the counties-of-interest in a close-up map.

Back to Samples Index