An open API service indexing awesome lists of open source software.

https://github.com/jonthegeek/fecapi

'OpenFEC' 'API' Client
https://github.com/jonthegeek/fecapi

Last synced: 3 days ago
JSON representation

'OpenFEC' 'API' Client

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# fecapi

[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/fecapi)](https://CRAN.R-project.org/package=fecapi)
[![Codecov test coverage](https://codecov.io/gh/jonthegeek/fecapi/branch/main/graph/badge.svg)](https://app.codecov.io/gh/jonthegeek/fecapi?branch=main)
[![R-CMD-check](https://github.com/jonthegeek/fecapi/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jonthegeek/fecapi/actions/workflows/R-CMD-check.yaml)

A client to interact with the [OpenFEC API](https://api.open.fec.gov/developers/).
The OpenFEC API provides programmatic access to campaign finance data stored by the Federal Election Commission.

## Installation

You can install the development version of fecapi from [GitHub](https://github.com/) with:

``` r
# install.packages("remotes")
remotes::install_github("jonthegeek/fecapi")
```

## Made with {beekeeper}

This package is being developed using the [{beekeeper}](https://beekeeper.api2r.org/) package.
Development is very active, and this package will likely change a lot in the coming weeks.

## Usage

This package is still a work in progress, and we do not yet recommend usage.
However, you can experiment using the `fec_all_api()` function, or the `fec_get_candidates()` function.

```{r get-candidates}
# Get your API key at https://api.open.fec.gov/developers/
library(fecapi)
fec_get_candidates() |> head()

fec_get_candidates(office = "P") |> head()
```

## Code of Conduct

Please note that the fecapi project is released with a [Contributor Code of Conduct](https://jonthegeek.github.io/fecapi/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.