How to Add Shape Files to the JMP 9 Maps Directory
Nov 30, 2010 9:50 AM
Many of you are already aware of the new powerful mapping capabilities in JMP 9 that enable you to visualize geographic-based data without having to provide any longitude/latitude or shape information. For example, I can open a data table in JMP that has two columns – the names (or abbreviations) of US states in one column, crime rate in another – and Graph Builder will draw a map of the US for me coloring the states by the value of crime rate.
This is possible because JMP 9 automatically comes with the shape (.shp) and database (.dbf) files for US states as well as many other geographic shapes such as countries, US counties and provinces of various European countries.
As a JMP Systems Engineer, I often demonstrate this new capability using the crime rate example above. Folks get excited and usually ask which other shapes they can map out. I am happy to tell them about the others that are provided and that they can also add their own shape files very easily to map out whatever shapes they want.
Unexpectedly, I had to prove this claim on a customer phone call recently! This customer was interested in the same mapping capability for US Metropolitan Statistical Areas (MSAs). As I was explaining how easy it would be to find the .shp/.dbf files and add them to the appropriate directory, one of the customers on the phone call found the correct files on the US Census website.
“Hey, Mike, I think I have the files right now, so why don’t you give it a shot?” the enthusiastic customer said. I think we were all amazed, myself included, at how simple this really was:
• I opened the .shp and .dbf files obtained from the Census website in JMP.
• I verified that Shape ID was the first column in the shp file and that it contained X and Y columns (which represent the longitude and latitude coordinates).
• I saved this .shp file to the Maps folder as “US-MSA-XY.jmp.”
• I created a Shape ID column in the .dbf file, which is a column that simply mimics the row number. A nice trick to do this easily: Visit Column Info in a new column and choose Initialize Data>Sequence Data. I moved this column to be the first one in the table.
• Then I assigned the Map Role column property to the name of the MSAs. This is how JMP knows to draw a map when the user provides the name. I right-clicked the CBSA column and chose Column Properties>Map Role and then chose Shape Name Definition from the ensuing drop-down box.
• I saved this dbf file to the Maps folder as “US-MSA-Name.jmp”
That’s it! I reopened the “Name” file I had just saved and dragged CBSA into the shape zone in Graph Builder to verify that the shape name was correctly identified by JMP. So, not 10 minutes after I mentioned it as a possibility, we were viewing an MSA-level map in Graph Builder. After much applause (in my head), these customers were visualizing their MSA data.
So Google “esri shape” and the name of the shape you are looking for, and start adding your own! And keep your eyes open for another blog post about using this method to analyze Afghanistan Province-level data.
The JMP directory that contains these files can be found at the following paths: