Is it possible to retrieve and isolate individual representatives?

46 views
Skip to first unread message

Dean Guag

unread,
Jan 16, 2024, 10:29:17 AMJan 16
to Google Civic Information API
Hello,
I am working on an app that I want to separate local, state, fed representatives. 
I need help trying to separate say the elections supervisors or sheriffs for each county.  
is this possible?  How is USA.gov separating them correctly?

In the API there are US representatives in the local area and the US Senators in the state area instead of all of them being in the federal\US country areas. 

Apologies, I am new at this and the verbiage probably isn't correct. I hope the point is there.

Thank you so much,
Dean 

Kas Stohr

unread,
Jan 17, 2024, 7:27:50 PMJan 17
to Google Civic Information API
Dean, 

Answering your question in two parts. 

First, in terms of separating elections supervisors or sheriffs for each county, that can be a bit tough. There is no standard way of handling "regional" roles. It differs state to state, role by role. This is also true of prosecutors (some are county based roles, some assigned to judicial districts that include a number of counties.) Because of this you have to have some knowledge and do some data cleaning to separate roles. 

Second, with respect to US representatives, they are elected by Congressional District and effectively have a local geo-political division.  While senators are elected state-wide and are assigned to a state geo-political division. Understanding geo-political divisions is key. They are demarcated by "ocd-id" in the API response.

The best way to work through this problem is to read a bit about OCDid's. https://opencivicdata.info/en/latest/ocdids.html

Then use the "Role" and "AdministrativeArea" tags in the API response to start to separate out some of these local, county, regional roles. Finally, I find it helpful when you have a role such as "prosecutor" that goes by different names and can be assigned to a county geo-political division or a prosecutorial/judicial geo-political division, to grep or perform a partial word match on synonyms of the title to capture the role in all its many, glorious manifestations. 

Good luck! 
Reply all
Reply to author
Forward
Message has been deleted
0 new messages