Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
shasheminassab
Level III

Aggregate GPS data by zipcode

I have a GPS dataset (lat/lon) and want to aggregate the data by zip code. In other words, I want to have a zip code map filled with the average of all data points that fall within each zip code boundary. How can I do that?

3 REPLIES 3
Highlighted
gzmorgan0
Super User

Re: Aggregate GPS data by zipcode

@shasheminassab ,

 

You would need to  dowmload a shape map that has the polygon boundaries (latitude and longitude) for the zip files and create define the the shape and name file.

 

Per the USPS, zipcodes are frequently changed for efficiency.  This link Discussion of 5 digit code zip file 

 

This is another discussion https://www.reddit.com/r/gis/comments/8xe8l4/why_are_there_no_public_exhaustive_zip_code/ 

 

I believe the TIGER ZCTA file that some use is very large.

 

This is teh link to JMP documentation on Shape Files

https://www.jmp.com/support/help/en/15.1/?os=win&source=application&utm_source=helpmenu&utm_medium=a... 

Highlighted
Craige_Hales
Staff (Retired)

Re: Aggregate GPS data by zipcode

See if this does what you need

Reverse Geocode Lat-Lon to Zip 

Craige
Highlighted
gzmorgan0
Super User

Re: Aggregate GPS data by zipcode

Thank you, Craig. Your script posted at the link worked great. 

 

I would likely never use zip code data unless I were restricting my graphs to a few counties, maybe a sparsely populated state.

 

This XY file I produced from your script has more detail than the US-County-XY.jmp file.  But your script, provides a solution to producing a file of more detailed county shapes.  

 

County Path has less detail 

image.png

Article Labels