knitr::opts_knit$set( progress = TRUE ) knitr::opts_chunk$set( collapse = TRUE, tidy = "styler", comment = "#>", warning = FALSE, message = FALSE, dev = "ragg_png", dpi = 300, out.width = "100%" )
The package is released under GPL-2 as part of the rOpenGov project. Licenses for the data depend on the particular API, but access to that data (regardless of license) through the APIs is allowed under ProPublica's Data Terms of Use.
The package serves as a client library for the (currently) three ProPublica data journalism APIs:
Nonprofit Explorer, which provides access to IRS Form 990 data on for every organization required to file a Form 990 (i.e., those claiming tax exempt status). These data are in the public domain.
Forensics, which provides state- and county-level data about coroner and medical examiner systems. These data are released under a modified Creative Commons license.
Free the Files, which provides access to political television spending data based on FCC filings in 33 swing markets. These data are released under a modified Creative Commons license.
RPublica is available on GitHub and can (soon) be installed from within R from your favorite CRAN mirror:
install.packages("RPublica")
And the latest development version, available here, can be installed directly using devtools:
# install.packages("devtools") library("devtools") install_github("rOpenGov/RPublica")
Alternatively, you can install RPublica
using the
r-universe:
# Enable this universe options(repos = c( ropengov = "https://ropengov.r-universe.dev", CRAN = "https://cloud.r-project.org" )) install.packages("RPublica")
The Nonprofit Explorer API
functionality includes two functions: npsearch
, to retrieve subsets of
available organizations, and np_org
to retrieve detailed information about a
given organization including a direct link to the complete Form 990 for that
organization (as a PDF).
library("RPublica") str(np_search("propublica"), max = 1) str(np_org(142007220), max = 1)
The Forensics API functionality
includes two functions: geos
, to return data for a specific state, and
systems
, to return detailed data and statistics about specified medical
examiner (or coroner) system.
library("RPublica") g <- geos() tibble::as_tibble(g)
The Free the Files API
functionality includes four functions: market
(for retrieving available
markets, or a specific market), station
(for retrieving station-specific
data,
committee(for retrieving sponsoring committees, or a specific such committee), and
filing`
(for retrieving details of a specific filing). A codebook describing the values
returned by each function is available at:
https://projects.propublica.org/free-the-files/api.
library("RPublica") tibble::as_tibble(market()) m <- market("new-york") s <- station("WEWS-TV") str(committee())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.