Subscribe Bookmark RSS Feed

Create Latitude Longitude overlay on a US map with Interstates in JMP

leeklammer

Community Trekker

Joined:

May 31, 2013

I am trying to create a data visualization in JMP of the location of customers; and despite several hours of research using Google, I haven't been able to find good directions. 


Here is what I want my map to contain:

-each plot point should be the a Latitude Longitude intersection
-the points should be plotted on a US map that shows interstates

-the size of each plot point should be determined by the variable 'total_visits'

-the color of each plot point should be determined by the variable ' primary_store'

-the map view should only show Atlanta, GA, and the surrounding area


I am using JMP 9.0.2 I have installed the WMS Explorer add-in from this location: http://www.jmp.com/software/add-ins.shtml?utm_source=jmp9&utm_medium=software

I have found a WMS server that should give me a map with Interstates: http://mapmatters.org/wms/648249  

WMS URL: http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/wwa


This is where I'm stuck.  I can't get my points to plot using Lat, Long; I can't get the map with interstates to show up. Does anyone know how to do this or know of a good tutorials?


Thanks,

-Lee

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Your background specification looks almost correct. One thing I noticed is that the layer name starts with capital letters,  'US', instead of 'us'. I tried using 'US' and the roads did not appear however they did appear when I changed it to 'us'. So I would be careful of capitalization as well as leading and trailing blank spaces.

The other issue I see is that you might be zoomed in too close to use the us_interstates layer. I created a graph with the axes as your image shows and I noticed the interstates disappeared. If I zoomed out, then the interstates reappeared. As I mentioned in my earlier response, a layer is defined to be visible only within a specified zoom range. That range is defined by the data used to generate the map. So as a user, you have no control over that. If us_interstates only appears when you are zoomed out too far, then try using major_roads. That layer appears when you are zoomed in closer.

Here is the graph using major_roads as the layer.

4453_AtlantaRoads.jpg

Let me know how it goes. You are so close!

10 REPLIES
JohnPonte

Staff

Joined:

Jun 17, 2013

Hi Lee,

In JMP you could use either Graph Builder or Bubble Plot to get what you are after. I assume your data has the lat / lon values. Use longitude as the x axis and latitude as the y axis, use total_visits as the size variable and use primary_store as the color variable.

To get a map you can set the background map option, which can be found by doing a right-mouse-click over the graph and select the background map dialog. The last option for image based maps is the Web Map Service. Enter the url you mentioned in the URL field, then enter us_interstates in the field called Layer. For the WMS server, you must enter a URL for the server and a layer name for the desired layer. Based on the picture you attached to this thread, it looks like you want to use the us_interstates layer.

Here is a link to a blog post I did about using the WMS background map option:

http://blogs.sas.com/content/jmp/2010/11/09/all-about-background-maps-in-jmp-9-nasa-server-and-web-m...

BTW - I see you are using the WMS Explorer add-in. That add-in was designed to help you discover what the layers are for a particular WMS server. But layers aren't always visible at all zoom levels. So you may have to zoom in on the US before the us_interstates layer will become visible. That is dictated by the WMS server, not by the add-in. Try zooming in to see the interstates appear.

4433_AtlantaInterstates.jpg

Here is a link to a blog post I did about using the WMS Explorer:

http://blogs.sas.com/content/jmp/2010/11/22/all-about-background-maps-in-jmp-9-wms-explorer-add-in/

One last note of interest. In version 11 of JMP, just released last month, we now include another option for background maps called Street Map Service. Like the Web Map Service it uses a server to produce a map. But the Street Map Service uses a server provided by JMP. You don't have to know the URL or a layer name. The Street Map Service will produce a map with the appropriate amount of detail based on your zoom level. That will include all of the us interstates, once you zoom in on the US.

Here is what it looks like in version 11 with the Street Map Service:

4434_AtlantaInterstates2.jpg

I hope this helps. If you have any further questions please feel free to ask.

John Ponte

leeklammer

Community Trekker

Joined:

May 31, 2013

Hi John,

Thank you very much for your comprehensive response! The bubble plot was exactly what I was looking for, but I'm still having trouble getting the interstates to show up on my map.

4452_Capture2.PNG

Do my background map specification I'm using look correct?  If so, is it possible I'm missing some JMP element?

4451_Capture.PNG

Solution

Your background specification looks almost correct. One thing I noticed is that the layer name starts with capital letters,  'US', instead of 'us'. I tried using 'US' and the roads did not appear however they did appear when I changed it to 'us'. So I would be careful of capitalization as well as leading and trailing blank spaces.

The other issue I see is that you might be zoomed in too close to use the us_interstates layer. I created a graph with the axes as your image shows and I noticed the interstates disappeared. If I zoomed out, then the interstates reappeared. As I mentioned in my earlier response, a layer is defined to be visible only within a specified zoom range. That range is defined by the data used to generate the map. So as a user, you have no control over that. If us_interstates only appears when you are zoomed out too far, then try using major_roads. That layer appears when you are zoomed in closer.

Here is the graph using major_roads as the layer.

4453_AtlantaRoads.jpg

Let me know how it goes. You are so close!

leeklammer

Community Trekker

Joined:

May 31, 2013

major_roads got me the map I was going for; thank you very much for your help!

leeklammer

Community Trekker

Joined:

May 31, 2013

Hi John,

I have a couple follow-up question.  I saved my map as an .SWF file, and I'm having three problems when viewing the .HTM file

1. The background major_roads and US Counties do not show up [see figure1]

2. One of my store names shows up as 'Other' rather than the actual name [see figure1]

3. When I deselect 'All' there are still a few random datapoints (checked the data, and all should have a listed Prime_Store) [see figure2]

Any ideas on these issues?

Figure1

4461_nomap.PNG

Figure2

4462_NoStore.PNG

Thanks,

-Lee

leeklammer

Community Trekker

Joined:

May 31, 2013

Also, the ability to embed in a PowerPoint presentation would be cool as well.

JohnPonte

Staff

Joined:

Jun 17, 2013

As for embedding in PowerPoint - we've heard that from others as well. JMP is headed in a different direction. We are now focusing on writting output to HTML5. This allows users to share their output with non-JMP users in a variety of ways. All someone would need is a browser. Or, you could embed your output as HTML5 into PowerPoint. The HTML5  output would also be viewable on devices that don't support flash. JMP version 11 includes a limited release of this functionality.

leeklammer

Community Trekker

Joined:

May 31, 2013

Hi John,

We have since upgraded to JMP 11, and I was able to output my map with major roads and US counties as a SWF file.  However, I just noticed that the map looks different in JMP than when I open the SWF file.

In the example below, you can see the big green dot lies on a county line in the JMP view, but relatively east and south in the SWF view.

4568_jmpvsswfmap.jpg

I have seen the same with some US maps I'm working on where the data gets 'stretched' horizontally such that California markers are in the Pacific and east coast markers in the Atlantic.

Any idea what could cause that or how to fix it?

Thanks,

-Lee

JohnPonte

Staff

Joined:

Jun 17, 2013

Hi Lee,

There is an issue when saving to SWF where the map gets shifted. The data is in the correct place but the map isn't, giving the result that you see. That issue is fixed in JMP 11.1, which will be available as a web update in January or full release in February 2014. I don't believe there is a workaround in the meantime.

John