Subscribe Bookmark RSS Feed

Adding locations to geographic map

3bbevans

Community Member

Joined:

Jan 10, 2012

I was wondering if it's possible to add specific locations (like schools or libraries or stores) to a map in JMP?

This example is similar to what I'm trying to accomplish in JMP so that I can analyze and map the data all in the same program.

1388_location overlay example 2.jpg

So far, I've been able to create several shapefiles (zip code, MSA, major roads, etc.) and map demographic information by zip/state/county/etc.

I would like to be able to overlay specific locations on the map and also color code these locations by specific data fields (such as # of students, book count, sales).

Would I just create shapefiles using the same method (an -XY file and a -Name file), is there another method, or am I out of luck?

1 REPLY
XanGregg

Staff

Joined:

Jun 23, 2011

You can get boundaries to show in the background of any map by putting them in your user maps dir and using Background Map on the graph.

If you want the areas colored, you can combine Shape and Points in Graph Builder if the coordinates are the same (lon/lat for built-in maps), though unfornately there's not yet a way for the color variable to apply to one but not the other.

dt = Open("$SAMPLE_DATA/Cities.jmp");

// cities has a projected X/Y instead of lon/lat; here is a simple approximation

dt << New Column("lon", Formula(-97 + 80 * :x));

dt << New Column("lat", Formula(36 + 55 * :y));

gb = dt << Graph Builder(

          Variables( X( :lon ), Y( :lat ), Color( :Name( "pop- m" ) ), Shape( :State ) ),

          Elements(

                    Map Shapes(

                              Legend( 2 ),

                              Summary Statistic( "Mean" ),

                              Show Missing Shapes( 1 )

                    ),

                    Points( X, Y, Legend( 3 ) )

          )

);