Data Resource

Senators of the 116th Congress

Dataset for the U.S. Senators of the 116th Congress

Details

The data is imported from senate.gov and formatted for computation.
The default content is a Dataset. It includes the following properties for each senator:
"MemberName"unique identifying name, typically last name and party affiliation
"LastName"last name
"FirstName"first name
"PartyAffiliation"party affiliation
"State"state represented
"OfficeAddress"office address (in Washington, DC)
"OfficePhone"office phone
ContactFormURL"link to web contact form
"OfficialWebSite"link to official web site
"Class"election cycle class (I, II, or III)
"BioGuideURL"link to brief biography web page
"LeadershipPosition"leadership position if applicable, or

Examples

Basic Examples

Retrieve the full dataset:

In[1]:=
ResourceData[
ResourceObject[
CloudObject[ "https://www.wolframcloud.com/obj/arnoudb/DeployedResources/Data/\
Senators-of-the-116th-Congress"]]]
Out[1]=

List all states with senators:

In[2]:=
ResourceData[
ResourceObject[
CloudObject[ "https://www.wolframcloud.com/obj/arnoudb/DeployedResources/Data/\
Senators-of-the-116th-Congress"]]][All, #["State"] &] // Normal // Union
Out[2]=

List senators from Illinois:

In[3]:=
ResourceData[
ResourceObject[
CloudObject[ "https://www.wolframcloud.com/obj/arnoudb/DeployedResources/Data/\
Senators-of-the-116th-Congress"]]][ Select[#["State"] === Entity["AdministrativeDivision", {"Illinois", "UnitedStates"}] &]]
Out[3]=

List senators from election cycle class III:

In[4]:=
ResourceData[
ResourceObject[
CloudObject[ "https://www.wolframcloud.com/obj/arnoudb/DeployedResources/Data/\
Senators-of-the-116th-Congress"]]][ Select[#["Class"] === "Class III" &]]
Out[4]=

List senators with a leadership position:

In[5]:=
ResourceData[
ResourceObject[
CloudObject[ "https://www.wolframcloud.com/obj/arnoudb/DeployedResources/Data/\
Senators-of-the-116th-Congress"]]][ Select[#["LeadershipPosition"] =!= None &]]
Out[5]=