I have four files that map populations to appropriate keys: statepop.csv, countypop.csv, zip3.csv, and zip5.csv. I'm using the TIGER/Lines shape files: tl_2009_12_state, tl_2009_12_county tl_2009_12_zcta3, and  tl_2009_12_zcta5. I have carefully followed a number of tutorials and can reproduce those, and can also produce scatter and bubble plots of my data (using long and lat coordinates to place the pch and bubbles).

What the tutorials (apparently) don't cover is how to key the data with the shape files to produce choropleth maps. My keys for states are like AK, AL, AR, etc., and my keys for the zip3 are like 902,303, 465, etc. The examples seem to use data that's part of the shape file (such as POPULATION), but my data is in separate files. How do I connect the ID in the shape files with the key in the data files?

As a related problem, states commonly use the same names for counties, such as Franklin County or Montgomery County. Is there an easy way to connect the counties with specific states (e.g., MD-Montgomery, AL-Montgomery), or should I handle this by sorting the data files by state and breaking them apart?

Thanks, CC.
	[[alternative HTML version deleted]]

