Which congressional district, and who represented it, on that day?
Districts are redrawn after each census and, in some states, between them. A list of supporters, a survey or past mail needs the district of its own date, not today's. This adds the district of the day you name and the member who held the seat that day.
New Pro Places and zones Command line Public sector Research
What you have
A CSV of United States addresses, the country file of the United States and the folder of Pro layers with the districts of each Congress and the table of members:
id,address S-1,"100 N Tryon St, Charlotte, NC 28202" S-2,"600 Grant St, Pittsburgh, PA 15219" S-3,"350 Fifth Avenue, New York, NY 10118"
Steps
1. The districts and members of 1 June 2018:
$ gridpin-pro batch usa.bin supporters.csv y2018.csv --layers layers/layers.json --append regions:cd --as-of 2018-06-01 --table layers/us/us_house_members.table.json regions:cd on 2018-06-01: cd115 (TIGER2017/CD, 2017-01-03..2019-01-03) us_house_members: 3 rows: matched 3, key_absent 0, no_key 0, suppressed 0, out_of_dates 0 key basis: point 3 congress-legislators, terms since 2011-01-03, unitedstates/congress-legislators; licence: CC0 1.0 note: a district code names the district of the Congress sitting on --as-of; a day without a member is a vacancy 3 rows
2. The same addresses on 1 June 2024:
$ gridpin-pro batch usa.bin supporters.csv y2024.csv --layers layers/layers.json --append regions:cd --as-of 2024-06-01 --table layers/us/us_house_members.table.json regions:cd on 2024-06-01: cd118 (TIGER2023/CD, 2023-01-03..2025-01-03) us_house_members: 3 rows: matched 3, key_absent 0, no_key 0, suppressed 0, out_of_dates 0 key basis: point 3 congress-legislators, terms since 2011-01-03, unitedstates/congress-legislators; licence: CC0 1.0 note: a district code names the district of the Congress sitting on --as-of; a day without a member is a vacancy 3 rows
3. Read both:
$ cat y2018.csv
What you get
id | gp_cd | gp_rep_name | gp_rep_party |
|---|---|---|---|
| S-1 | 3712 | Alma S. Adams | Democrat |
| S-2 | 4214 | Michael F. Doyle | Democrat |
| S-3 | 3612 | Carolyn B. Maloney | Democrat |
id | gp_cd | gp_rep_name | gp_rep_term_last_day |
|---|---|---|---|
| S-1 | 3714 | Jeff Jackson | 2024-12-31 |
| S-2 | 4212 | Summer L. Lee | 2025-01-02 |
| S-3 | 3612 | Jerrold Nadler | 2025-01-02 |
Pittsburgh moved from the 14th to the 12th district of Pennsylvania with the 2022 map; a member who left early has the last day of the seat, not of the Congress.
Why it works
Each Congress has its own layer with the days it sits, from 3 January; --as-of picks the one that holds the day, and the table of members (congress-legislators, CC0) is read by the district and the same day. Checked against the Census Bureau geocoder on 300 houses: all agree.
Limits
- The Bureau published no file of its own for the 117th Congress (2021–2023): a day in that window gets no district, and the answer says so.
- Without
--as-ofthe command refuses: the answer must not depend on the day it runs. - House only; state legislative districts are not in the layers yet.
The function: batch --append regions:cd --as-of. All its keys: command reference. Part of gridpin-pro, which comes with a Starter or Pro subscription: Free, Starter and Pro.