R/freethefiles.R

Defines functions market station committee filing

Documented in committee filing market station

market <- function(slug=NULL, ...){
    if(is.null(slug))
        out <- ppQuery('markets', baseurl='https://projects.propublica.org/free-the-files/', ...)
    else
        out <- ppQuery(paste('markets', slug, sep='/'),
                       baseurl='https://projects.propublica.org/free-the-files/', ...)
    return(out)
}

station <- function(callsign, ...){
    out <- ppQuery(paste('stations', callsign, sep='/'),
                   baseurl='https://projects.propublica.org/free-the-files/', ...)
    return(out)
}

committee <- function(slug=NULL, ...){
    if(is.null(slug))
        out <- ppQuery('committees', 
                       baseurl='https://projects.propublica.org/free-the-files/', ...)
    else
        out <- ppQuery(paste('committees', slug, sep='/'),
                       baseurl='https://projects.propublica.org/free-the-files/', ...)
    return(out)
}

filing <- function(id, ...){
    out <- ppQuery(paste('filings', id, sep='/'), 
                   baseurl='https://projects.propublica.org/free-the-files/', ...)
    return(out[[1]])
}

Try the RPublica package in your browser

Any scripts or data that you put into this service are public.

RPublica documentation built on May 2, 2019, 2:34 a.m.