api.congress.gov
api.congress.gov copied to clipboard
Member data for State and District is confusing
I created a gist to showcase the following issue: https://gist.github.com/tomburge/d5b5f238eb5b51c3d14f222e6a744040
In the example1.json, this endpoint was used /member/{stateCode}/{district}.
In the example2.json, this endpoint was used /member/{bioguideId}.
In example1.json the query was for TX district 15. This returned 5 records.
3 had district 15, 1 had district 34, and 1 had no district.
In the example2.json, the member has 4 terms of which 3 are for district 15 and the current one is district 34.
It would be better (and less confusing) to have the district attribute inside of each term instead of a base attribute.
This would help with members who switched districts and for members who were in the House but then in the Senate.