Learn R Programming

rsunlight (version 0.7.0)

nominations: nominations methods

Description

nominations methods

Usage

cg_nomination(congress, id, key = NULL, as = "table", ...)

cg_nominations_category(congress, type, key = NULL, as = "table", ...)

cg_nominations_state(congress, state, key = NULL, as = "table", ...)

Arguments

congress

(integer/numeric) the Congress in which this nomination was presented

id

alphanumeric ID beginning with PN - for example, "PN675"

key

your SunlightLabs API key; loads from environment variable from .Renviron or from an option from .Rprofile

as

(character) One of table (default), list, or response (httr response object). When table is requested, the default, a table is not always returned, but is returned almost always. You can then make a table yourself if you like.

...

Optional additional curl options (debugging tools mostly) passed on to HttpClient

type

(character) received, updated, confirmed, or withdrawn

state

(character) state Two-letter state abbreviation

Details

  • cg_nomination: Get a specific nomination

  • cg_nominations_category: Get recent nominations by categroy

  • cg_nominations_state: Get nominees by state

Examples

Run this code
# NOT RUN {
cg_nomination(115, "PN40")
cg_nominations_category(115, "confirmed")
cg_nominations_state(115, "VA")
# }

Run the code above in your browser using DataLab