BookmarkSubscribe
Choose Language Hide Translation Bar
XanGregg
Staff

Geocoding Place Names

Helps convert places names to longitude/latitude coordinates.

This add-in will go through a specified data table and check user-specified columns for location names or addresses. It will then check these places against internal data tables installed with the add-in or the online services of OpenStreetMaps.org. For example: say that you have a data table with American cities paired with some numerical data, and you want to view this information on a map with JMP. You can use this add-in to find latitude and longitude coordinates for each of the different cities, and then creating your map is rather easy.

Author: intern David Spruill

Updated April 4, 2016 with extra error check and reduced data base size.

Related blog post: A JMP add-in to geocode your geographic data - JMP Blog

Comments
markschahl

Awesome! Saved me a bunch of time. I was about to do this in Excel, when I asked myself "I wonder if there is JSL for this at the user community?"

NickN

Hello,

I'm having a little trouble with the geocoder add-in.  Is it expecting a certain format for the input text?  I have some addresses with unit/apt numbers, would this create a problem.

Thanks for posting this add-in.

 

BSwid

Hello,

Is anyone else having an issue with Georgia?  It found the country not the state.  I'm especially surprised because I set the search to custom and selected just USA and Canada.

 

JMP_WrongGeorgia.JPG 


PaulJones

Has anyone been able to reverse geocode in JMP by inputting latitude and longitude coordinates and outputting the country?

ih

@PaulJones, this is a scripting solution but maybe it will get you started.  I just noticed I did City/State in the USA but you can expand this to Country using the other table (JMP Geocoder - World Geodatabase.jmp) in the same Add-In folder.

 

//Open the table in the JMP Geocoder
dt = Open("$ADDIN_HOME(com.jmp.jmpgeocoder)\JMP Geocoder - US Geodatabase Ordered.jmp");
			    
//Build table for KNN
mat = (dt:Latitude << getvalues) || (dt:Longitude << getvalues);
kdt = KDTable( mat );

//Find the the nearest row for new data and print the result
{rows, dist} = kdt << K nearest rows(1,[35.824548, -78.757867])
row = rows[1]
"Zip Code: " || char(dt:Zip Code[row]) || " in " || dt:Zip Name[row] || ", " || dt:State[row] || ", from row: " || char(row)
Article Tags