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.
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.
Have you downloaded the latest map files from SAS Maps online? When you say geocoding are you using PROC GEOCODE?
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
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.
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.
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.
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.
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
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.