-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
70 lines (52 loc) · 2.09 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# congressapi
<!-- badges: start -->
[![R-CMD-check](https://github.com/miriamasagold/congressapi/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/miriamasagold/congressapi/actions/workflows/R-CMD-check.yaml)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![Codecov test coverage](https://codecov.io/gh/miriamasagold/congressapi/branch/main/graph/badge.svg)](https://app.codecov.io/gh/miriamasagold/congressapi?branch=main)
<!-- badges: end -->
<img src='man/figures/logo.svg' align="right" height="138.5" />
**congressapi** provides an extremely lightweight wrapper, facilitating seamless data retrieval from the [official Congress API](https://api.congress.gov/) via a single function, `get_congress()`.
## Installation
You can install the development version of **congressapi** from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("miriamasagold/congressapi")
```
## Retrieving data
Data may be retrieved from one of eleven base endpoints:
* bill
* amendment
* summaries
* congress
* member
* committee
* committee-report
* congressional-record
* house-communication
* nomination
* treaty
All the user needs to do is specify the endpoint, along with any additional specifications desired:
```{r congressGet}
library(congressapi)
# Retrieves all house bills from the 117th Congress
bill <-
dplyr::tibble(
congressapi::get_congress("bill/117/hr")
)
head(bill)
```
Visit https://miriamasagold.github.io/congressapi/ to read full package documentation. If you find a bug or would like to see a new functionality, please submit an [issue](https://github.com/miriamasagold/congressapi/issues).
# Note
This project is neither endorsed nor sponsored by the United States Congress.