| Features: |
STREET geocoding method
|
| Other features: |
|
| Data set: | SASHELP.GEOEXM (primary street lookup data set |
| Sample library member: | GEOSTRT |
data WORK.CUSTOMERS (label='Input data for street geocoding');
infile datalines dlm='#';
length address $ 32
city $ 24
state $ 2;
input address /* House number and street name */
zip /* Customer ZIP code (numeric) */
city /* City name */
state; /* Two-character postal code */
datalines;
555 Junk Street # 99999 # Beverly Hills # CA
305 Cross Lake Drive # 27526 # Fuquay-Varina # NC
2525 Banks Road # 27603 # Raleigh # NC
2222 SAS Campus Drive # 27513 # Cary # NC
1150 SE Maynard Rd. # 27511 # Cary # NC
2117 Graceland # 27606 # Raleigh # NC
1313 Mockingbird Lane # # Delray # CC
133 Jade Circle # 27545 # Knightdale # NC
1005 W South St # 27603 # Raleigh # NC
N Winds North Drive # 27591 # Wendell # NC
622 Roundabout Road # 27540 # Holly Springs # NC
Johnson Family Rd # 27526 # #
822 Water Plant Road # # Zebulon # NC
502 Possum Track Road # 27614 # # NC
2590 Wolfpack Lane # 27604 # Raleigh # NC
125 Ferris Wheel Ct # 27513 # Cary # NC
;
run;
proc geocode /* Invoke geocoding procedure */ method=STREET /* Specify geocoding method */ data=WORK.CUSTOMERS /* Input data set of addresses */ out=WORK.GEOCODED /* Output data set with X/Y values */ lookupstreet=SASHELP.GEOEXM /* Primary street lookup data set */ attributevar=(TRACTCE00); /* Assign Census Tract to locations */ run;
proc print data=WORK.GEOCODED noobs; var address m_addr m_zip m_obs _matched_ _status_ _notes_ _score_ x y tractce00; run; quit;
data WORK.CUSTOMERS (label='Input data for street geocoding');
infile datalines dlm='#';
length address $ 32
city $ 24
state $ 2;
input address /* House number and street name */
zip /* Customer ZIP code (numeric) */
city /* City name */
state; /* Two-character postal code */
datalines;
555 Junk Street # 99999 # Beverly Hills # CA
305 Cross Lake Drive # 27526 # Fuquay-Varina # NC
2525 Banks Road # 27603 # Raleigh # NC
2222 SAS Campus Drive # 27513 # Cary # NC
1150 SE Maynard Rd. # 27511 # Cary # NC
2117 Graceland # 27606 # Raleigh # NC
1313 Mockingbird Lane # # Delray # CC
133 Jade Circle # 27545 # Knightdale # NC
1005 W South St # 27603 # Raleigh # NC
N Winds North Drive # 27591 # Wendell # NC
622 Roundabout Road # 27540 # Holly Springs # NC
Johnson Family Rd # 27526 # #
822 Water Plant Road # # Zebulon # NC
502 Possum Track Road # 27614 # # NC
2590 Wolfpack Lane # 27604 # Raleigh # NC
125 Ferris Wheel Ct # 27513 # Cary # NC
;
run;proc geocode /* Invoke geocoding procedure */ method=STREET /* Specify geocoding method */ data=WORK.CUSTOMERS /* Input data set of addresses */ out=WORK.GEOCODED /* Output data set with X/Y values */ lookupstreet=SASHELP.GEOEXM /* Primary street lookup data set */ attributevar=(TRACTCE00); /* Assign Census Tract to locations */ run;