Description Usage Arguments Value Examples
View source: R/os_legislatorsearch.R
Search Legislators on OpenStates.
1 2 3 |
state |
state two-letter abbreviation (character) |
first_name |
first name of legislator (character) |
last_name |
last name of legislator (character) |
chamber |
one of 'upper' or 'lower' (character) |
active |
TRUE or FALSE (character) |
term |
filter by legislators who served during a certain term (character) |
district |
legislative district (character) |
party |
democratic or republican (character) |
fields |
You can request specific fields by supplying a vector of fields names. Many fields are not returned unless requested. If you don't supply a fields parameter, you will get the most commonly used subset of fields only. To save on bandwidth, parsing time, and confusion, it's recommended to always specify which fields you will be using. |
as |
(character) One of table (default), list, or response (crul response object) |
key |
your SunlightLabs API key; loads from .Rprofile |
... |
Curl options passed on to crul::HttpClient |
List of output fields.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
os_legislatorsearch(state = 'ca', party = 'democratic')
os_legislatorsearch(state = 'tx', party = 'democratic', active = TRUE)
os_legislatorsearch(state = 'nv', party = 'republican')
os_legislatorsearch(state = 'dc', chamber = 'upper')
# pass in more than one value for some parameters
os_legislatorsearch(state = c('dc', 'or'), chamber = 'upper')
os_legislatorsearch(first_name = c('jane', 'bob'), chamber = 'upper')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.