The Congressional Biographical Directory contains entries for every congressperson from 1774 to the present. Each congressional representative is associated with an identifier (a bioguide ID). For example, the bioguide ID for Edward (Ted) Kennedy is K000105. With this ID, you can determine the URL for the coresponding biographical directory — e.g., Kennedy's is
http://bioguide.congress.gov/scripts/biodisplay.pl?index=K000105
I would like to make use of the bioguide ID in interacting with Freebase with respect to congresspeople.
http://www.freebase.com/view/en/ted_kennedy
hit explore:
http://www.freebase.com/tools/explore/en/ted_kennedy to see
Outbound key(s):
key | namespace |
---|---|
184136 | /wikipedia/en_id |
Ted_Kennedy | /wikipedia/en |
Edward_M$002E_Kennedy | /wikipedia/en |
Edward_Moore_Kennedy | /wikipedia/en |
Teddy_Kennedy | /wikipedia/en |
Edward_kennedy | /wikipedia/en |
Edward_M_Kennedy | /wikipedia/en |
EMK | /wikipedia/en |
Ed_Kennedy | /wikipedia/en |
Caroline_Bilodeau | /wikipedia/en |
aa1a62ca-f027-426e-810f-63556da55434 | /authority/musicbrainz |
ARTIST349855 | /authority/musicbrainz/name |
Edward_Kennedy | /wikipedia/en |
Ted_Kennedy$002FDraft_1 | /wikipedia/en |
Senator_Ted_Kennedy | /wikipedia/en |
ted_kennedy | /en |
The_Lion_of_the_Senate | /wikipedia/en |
Edward_Moore_$0022Ted$0022_Kennedy | /wikipedia/en |
K000105 | /user/jamie/sunlight/bioguide_id |
Cape_Cod_Orca | /wikipedia/en |
What's the MQL query to read all the keys for the topic?
{ "id" : "/en/ted_kennedy", "key" : [ {} ] }
we get among the various keys
{ "namespace" : "/user/jamie/sunlight/bioguide_id", "type" : "/type/key", "value" : "K000105" }
Keys are new to me — so I need to do a bit of learning right now.  Now, let's note the following
- query to read all senators in PolDB listing a bioguide_id whether it's there or not.
- query to read all senators in PolDB w/o a bioguide_id
Let's now figure out how to write the bioguide ID for one of the senators without the bioguide ID:Â Jeanne Shaheen facts – Freebase. Her bioguide_id is S001181. Here's a MQL write query that writes the bioguide_id to Freebase:
{ "id" : "/en/jeanne_shaheen", "key" : { "connect" : "insert", "namespace" : "/user/jamie/sunlight/bioguide_id", "type" : "/type/key", "value" : "S001181" } }
Things to figure out: how to create keys in the first place in the freebase UI and in MQL. I think regular users can create keys but I'm not aware of how to do so in the Freebase UI. I didn't even see a way to insert the bioguide_id using the Freebase UI.
{ 1 } Comments