Desktop productivity for business analysts and programmers

Congressional data by address/zip

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Congressional data by address/zip

I have been tasked with identifying the US representative for a 3mm dataset of addresses and I am trying to find a databse that may help.  The closest that I have found is this website (http://www2.census.gov/geo/docs/maps-data/data/rel/zcta_cd111_rel_10.txt), but most zip codes have multiple district capabilities.  

 

Does anyone know how I could extract the data that a website like THIS uses? - https://www.govtrack.us/congress/members/map


Accepted Solutions
Solution
‎10-10-2016 11:45 AM
SAS Employee
Posts: 170

Re: Congressional data by address/zip

Do you want a ZIP Code/ZCTA file or a Congressional District?  They are different.  The Congressional District doesn't pay any attention to the ZIP Code so it may split a ZIP Code.  It seems you want a Congressional District.

 

I think this location has the boundary files for the Congressional Districts:

https://www.census.gov/geo/maps-data/data/cbf/cbf_cds.html

 

You can use Proc MAPIMPORT to read the SHP file (of the congressional district).

Then change your addresses to a Lat/Long with Proc GEOCODE.

If you are just mapping the locations, then use Proc GMAP with your congressional district map and Annotate the location points.

If you want to find out what congressional district that an address falls in, you can use Proc GINSIDE with the addresses and the congressional map and it will identify the congressional district that each location point falls into.

 

I hope that helps.

 

View solution in original post


All Replies
Grand Advisor
Posts: 17,294

Re: Congressional data by address/zip

Usually I would use QGIS for a project like this. 

 

You'll need to find the SHP file for the boundaries and then geocode your addresses -  Proc geocode. 

 

I'm not sure how you'll determine if an address is in a polygon though. 

Solution
‎10-10-2016 11:45 AM
SAS Employee
Posts: 170

Re: Congressional data by address/zip

Do you want a ZIP Code/ZCTA file or a Congressional District?  They are different.  The Congressional District doesn't pay any attention to the ZIP Code so it may split a ZIP Code.  It seems you want a Congressional District.

 

I think this location has the boundary files for the Congressional Districts:

https://www.census.gov/geo/maps-data/data/cbf/cbf_cds.html

 

You can use Proc MAPIMPORT to read the SHP file (of the congressional district).

Then change your addresses to a Lat/Long with Proc GEOCODE.

If you are just mapping the locations, then use Proc GMAP with your congressional district map and Annotate the location points.

If you want to find out what congressional district that an address falls in, you can use Proc GINSIDE with the addresses and the congressional map and it will identify the congressional district that each location point falls into.

 

I hope that helps.

 

Valued Guide
Posts: 2,111

Re: Congressional data by address/zip

Good luck.  North Carolina's congressional districts have been so gerrymandered that I would not be surprised if there were single addresses that are in two districts!

New Contributor
Posts: 3

Re: Congressional data by address/zip

Thank you Darrell, this code worked perfectly! Smiley Happy

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 349 views
  • 0 likes
  • 4 in conversation