The World Statistics Day celebration continues here in the Community. We all need reliable data for sound decision making. Do you have a data source that you trust most? Head over to Discussions to tell us about it.
Choose Language Hide Translation Bar
Level I

Formula issue with long / lat

Reaching out for help to overcome a formula issue. My ultimate aim is to have a bubble chart to track up to 2000 people going in and out of a few cities over time with a background map. Instead of entering long and lat data each time, I’d prefer to type in a city and have long and lat auto populate. I have “city” “long” and “lat” columns (numeric ddd geospatial) and created a formula along the lines of ...if(city=“city name” then = “26*E”. Unfortunately it doesn’t work and the formula changes the numeric geospatial “long” column from numeric to character.

1. Any suggestions on how to fix this error?

2. Suggestions on other ways to achieve an auto populated long lat lost by city?
Super User

Re: Formula issue with long / lat

The correct formula would be

if(city=“city name” then = 26);

This will result in a displayed value of 26° E

If the value is negative it will display as 26° W

Lattitude values work the same, with positive values being N and negative being S.

Lattitude and Logitude values are stored as numerics in JMP and typically displayed with a format that changes the displayed value, not the actual value.

Level VI

Re: Formula issue with long / lat

You might try this add-in:  I've had good success with it.

Article Labels

    There are no labels assigned to this post.