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.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 2113 views
  • 6 likes
  • 4 in conversation