sunlight.capitolwords

For every day Congress is in session, Capitol Words visualizes the most frequently used words in the Congressional Record, giving you an at-a-glance view of which issues lawmakers address on a daily, weekly, monthly and yearly basis. Capitol Words lets you see what are the most popular words spoken by lawmakers on the House and Senate floor.

capitolwords.dates(phrase, **kwargs)[source]

Retrieve information regarding the popularity of a phrase over a period of time.

For a list of optional arguments see Capitol Words’ dates.json endpoint.

capitolwords.phrases(entity_type, entity_value, **kwargs)[source]

Retrieve information on the top phrases for an facet.

A facet can be any date, month, state or legislator.

For a list of arguments see Capitol Words’ phrases.json endpoint.

capitolwords.phrases_by_entity(entity_type, **kwargs)[source]

Get listing of top facets for a given phrase.

A facet can be any date, month, state or legislator.

For a list of arguments see Capitol Words’ phrases/entity.json endpoint.

capitolwords.text(phrase=None, title=None, **kwargs)[source]

Full text-search against Capitol Words data.

Neither phrase nor title are required, but one or the other must be used. If both are omitted, a sunlight.errors.BadRequestException will be thrown.

phrase will do a full-text search on that phrase, whereas title will doa full-text search on the title of each CR (Congressional Record) document.

For a list of arguments see Capitol Words’ text.json endpoint.