Sunlight Foundation data from R

Share:

Description

You need API keys for Sunlight Foundation APIs. Please get your own API keys if you plant to use these functions for Sunlight Labs (http://services.sunlightlabs.com/). We set up the functions so that you can use either env vars, or R options. For env vars, put an entry in your .Renviron file with the name SUNLIGHT_LABS_KEY, so the full thing would be SUNLIGHT_LABS_KEY=<key>. For R options, put the key in your .Rprofile file like options(SunlightLabsKey = "key"). Both are called on R startup, and then you don't have to enter your API key for each run of a function.

Details

Currently we have functions to interface with the following Sunlight Foundation APIs, where functions for each API are prefixed with a two letter code indicating the service.

  • Congress API ('cg')

  • Open States API ('os')

  • Capitol Words API ('cw')

Note that Puerto Rico is not included in Sunlight Foundation data.

Author(s)

Scott Chamberlain myrmecocystus@gmail.com

Thomas J. Leeper thosjleeper@gmail.com

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.