BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Akhila1
Fluorite | Level 6

I wish to know the school district for a given home address of a student. 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Census Bureau is better it seems, single file:

https://nces.ed.gov/programs/edge/Geographic/DistrictBoundaries

 

  1. Use PROC GEOCODE to map your addresses to lat/long
  2. Use PROC MAPIMPORT to import the boundary file
  3. Use PROC GINSIDE to determine which points from #1 belong to which regions in #2

 

If you have something like QGIS or ESRI ARCGIS this is more easily accomplished in those tools via point and click procedures except for Step #1. 

 

 

View solution in original post

6 REPLIES 6
ChrisHemedinger
Community Manager

You may be able to use SAS geocoding functions to convert an address to some other geo field (like a zip code or other region or lat/long), but you're going to need a database of school districts and their boundaries. Or sometimes the rules are more complex, and you need to use a web service (if available) to perform this lookup.

Become an Explorer! Join SAS Analytics Explorers to learn and complete challenges that earn rewards!
Reeza
Super User

You'll need to provide more details. 

 

Do you have a data set of school districts of some kind? Maps of those spatial area's in SHP files?

What country are you in?

Akhila1
Fluorite | Level 6
I am in USA. I do not have a data set of school districts.
Reeza
Super User

Are you looking at all of USA or a particular state or region?
States/ municipalities often publish this data on their open data portal. 

Example: https://catalog.data.gov/dataset/tiger-line-shapefile-2017-state-california-current-secondary-school...

 

 

Reeza
Super User

Census Bureau is better it seems, single file:

https://nces.ed.gov/programs/edge/Geographic/DistrictBoundaries

 

  1. Use PROC GEOCODE to map your addresses to lat/long
  2. Use PROC MAPIMPORT to import the boundary file
  3. Use PROC GINSIDE to determine which points from #1 belong to which regions in #2

 

If you have something like QGIS or ESRI ARCGIS this is more easily accomplished in those tools via point and click procedures except for Step #1. 

 

 

ballardw
Super User

A possible issue may be that your school does not actually belong to a school district. School Districts typically are Public schools and do not consider a Private school in there geography as belonging to the district.

 

I have worked with public/ private mixed school data. If this is for a single state I might also search the department of education, or whatever a specific state might call it, website. I know in my state I can get such information along with enrollment and other bits in a single file.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 3808 views
  • 6 likes
  • 4 in conversation