Type: | Package |
Title: | R Package for the OpenSecrets.org API |
Version: | 1.0.1 |
Date: | 2014-10-26 |
Author: | Thomas P. Fuller <thomas.fuller@coherentlogic.com> |
Maintainer: | Thomas P. Fuller <thomas.fuller@coherentlogic.com> |
Description: | An R package for the OpenSecrets.org web services API. |
Depends: | R (≥ 3.0.3), RJSONIO, RCurl |
LazyLoad: | yes |
License: | LGPL-3 |
Copyright: | (C) 2014 Coherent Logic Limited; ALL RIGHTS RESERVED. |
URL: | http://www.r-project.org, http://coherentlogic.com/r-package-for-the-opensecrets-org-api?source=cran |
Repository: | CRAN |
Archs: | i386, x64 |
Packaged: | 2014-10-26 22:32:25 UTC; thospfuller |
NeedsCompilation: | no |
Date/Publication: | 2014-10-27 07:12:36 |
Provides the top organizations contributing to specified politician.
Description
Provides the top organizations contributing to specified politician.
Usage
GetCandContribData(params)
Arguments
params |
Any parameter accepted by this web service call – see here. |
Examples
## Not run:
SetAPIKey ("ENTER YOUR PRIVATE API KEY HERE.")
params <- list (cid="N00007360", cycle="2012")
tryCatch(
candContribData <- GetCandContribData (params),
error =
function (e) {
print (
paste (
"An exception was thrown -- details follow: ",
e,
sep=""
)
)
}
)
## End(Not run)
Provides total contributed to specified candidate from specified industry for specified cycle.
Description
Provides total contributed to specified candidate from specified industry for specified cycle.
Usage
GetCandIndByIndData(params)
Arguments
params |
Any parameter accepted by this web service call – see here. |
Examples
## Not run:
SetAPIKey ("ENTER YOUR PRIVATE API KEY HERE.")
params <- list (cid="N00007360", cycle="2012", ind="K02")
tryCatch(
candIndByIndData <- GetCandIndByIndData (params),
error =
function (e) {
print (
paste (
"An exception was thrown -- details follow: ",
e,
sep=""
)
)
}
)
## End(Not run)
Provides the top industries contributing to a specified politician.
Description
Provides the top industries contributing to a specified politician.
Usage
GetCandIndustryData(params)
Arguments
params |
Any parameter accepted by this web service call – see here. |
Examples
## Not run:
SetAPIKey ("ENTER YOUR PRIVATE API KEY HERE.")
params <- list (cid="N00007360", cycle="2012", ind="K02")
tryCatch(
candIndustryData <- GetCandIndustryData (params),
error =
function (e) {
print (
paste (
"An exception was thrown -- details follow: ",
e,
sep=""
)
)
}
)
## End(Not run)
Provides the top industries contributing to a specified politician.
Description
Provides the top industries contributing to a specified politician.
Usage
GetCandSectorData(params)
Arguments
params |
Any parameter accepted by this web service call – see here. |
Examples
## Not run:
SetAPIKey ("ENTER YOUR PRIVATE API KEY HERE.")
params <- list (cid="N00007360", cycle="2012")
tryCatch(
candSectorData <- GetCandSectorData (params),
error =
function (e) {
print (
paste (
"An exception was thrown -- details follow: ",
e,
sep=""
)
)
}
)
## End(Not run)
Provides summary fundraising information for a specified politician.
Description
Provides summary fundraising information for a specified politician.
Usage
GetCandSummaryData(params)
Arguments
params |
Any parameter accepted by this web service call – see here. |
Examples
## Not run:
SetAPIKey ("ENTER YOUR PRIVATE API KEY HERE.")
params <- list (cid="N00007360", cycle="2012")
tryCatch(
candSummaryData <- GetCandSummaryData (params),
error =
function (e) {
print (
paste (
"An exception was thrown -- details follow: ",
e,
sep=""
)
)
}
)
## End(Not run)
Provides summary fundraising information for a specific committee, industry and congress number.
Description
Provides summary fundraising information for a specific committee, industry and congress number.
Usage
GetCongCmteIndusData(params)
Arguments
params |
Any parameter accepted by this web service call – see here. |
Examples
## Not run:
SetAPIKey ("ENTER YOUR PRIVATE API KEY HERE.")
params <- list (congno="112", indus="F10", cmte="HARM")
tryCatch(
congCmteIndusData <- GetCongCmteIndusData (params),
error =
function (e) {
print (
paste (
"An exception was thrown -- details follow: ",
e,
sep=""
)
)
}
)
## End(Not run)
Provides a list of legislators and associated attributes.
Description
Provides a list of legislators and associated attributes.
Usage
GetLegislatorsData(params)
Arguments
params |
Any parameter accepted by this web service call – see here. |
Examples
## Not run:
SetAPIKey ("ENTER YOUR PRIVATE API KEY HERE.")
params <- list (id="NJ")
tryCatch(
legislatorsData <- GetLegislatorsData (params),
error =
function (e) {
print (
paste (
"An exception was thrown -- details follow: ",
e,
sep=""
)
)
}
)
## End(Not run)
Returns PFD information for a member of Congress.
Description
Returns PFD information for a member of Congress.
Usage
GetMemPFDprofileData(params)
Arguments
params |
Any parameter accepted by this web service call – see here. |
Examples
## Not run:
SetAPIKey ("ENTER YOUR PRIVATE API KEY HERE.")
params <- list (year="2010", cid="N00007360")
tryCatch(
memPFDprofileData <- GetMemPFDprofileData (params),
error =
function (e) {
print (
paste (
"An exception was thrown -- details follow: ",
e,
sep=""
)
)
}
)
## End(Not run)
Provides organization summary data.
Description
Provides organization summary data.
Usage
GetOrgSummaryData(params)
Arguments
params |
Any parameter accepted by this web service call – see here. |
Examples
## Not run:
SetAPIKey ("ENTER YOUR PRIVATE API KEY HERE.")
params <- list (id="123")
tryCatch(
orgSummaryData <- GetOrgSummaryData (params),
error =
function (e) {
print (
paste (
"An exception was thrown -- details follow: ",
e,
sep=""
)
)
}
)
## End(Not run)
Provides organization data.
Description
Provides organization data.
Usage
GetOrgsData(params)
Arguments
params |
Any parameter accepted by this web service call – see here. |
Examples
## Not run:
SetAPIKey ("ENTER YOUR PRIVATE API KEY HERE.")
params <- list (org="Microsoft")
tryCatch(
orgsData <- GetOrgsData (params),
error =
function (e) {
print (
paste (
"An exception was thrown -- details follow: ",
e,
sep=""
)
)
}
)
## End(Not run)
Allows the user to set the OpenSecrets.org API key once thereby removing the need to pass it in for each function call in this package.
Description
Allows the user to set the OpenSecrets.org API key once thereby removing the need to pass it in for each function call in this package.
Usage
SetAPIKey(apiKey)
Arguments
apiKey |
The OpenSecrets.org API key. |
Examples
SetAPIKey ("Example API Key")