BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jerry898969
Pyrite | Level 9

I'm working on a geocode process where I have about 400 observations that are zip matches and no county code is returned. 

I used the sashelp.zipcode table to join on zipcode to get the county code.  I thought that would work but I have 2 rows where the county code from sashelp.zipcode doesn't match the latest shapefile for that state. 

 

I was using the county code to subset the shapefile data so running proc ginside wouldn't take as long.  I have to have the data be 100% correct. 

 

Is there a better way to get the correct county or a faster way to run proc ginside.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

And the source for your censub block data is what?

If it is the ZCTA stuff from teh census department there are many parts of the country where geography is not included as Zipcode tabulation areas aren't exhaustive, especially in areas with low population density.

 

You may want to check this page: https://www.census.gov/geo/reference/county-changes.html and compare with the date of your information. Some county values have have changed that aren't reflected in the shapefile or vice versa. See things like:

 

Oglala Lakota County, South Dakota (46-102)
Changed name and code from Shannon County (46-113) effective May 1, 2015.

 

View solution in original post

7 REPLIES 7
Reeza
Super User

Have you downloaded the latest map files from SAS Maps online? When you say geocoding are you using PROC GEOCODE?

jerry898969
Pyrite | Level 9

Reeza,

 

Yes I have the latest street maps from sas that I'm using with proc geocode.  I'm using the latest block shapefiles from the census website and using those with proc ginside to get the block and tract that come back missing from the geocode process.

 

Thank you

ballardw
Super User

You may want to check on the SAS site for an updated ZIPcode data set. However it is not uncommon for data entry to create Zip codes that do not actually exist. You might try a city/state match if you have that instead of Zip.

Reeza
Super User

Why are these zip codes not matching? Are they correct?

Is there an alternative zip code lookup in the US?

 

I'm in Canada and we get a release file with postal code and centroids from Canada Post every few months but it's out of date frequently. 

jerry898969
Pyrite | Level 9

It's the counties that are not matching.  I have the latest zipcode data.  I even copied to the sashelp directory so I have the latest one when doing proc geocode.

 

The issue is that the county from sashelp.zipcode doesn't match up with the data from the census block shapefile for that state.

 

 

ballardw
Super User

And the source for your censub block data is what?

If it is the ZCTA stuff from teh census department there are many parts of the country where geography is not included as Zipcode tabulation areas aren't exhaustive, especially in areas with low population density.

 

You may want to check this page: https://www.census.gov/geo/reference/county-changes.html and compare with the date of your information. Some county values have have changed that aren't reflected in the shapefile or vice versa. See things like:

 

Oglala Lakota County, South Dakota (46-102)
Changed name and code from Shannon County (46-113) effective May 1, 2015.

 

jerry898969
Pyrite | Level 9

ballardw,

 

The source is this site:

https://www.census.gov/geo/maps-data/data/tiger-line.html

 

I'm using the 2016 block data.

 

I'm going to have to dig deeper into the data and see if it is what you said just a change reflected on one side but not the other.

 

Thank you

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 7 replies
  • 1486 views
  • 0 likes
  • 3 in conversation