incidence.from.congress: Generate bill sponsorship incidence matrices and bipartite...

View source: R/incidence.from.congress.R

incidence.from.congressR Documentation

Generate bill sponsorship incidence matrices and bipartite graphs

Description

incidence.from.congress() uses data from https://www.congress.gov/ to construct an incidence matrix or bipartite graph recording legislators' bill (co-)sponsorships.

Usage

incidence.from.congress(
  session = NULL,
  types = NULL,
  areas = "all",
  nonvoting = FALSE,
  weighted = FALSE,
  format = "data",
  narrative = FALSE
)

Arguments

session

numeric: the session of congress

types

vector: types of bills to include. May be any combination of c("s", "sres", "sjres", "sconres") OR any combination of c("hr", "hres", "hjres", "hconres").

areas

string: policy areas of bills to include (see details)

nonvoting

boolean: should non-voting members be included

weighted

boolean: should sponsor-bill edges have a weight of 2, but cosponsor-bill edges have a weight of 1

format

string: format of output, one of c("data", "igraph")

narrative

boolean: TRUE if suggested text & citations should be displayed.

Details

The incidence.from.congress() function uses data from https://www.congress.gov/ to construct an incidence matrix or bipartite graph recording legislators' bill (co-)sponsorships. In an incidence matrix I, entry Iik = 1 if legislator i sponsored or co-sponsored bill k, and otherwise is 0. In a bipartite graph G, a legislator i is connected to a bill k if i sponsored or co-sponsored k.

In the US Congress, the law making process begins when a sponsor legislator introduces a bill in their chamber (House of Representatives or Senate). Additional legislators in the same chamber can support the bill by joining as a co-sponsor. The bill is discussed, revised, and possibly voted on in the chamber. If it passes in one chamber, it is sent to the other chamber for further discussion, revision, and possibly a vote. If it passed both chambers, it is sent to the President. If the President signs the bill, it becomes law.

In the House of Representatives, legislators can introduce four types of bills: a House Bill (hr), a House Joint Resolution (hjres), a House Concurrent Resolution (hconres), and a House Simple Resolution (hres). Similarly, in the Senate, legislators can introduce four types of bills: a Senate Bill (s), a Senate Joint Resolution (sjres), a Senate Concurrent Resolution (sconres), and a Senate Simple Resolution (sres). In both chambers, concurrent and simple resolutions are used for minor procedural matters and do not have the force of law. Only bills and joint resolutions require the President's signature and have the force of law if signed.

Each bill is assigned a policy area by the Congressional Research Service. By default, bills from all policy areas are included, however the areas parameter can be used to include only bills addressing certain policy areas. The areas takes a vector of strings listing the desired policy areas (e.g., areas = c("Congress", "Animals")). A complete list of policy areas and brief descriptions is available at https://www.congress.gov/help/field-values/policy-area.

Value

If format = "data", a list containing an incidence matrix, a dataframe of legislator characteristics, and a dataframe of bill characteristics.

If format = "igraph", a bipartite igraph object composed of legislator vertices and bill vertices, each with vertex attributes.

For both formats, legislator characteristics include: BioGuide ID, full name, last name, party affiliation, and state. Bill characteristics include: bill ID, introduction date, title, policy area, status, sponsor's party, and number of co-sponsors from each party.

References

Tutorial: Neal, Z. P. 2022. Constructing legislative networks in R using incidentally and backbone. Connections, 42. doi: 10.2478/connections-2019.026

Package: Neal, Z. P. 2022. incidentally: An R package to generate incidence matrices and bipartite graphs. OSF Preprints doi: 10.31219/osf.io/ectms

Examples

## Not run: 
D <- incidence.from.congress(session = 116, types = "s", format = "data")
D <- incidence.from.congress(session = 116, types = "s", format = "data", areas = "animals")
G <- incidence.from.congress(session = 115, types = c("hr", "hres"), format = "igraph")

## End(Not run)

zpneal/incidentally documentation built on Feb. 23, 2023, 11:54 a.m.