First, get an API key from https://regulationsgov.github.io/developers/ and Devin’s API call functions from https://github.com/judgelord/rulemaking
source(here::here("functions", "regulations-gov-API-search.R"))
source(here::here("api-key.R"))
Each function requires two arguments
The n
most recently posted results (see the “regulations-gov-API-search.R” script for other options for ordering results)
Document types (documenttype
) from this list.
To search multiple types, separate them with a comma and a space, e.g. documenttype = "PR, FR"
.
search.docs(documenttype = "PR" ,
d <-n = 1000)
head(d) %>% select(title, everything() ) %>% kablebox()
title | agencyAcronym | allowLateComment | attachmentCount | commentDueDate | commentStartDate | docketId | docketTitle | docketType | documentId | documentStatus | documentType | frNumber | numberOfCommentsReceived | openForComment | postedDate | rin |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Petition for Rulemaking: Large Break Loss-of-Coolant Accident Redefinition; Denial | NRC | FALSE | 0 | NA | 2020-12-17T00:00:00-05:00 | NRC-2002-0018 | Nuclear Energy Institute - Large Break Loss of Coolant Accident Redefinition | Rulemaking | NRC-2002-0018-0028 | Posted | Proposed Rule | 2020-27364 | 0 | FALSE | 2020-12-17T00:00:00-05:00 | Not Assigned |
Transfer of Very Low-Level Waste To Exempt Persons for Disposal | NRC | FALSE | 0 | NA | NA | NRC-2020-0065 | Transfer of Very Low-Level Waste to Exempt Persons for Disposal | Nonrulemaking | NRC-2020-0065-1382 | Posted | Proposed Rule | 2020-27565 | 0 | FALSE | 2020-12-17T00:00:00-05:00 | NA |
Reduction in Force | OPM | FALSE | 0 | 2021-01-19T23:59:59-05:00 | 2020-12-17T00:00:00-05:00 | OPM_FRDOC_0001 | Recently Posted OPM Rules and Notices. | Rulemaking | OPM_FRDOC_0001-2024 | Posted | Proposed Rule | 2020-26347 | 0 | TRUE | 2020-12-17T00:00:00-05:00 | Not Assigned |
Wyoming Abandoned Mine Land Reclamation Plan | OSM | FALSE | 0 | 2021-01-19T23:59:59-05:00 | 2020-12-17T00:00:00-05:00 | OSM_FRDOC_0001 | Mississippi Abandoned Mine Land Reclamation Plan | Rulemaking | OSM_FRDOC_0001-0305 | Posted | Proposed Rule | 2020-27545 | 0 | TRUE | 2020-12-17T00:00:00-05:00 | Not Assigned |
Volunteer Discrimination Complaint Process | PC | FALSE | 0 | 2021-01-19T23:59:59-05:00 | 2020-12-17T00:00:00-05:00 | PC-2020-0026 | Volunteer Discrimination Complaint Process | Rulemaking | PC-2020-0026-0001 | Posted | Proposed Rule | 2020-26122 | 0 | TRUE | 2020-12-17T00:00:00-05:00 | 0420-AA27 |
Pennsylvania Regulatory Program | OSM | FALSE | 0 | 2021-01-19T23:59:59-05:00 | 2020-12-17T00:00:00-05:00 | OSM_FRDOC_0001 | Mississippi Abandoned Mine Land Reclamation Plan | Rulemaking | OSM_FRDOC_0001-0306 | Posted | Proposed Rule | 2020-27602 | 0 | TRUE | 2020-12-17T00:00:00-05:00 | Not Assigned |
$postedDate %<>% as.Date()
d$commentStartDate %<>% as.Date()
d
ggplot(d) +
aes(x = postedDate, fill = documentType) +
geom_histogram()
Select agencies, again seperating multiple agencies with a comma and a space
search.agency.docs(agency = "SEC, FAA, FRA",
d <-documenttype= "PR, FR",
n = 2000)
head(d) %>% select(title, everything() ) %>% kablebox()
title | agencyAcronym | allowLateComment | attachmentCount | commentDueDate | commentStartDate | docketId | docketTitle | docketType | documentId | documentStatus | documentType | frNumber | numberOfCommentsReceived | openForComment | postedDate | rin |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Airworthiness Directives: Textron Aviation Inc. (Type Certificate Previously Held by Cessna Aircraft Company) Airplanes | FAA | FALSE | 0 | 2021-02-01T23:59:59-05:00 | 2020-12-17T00:00:00-05:00 | FAA-2020-1108 | AD-2020-01397-T: Textron Aviation (Cessna) 560XL throttle quadrant assembly (IAR) | Rulemaking | FAA-2020-1108-0001 | Posted | Rule | 2020-27741 | 0 | TRUE | 2020-12-17T00:00:00-05:00 | 2120-AA64 |
Special Conditions: Boeing Commercial Airplanes Model 777-9 Airplane; Overhead Flightcrew Rest Compartment Occupiable During Taxi, Takeoff, and Landing | FAA | FALSE | 0 | NA | 2020-12-17T00:00:00-05:00 | FAA_FRDOC_0001 | Recently Posted FAA Rules and Notices. | Rulemaking | FAA_FRDOC_0001-20244 | Posted | Rule | 2020-27107 | 0 | FALSE | 2020-12-17T00:00:00-05:00 | Not Assigned |
Airworthiness Directives: Airbus Defense and Space S.A. (Formerly Known as Construcciones Aeronauticas, S.A.) Airplanes | FAA | TRUE | 0 | 2021-02-01T23:59:59-05:00 | 2020-12-17T00:00:00-05:00 | FAA_FRDOC_0001 | Recently Posted FAA Rules and Notices. | Rulemaking | FAA_FRDOC_0001-20243 | Posted | Proposed Rule | 2020-27691 | 0 | TRUE | 2020-12-17T00:00:00-05:00 | Not Assigned |
Airworthiness Directives: ATR-GIE Avions de Transport Regional Airplanes | FAA | TRUE | 0 | 2021-02-01T23:59:59-05:00 | 2020-12-17T00:00:00-05:00 | FAA-2020-1133 | MCAI-2020-01363-T: Airbus SAS Model A330-243, -343, and -941 airplanes | Rulemaking | FAA-2020-1133-0001 | Posted | Rule | 2020-27910 | 0 | TRUE | 2020-12-17T00:00:00-05:00 | 2120-AA64 |
Airworthiness Directives: Yabora Industria Aeronautica S.A. (Type Certificate Previously Held by Embraer S.A.) Airplanes | FAA | FALSE | 0 | 2021-02-01T23:59:59-05:00 | 2020-12-17T00:00:00-05:00 | FAA_FRDOC_0001 | Recently Posted FAA Rules and Notices. | Rulemaking | FAA_FRDOC_0001-20245 | Posted | Rule | 2020-27621 | 0 | TRUE | 2020-12-17T00:00:00-05:00 | Not Assigned |
Airworthiness Directives: General Electric Company Turbofan Engines | FAA | TRUE | 0 | NA | 2020-12-16T00:00:00-05:00 | FAA-2020-0592 | General Electric Company Turbofan Engines AD-2020-00251-E | Rulemaking | FAA-2020-0592-0008 | Posted | Rule | 2020-27628 | 0 | TRUE | 2020-12-16T00:00:00-05:00 | 2120-AA64 |
$postedDate %<>% as.Date()
d$commentStartDate %<>% as.Date()
d
# plot histogram by by agency over time
ggplot(d) +
aes(x = postedDate, fill = documentType) +
geom_histogram() +
facet_grid(rows = "agencyAcronym", scales = "free_y")
# Select a docket
"EPA-HQ-OAR-2017-0355"
docket <-
# Search
search.docket(docket = "EPA-HQ-OAR-2017-0355",
d <-documenttype = "PS",
n = 2000)
head(d) %>% select(title, everything() ) %>% kablebox()
title | agencyAcronym | allowLateComment | attachmentCount | commentDueDate | commentStartDate | commentText | docketId | docketTitle | docketType | documentId | documentStatus | documentType | numberOfCommentsReceived | openForComment | postedDate | rin |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Comment submitted by T. Markley | EPA | FALSE | 1 | NA | NA | See Attached | EPA-HQ-OAR-2017-0355 | Repeal of Carbon Dioxide Emission Guidelines for Existing Stationary Sources: Electric Utility Generating Units; Emission Guidelines for Greenhouse Gas Emissions from Existing Electric Utility Generating Units; Revisions to Emission Guideline Implementing Regulations; Revisions to New Source Review Program | Rulemaking | EPA-HQ-OAR-2017-0355-26774 | Posted | Public Submission | 1 | FALSE | 2020-11-23T00:00:00-05:00 | Not Assigned |
Mass Comment Campaign sponsored by Earthjustice. Sample attached (paper) | EPA | FALSE | 1 | NA | NA | See attached | EPA-HQ-OAR-2017-0355 | Repeal of Carbon Dioxide Emission Guidelines for Existing Stationary Sources: Electric Utility Generating Units; Emission Guidelines for Greenhouse Gas Emissions from Existing Electric Utility Generating Units; Revisions to Emission Guideline Implementing Regulations; Revisions to New Source Review Program | Rulemaking | EPA-HQ-OAR-2017-0355-26773 | Posted | Public Submission | 2175 | FALSE | 2020-10-21T00:00:00-04:00 | Not Assigned |
Mass Comment Campaign sponsored by Earthjustice. Sample attached (paper) | EPA | FALSE | 1 | NA | NA | See attached | EPA-HQ-OAR-2017-0355 | Repeal of Carbon Dioxide Emission Guidelines for Existing Stationary Sources: Electric Utility Generating Units; Emission Guidelines for Greenhouse Gas Emissions from Existing Electric Utility Generating Units; Revisions to Emission Guideline Implementing Regulations; Revisions to New Source Review Program | Rulemaking | EPA-HQ-OAR-2017-0355-26772 | Posted | Public Submission | 15 | FALSE | 2020-10-21T00:00:00-04:00 | Not Assigned |
Mass Comment Campaign sponsoring organization unknown. Sample attached (email) | EPA | FALSE | 1 | NA | NA | See attached | EPA-HQ-OAR-2017-0355 | Repeal of Carbon Dioxide Emission Guidelines for Existing Stationary Sources: Electric Utility Generating Units; Emission Guidelines for Greenhouse Gas Emissions from Existing Electric Utility Generating Units; Revisions to Emission Guideline Implementing Regulations; Revisions to New Source Review Program | Rulemaking | EPA-HQ-OAR-2017-0355-26771 | Posted | Public Submission | 33 | FALSE | 2020-03-12T00:00:00-04:00 | Not Assigned |
Mass Comment Campaign sponsoring organization unknown. Sample attached (email) | EPA | FALSE | 1 | NA | NA | See attached | EPA-HQ-OAR-2017-0355 | Repeal of Carbon Dioxide Emission Guidelines for Existing Stationary Sources: Electric Utility Generating Units; Emission Guidelines for Greenhouse Gas Emissions from Existing Electric Utility Generating Units; Revisions to Emission Guideline Implementing Regulations; Revisions to New Source Review Program | Rulemaking | EPA-HQ-OAR-2017-0355-26770 | Posted | Public Submission | 64 | FALSE | 2020-03-12T00:00:00-04:00 | Not Assigned |
Comment submitted by C. Wysser - Martin. | EPA | FALSE | 1 | NA | NA | See attached | EPA-HQ-OAR-2017-0355 | Repeal of Carbon Dioxide Emission Guidelines for Existing Stationary Sources: Electric Utility Generating Units; Emission Guidelines for Greenhouse Gas Emissions from Existing Electric Utility Generating Units; Revisions to Emission Guideline Implementing Regulations; Revisions to New Source Review Program | Rulemaking | EPA-HQ-OAR-2017-0355-26769 | Posted | Public Submission | 1 | FALSE | 2020-03-11T00:00:00-04:00 | Not Assigned |
$postedDate %<>% as.Date()
d$commentStartDate %<>% as.Date()
d
ggplot(d) +
aes(x = postedDate, fill = documentType) +
geom_histogram() +
labs(title = docket)
Note: keyword serches return an additional feature “summary” which is text before and after the keyword in the comment text
"environmental justice"
keywords =
search.keywords(keywords = c("environmental justice"),
d <-documenttype = "PS",
n = 2000)
head(d) %>% select(title, everything() ) %>% kablebox()
title | agencyAcronym | allowLateComment | attachmentCount | commentDueDate | commentStartDate | commentText | docketId | docketTitle | docketType | documentId | documentStatus | documentType | numberOfCommentsReceived | openForComment | postedDate | submitterName | environmentaljustice | rin | organization |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
In the Matter of Paul E. Cooper - Order Denying Informal Hearing Request | FMCSA | FALSE | 1 | NA | NA | This document belongs in docket number: FMCSA-2020-0139. Paul E. Cooper | FMCSA-2020-0139 | In the Matter of Paul E. Cooper - Objection with Basis to Respondent’s Request for Informal Hearing | Nonrulemaking | FMCSA-2020-0139-0003 | Posted | Public Submission | 1 | FALSE | 2020-12-17T00:00:00-05:00 | Cynthia Campise | Attachment Contents : …was purchased by Gold Medal <endeca_term>Environmental</endeca_term> in 1/2019. Gold Medal…Post Office Box 17900 Jim <endeca_term>Justice</endeca_term> Governor Charleston, West Virginia 25317… | NA | NA |
Comment submitted by Neil Gormley, Earthjustice et al. (part 2 of 3) | EPA | FALSE | 20 | NA | NA |
Earthjustice submits these attachments on behalf of Earthjustice, t.e.j.a.s., Sierra Club, Appalachian Mountain Club, Environmental Defense Fund, Chesapeake Bay Foundation, Clean Air Task Force, Downwinders at Risk, Natural Resources Defense Council, Clean Wisconsin, Air Alliance Houston, and Environmental Law and Policy Center. (2 of 3) |
EPA-HQ-OAR-2020-0272 | Revised Cross-State Air Pollution Rule Update for the 2008 Ozone NAAQS | Rulemaking | EPA-HQ-OAR-2020-0272-0148 | Posted | Public Submission | 1 | FALSE | 2020-12-16T00:00:00-05:00 | NA | Attachments Metadata : …Science And Democracy At The Union Of Concerned Scientists (CSD) Texas <endeca_term>Environmental</endeca_term> <endeca_term>Justice</endeca_term> Advocacy Services (TEJAS) Please contact the EPA Docket Center, Public Reading Room… | 2060-AU84 | NA |
Comment on FR Doc # 2020-23526 | ED | FALSE | 1 | NA | NA | Attached please find comments from the American Council on Education and 26 higher education associations on the notification of interpretation, request for comments on the Departments enforcement authority for failure to adequately report under Section 117, Docket Number: ED-2020-OGC-0165. | ED-2020-OGC-0165 | The Department’s Enforcement Authority for Failure to Adequately Report under Section 117 of the Higher Education Act of 1965, As Amended | Nonrulemaking | ED-2020-OGC-0165-0014 | Posted | Public Submission | 1 | FALSE | 2020-12-16T00:00:00-05:00 | Anonymous Anonymous | Attachment Contents : …institution to the Department of <endeca_term>Justice</endeca_term> to compel compliance. In addition…with the Administrator of the <endeca_term>Environmental</endeca_term> Protection Agency” to conduct a… | NA | American Council on Education |
Comment submitted by Neil Gormley, Earthjustice et al. (part 3 of 3) | EPA | FALSE | 20 | NA | NA |
Earthjustice submits these attachments on behalf of Earthjustice, t.e.j.a.s., Sierra Club, Appalachian Mountain Club, Environmental Defense Fund, Chesapeake Bay Foundation, Clean Air Task Force, Downwinders at Risk, Natural Resources Defense Council, Clean Wisconsin, Air Alliance Houston, and Environmental Law and Policy Center. (3 of 3) |
EPA-HQ-OAR-2020-0272 | Revised Cross-State Air Pollution Rule Update for the 2008 Ozone NAAQS | Rulemaking | EPA-HQ-OAR-2020-0272-0149 | Posted | Public Submission | 1 | FALSE | 2020-12-16T00:00:00-05:00 | NA | Abstract : Other submitters are: Texas <endeca_term>Environmental</endeca_term> <endeca_term>Justice</endeca_term> Advocacy Services (t.e.j.a.s.), Sierra Club, Appalachian Mountain Club, Environmental Defense Fund, Chesapeake Bay Foundation, Clean… | 2060-AU84 | NA |
Comment submitted by Neil Gormley, Earthjustice et al. (part 1 of 2) | EPA | FALSE | 6 | NA | NA |
Earthjustice submits this comment letter and attachments on behalf of Earthjustice, t.e.j.a.s., Sierra Club, Appalachian Mountain Club, Environmental Defense Fund, Chesapeake Bay Foundation, Clean Air Task Force, Downwinders at Risk, Natural Resources Defense Council, Clean Wisconsin, Air Alliance Houston, and Environmental Law and Policy Center. (1 of 3) |
EPA-HQ-OAR-2020-0272 | Revised Cross-State Air Pollution Rule Update for the 2008 Ozone NAAQS | Rulemaking | EPA-HQ-OAR-2020-0272-0147 | Posted | Public Submission | 1 | FALSE | 2020-12-16T00:00:00-05:00 | NA | Attachment Contents : …health, environmental, and economic impacts of ozone pollution, which disproportionately burden <endeca_term>environmental</endeca_term> <endeca_term>justice</endeca_term> communities. While we support EPA’s decision to require incremental reductions in… | 2060-AU84 | NA |
Comment submitted by Environmental Defense Fund (EDF) et al. | EPA | FALSE | 20 | NA | NA | On behalf of Environmental Defense Fund, Institute for Policy Integrity at New York University School of Law (“Policy Integrity”), Montana Environmental Information Center, Natural Resources Defense Council, Sierra Club, Union of Concerned Scientists, and Western Environmental Law Center, Policy Integrity respectfully submits the attached comments and accompanying documentation. | EPA-HQ-OAR-2020-0272 | Revised Cross-State Air Pollution Rule Update for the 2008 Ozone NAAQS | Rulemaking | EPA-HQ-OAR-2020-0272-0144 | Posted | Public Submission | 1 | FALSE | 2020-12-16T00:00:00-05:00 | NA | Attachment contents : December 14, 2020 Via Regulations.gov To: <endeca_term>Environmental</endeca_term> Protection Agency Subject: Improper Valuation of Climate Effects in the Proposed Revised Cross-State… | 2060-AU84 | NA |
$postedDate %<>% as.Date()
d$commentStartDate %<>% as.Date()
d
ggplot(d) +
aes(x = postedDate, fill = documentType) +
geom_histogram() +
labs(title = str_c("Documents containing \"", keywords, "\""))