Data visualization with SAS programming

SAS Proc GeoCode - Street, ZIP/Postal, City

Reply
Grand Advisor
Posts: 16,316

SAS Proc GeoCode - Street, ZIP/Postal, City

I'm using PROC GEOCODE to geocode Canadian addresses.

 

I was wondering if there was an easy way to combine the ZIP and STREET methods that I'm missing.

 

I'd like the order of geocoding to go:

1. Street Level

2. ZIP/Postal Code

3. City/State

 

Is this possible? I'm on SAS 9.4 TS1M3 and have SAS/GRAPH licensed, using the October 2016 NRN files and I have a custom purchased PostalCode lookup table from Canada Post - but not one from a resource listed on SAS maps online website. 

 

I don't see somewhere that explains how I should format this dataset to work with PROC GEOCODE - I can probably look at a sample and deduce it, but was wondering if it was documented somewhere. 

 

 

Esteemed Advisor
Posts: 6,883

Re: SAS Proc GeoCode - Street, ZIP/Postal, City

@Reeza: I've never used street level geocoding, other than for US addresses, but one can easily add the postal code info to sashelp.zipcode file and all of the zip related functions will work perfectly with it. Since Canadian postal codes are basically street level anyway (as long as one has obtained co-ordinates at that level), the only thing gained with street level info is ease of access.

 

While the documentation, as I recall, calls for numeric zipcodes, it works perfectly (as is) with character postal codes once they're added.

 

Art, CEO, AnalystFinder.com

Grand Advisor
Posts: 16,316

Re: SAS Proc GeoCode - Street, ZIP/Postal, City

Hi Art,

Thanks for the suggestion. 

 

Unfortunately, postal codes aren't good in rural areas, and that matters a lot for some of the things we do. Especially with the stopping of door to door delivery and those centralized boxes. The boxes end up being the postal code location. For several projects that look at school boundaries or boundaries for health care services, being as accurate as possible is important for modelling. We can use ArcGIS to do some of this, but I was trying to avoid the cost (>$1K) and pushing the data to the cloud has it's own security issues. 

 

It's not hard to add in, it's a merge after the GEOCODE process, and then re-assign if it's City/State match, I was just hoping there was a way to set that automatically. It seems natural order in heirarchy of geocoding to me, at least in Canada. 

 

 

SAS Employee
Posts: 963

Re: SAS Proc GeoCode - Street, ZIP/Postal, City

I think you'll have to run proc geocode multiple times, and then merge the results (picking the lat/long that you want).

 

Post a Question
Discussion Stats
  • 3 replies
  • 83 views
  • 0 likes
  • 3 in conversation