community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Zip Radius calculation error

Highlighted
Asteroid

Hello team, 

Am building a macro to dynamically pick zips that can output zips that are under a provided radius. Unfortunately I see the spatial tool provides incorrect data. based on my understanding after reading a couple of articles I get the below output. Need some thought on where am missing the logic. 

 

Ex: am looking for zip 21062 which provides 6 zip that do not match. Here I try validating against 21123 which is actually ~6 miles from this zip. Am I missing infering the wrong column or there is an issue with inputs?

 

Source file: https://public.opendatasoft.com/explore/dataset/us-zip-code-latitude-and-longitude/export/

validated with: https://www.zip-codes.com/distance_calculator.asp?zip1=21062&zip2=21123&submit=Calculate

 

Looking forward for inputs and suggestion. 

zip_trade_2Miles.PNGzip

Alteryx
Alteryx

@Raghu_s Are you able to share the workflow with a sample dataset?

Digan
Alteryx
Nebula
Nebula

Hi @Raghu_s 

 

I don't think there's any thing wrong with your process.  The source data in the .csv from public.opendatasoft.com  seems to be incorrect.

 

ZipCityStateLatitudeLongitude
21411AnnapolisMD38.9742-76.5949
21412AnnapolisMD38.9742-76.5949
21123PasadenaMD38.9742-76.5949
21404AnnapolisMD38.9742-76.5949
21062Glen BurnieMD38.9742-76.5949
21098HanoverMD38.9742-76.5949

 

These 6 ZIP codes map to the same Lat/Long, which doesn't seem to be correct at all  (From zip-codes.com)

 

21062: GLEN BURNIE, MD U.S.

Longitude: -76.625000
Latitude: 39.162600 
Population: 0 
Household Income: $0

ZIP Code 21062 ZIP Codes near 21062

21123: PASADENA, MD U.S.

Longitude: -76.512300
Latitude: 39.125900 
Population: 0 
Household Income: $0

 

Доверяй, но проверяй (Trust, but verify)

 

Dan

Asteroid

@DiganP  here you go. The files used were got from at above mentioned portal. 

 

 

Asteroid

@danilang   can you help me build a simple zip database with data available online? am not able to get a proper data file from either US census data share or US postal service. any thoughts? 

Nebula
Nebula

Hi @Raghu_s 

 

I can't provide any recommendations other than to search the web and try find a source that is used by other sources. 

 

I can help with your existing dataset, though.  The attached workflow returns a list of the Zip codes that have have the same lat/lon as another one.  There's 5,600 out of 46,000.  You can use this to filter out those.  

 

Of course there's no guarantee that the lat/lon data is correct for the other zip codes, just that it's unique.

 

Dan

Labels