Title: | Client Package for the U.S. Federal Register API |
---|---|
Description: | Access data from the Federal Register API <https://www.federalregister.gov/developers/api/v1>. |
Authors: | Thomas J. Leeper |
Maintainer: | Thomas J. Leeper <[email protected]> |
License: | GPL-2 |
Version: | 0.2.0 |
Built: | 2025-03-13 10:24:29 UTC |
Source: | https://github.com/rOpenGov/federalregister |
Access United States Federal Register data from R.
Thomas J. Leeper
Maintainer: Thomas J. Leeper <[email protected]>
Function to get information about all (the default) or, optionally, a single federal agency listed in the Federal Register
fr_agencies(id=NULL, version='v1', ...)
fr_agencies(id=NULL, version='v1', ...)
id |
An optional numeric or character string containing a Federal Register agency identifying number. If |
version |
The Federal Register API version. Default is 'v1'. |
... |
Additional arguments passed to |
A list containing one or more lists of class fedreg_agency
, which contain details about the agency.
Thomas J. Leeper
## Not run: fr_agencies(538) ## Not run: fr_agencies()
## Not run: fr_agencies(538) ## Not run: fr_agencies()
Function to get metadata for one or more Federal Register Documents
fr_get(docnumber, fields=NULL, version='v1', ...)
fr_get(docnumber, fields=NULL, version='v1', ...)
docnumber |
A character vector containing one or more Federal Register document numbers. |
fields |
A character vector specifying the names of fields to return. See Details. |
version |
The Federal Register API version. Default is 'v1'. |
... |
Additional arguments passed to |
Allowed values for fields
are: abstract
, abstract_html_url
, action
, agencies
, agency_names
, body_html_url
, cfr_references
, citation
, comments_close_on
, correction_of
, corrections
, dates
, docket_id
, docket_ids
, document_number
, effective_on
, end_page
, excerpts
, executive_order_notes
, executive_order_number
, full_text_xml_url
, html_url
, json_url
, mods_url
, page_length
, pdf_url
, president
, public_inspection_pdf_url
, publication_date
, raw_text_url
, regulation_id_number_info
, regulation_id_numbers
, regulations_dot_gov_info
, regulations_dot_gov_url
, significant
, signing_date
, start_page
, subtype
, title
, toc_doc
, toc_subject
, topics
, type
, volume
.
A list containing one or more objects of class fedreg_document
.
Thomas J. Leeper
## Not run: fr_get("2014-05323") ## Not run: fr_get(c("2014-05323","2014-09343"))
## Not run: fr_get("2014-05323") ## Not run: fr_get(c("2014-05323","2014-09343"))
Function to search for entries in the Federal Register
fr_search(..., fields=NULL, per_page=NULL, page=NULL, order='relevance', version='v1', getopts = NULL)
fr_search(..., fields=NULL, per_page=NULL, page=NULL, order='relevance', version='v1', getopts = NULL)
... |
Named arguments specifying a search query. See Details. |
fields |
A character vector specifying the names of fields to return. See Details. |
per_page |
A numeric value specifying the number of records to return. Default is |
page |
A numeric value specifying the page of results to return. |
order |
A character string specifying “relevance” (the default), “newest”, “oldest”, or “executive_order_number”. |
version |
The Federal Register API version. Default is 'v1'. |
getopts |
Additional arguments passed to |
The ...
argument should contain named arguments that together constitute a search query. Allowed named arguments are:
term
: any character string which will be searched for.
agencies
: a character string specifying a federal agency mentioned in the document; multiple agencies
arguments can be specified and only one agency should be named with each. The appropriate character strings for agencies
arguments can be retrieved from the API Documentation: https://www.federalregister.gov/developers/api/v1.
publication_date
: a list containing further named arguments. Allowed values are is
(exact date; with a date in “YYYY-MM-DD” format), year
(exact year; with a year in “YYYY” format), gte
(greater than date; with a date in “YYYY-MM-DD” format), and lte
(less than date; with a date in “YYYY-MM-DD” format).
effective_date
: a list containing further named arguments. See publication_date
, above.
type
: a character string containing “RULE” for a Final Rule, “PRORULE” for a Proposed Rule, “NOTICE” for a Notice, or “PRESDOCU” for a Presidential Document; multiple type
arguments can be specified and only one type should be named with each.
presidential_document_type
: a character string containing “determination”, “executive_order”, “memorandum”, “notice”, or “proclamation”. Multiple presidential_document_type
arguments can be specified and only one document type should be named with each.
president
: a character string containing the name of the signing President for Presidential document types. One of “william-j-clinton”, “george-w-bush”, or “barack-obama”. Multiple presidential_document_type
arguments can be specified and only one president should be named with each.
docket_id
: a character string containing the agency docket number associated with an article.
regulation_id_number
: a character string containing the Regulation ID Number (RIN) associated with an article.
sections
: a character string naming a section of the FederalRegister.gov website. Allowed values are: “money”, “environment”, “world”, “science-and-technology”, “business-and-industry”, and “health-and-public-welfare”. Multiple section
arguments can be specified and only one section name should be named with each.
significant
: a number 0 for a “Deemed significant” or 1 for “not deemed significant”, per EO 12866.
cfr
: a list containing further named arguments: title
, a character string containing a title of the Code of Federal Regulations and, optionally, part
, a character string specifying a part or part range (eg '17' or '1-50') of the specified CFR title.
near_location
: a list containing further named arguments: location
, a character string containing a zipcode or city and state and within
, a maximum distance from named location in miles.
Allowed values for fields
are: abstract
, abstract_html_url
, action
, agencies
, agency_names
, body_html_url
, cfr_references
, citation
, comments_close_on
, correction_of
, corrections
, dates
, docket_id
, docket_ids
, document_number
, effective_on
, end_page
, excerpts
, executive_order_notes
, executive_order_number
, full_text_xml_url
, html_url
, json_url
, mods_url
, page_length
, pdf_url
, president
, public_inspection_pdf_url
, publication_date
, raw_text_url
, regulation_id_number_info
, regulation_id_numbers
, regulations_dot_gov_info
, regulations_dot_gov_url
, significant
, signing_date
, start_page
, subtype
, title
, toc_doc
, toc_subject
, topics
, type
, volume
.
A list containing one or more objects of class fedreg_document
.
Thomas J. Leeper
## Not run: fr_search(presidential_document_type='executive_order', fields=c('executive_order_number','president','raw_text_url','document_number'), per_page=30) fr_search(term='climate', publication_date=list(gte='2013-01-01',lte='2013-03-31')) ## End(Not run)
## Not run: fr_search(presidential_document_type='executive_order', fields=c('executive_order_number','president','raw_text_url','document_number'), per_page=30) fr_search(term='climate', publication_date=list(gte='2013-01-01',lte='2013-03-31')) ## End(Not run)
Function to retrieve all current Public Inspection Documents
pi_current(version='v1', ...)
pi_current(version='v1', ...)
version |
The Federal Register API version. Default is 'v1'. |
... |
Additional arguments passed to |
Retrieve all current Public Inspection Documents, those items available to the public prior to publication in the Federal Register.
A list containing one or more objects of class fedreg_document
.
Thomas J. Leeper
https://www.federalregister.gov/learn/public-inspection-desk-2
## Not run: pi_current()
## Not run: pi_current()
Function to get metadata for one or more Public Inspection Documents
pi_get(docnumber, version='v1', ...)
pi_get(docnumber, version='v1', ...)
docnumber |
A character vector containing one or more Public Inspection Document document numbers. |
version |
The Federal Register API version. Default is 'v1'. |
... |
Additional arguments passed to |
A list containing one or more objects of class fedreg_document
.
Thomas J. Leeper
https://www.federalregister.gov/learn/public-inspection-desk-2
## Not run: pi_get("2014-10067") ## Not run: pi_get(c("2014-10067","2014-10687"))
## Not run: pi_get("2014-10067") ## Not run: pi_get(c("2014-10067","2014-10687"))
Function to search for documents under Public Inspection
pi_search(..., fields=NULL, per_page=NULL, page=NULL, version='v1', getopts = NULL)
pi_search(..., fields=NULL, per_page=NULL, page=NULL, version='v1', getopts = NULL)
... |
Named arguments specifying a search query. See Details. |
fields |
A character vector specifying the names of fields to return. See Details. |
per_page |
A numeric value specifying the number of records to return. Default is |
page |
A numeric value specifying the page of results to return. |
version |
The Federal Register API version. Default is 'v1'. |
getopts |
Additional arguments passed to |
The ...
argument should contain named arguments that together constitute a search query. Allowed named arguments are:
term
: any character string which will be searched for.
agencies
: a character string specifying a federal agency mentioned in the document; multiple agencies
arguments can be specified and only one agency should be named with each. The appropriate character strings for agencies
arguments can be retrieved from the API Documentation: https://www.federalregister.gov/developers/api/v1.
type
: a character string containing “RULE” for a Final Rule, “PRORULE” for a Proposed Rule, “NOTICE” for a Notice, or “PRESDOCU” for a Presidential Document. Multiple type
arguments can be specified and only one type should be named with each.
special_filing
: 0 for a regular filing or 1 for a special filing.
docket_id
: an agency docket number associated with article.
Allowed values for fields
are: agencies
, docket_numbers
, document_number
, editorial_note
, excerpts
, filed_at
, filing_type
, html_url
, json_url
, num_pages
, pdf_file_size
, pdf_updated_at
, pdf_url
, publication_date
, raw_text_url
, title
, toc_doc
, toc_subject
, type
.
A list containing one or more objects of class fedreg_document
.
Thomas J. Leeper
https://www.federalregister.gov/learn/public-inspection-desk-2
## Not run: pi_search(type='RULE', fields=c('document_number','raw_text_url')) pi_search(type='PRESDOC') ## End(Not run)
## Not run: pi_search(type='RULE', fields=c('document_number','raw_text_url')) pi_search(type='PRESDOC') ## End(Not run)