BookmarkSubscribeRSS Feed
Reeza
Super User

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. 

 

 

3 REPLIES 3
art297
Opal | Level 21

@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

Reeza
Super User

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. 

 

 

GraphGuy
Meteorite | Level 14

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

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 923 views
  • 0 likes
  • 3 in conversation