File size: 7,633 Bytes
bc46a9a
 
 
 
 
 
 
 
 
 
cf8c1d4
 
bc46a9a
8f154fa
 
 
 
 
 
 
 
 
 
f968251
 
 
 
 
8f154fa
 
 
 
 
 
82e723b
8f154fa
 
 
 
 
 
 
 
 
82e723b
8f154fa
82e723b
8f154fa
82e723b
8f154fa
82e723b
8f154fa
82e723b
 
8f154fa
 
82e723b
cf8c1d4
 
8f154fa
82e723b
8f154fa
82e723b
8f154fa
82e723b
8f154fa
82e723b
8f154fa
82e723b
8f154fa
82e723b
8f154fa
 
 
 
 
cf8c1d4
 
 
 
 
 
 
 
8f154fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bc46a9a
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
---
language:
- en
tags:
- government
- api
- policy
pretty_name: Regulation.gov Public Comments
size_categories:
- n<1K
task_categories:
- text-classification
---
# Dataset Card for Regulatory Comments (Predownloaded; No API Call)

United States governmental agencies often make proposed regulations open to the public for comment. 
Proposed regulations are organized into "dockets". This dataset will use Regulation.gov public API 
to aggregate and clean public comments for dockets that mention opioid use. 

Each example will consist of one docket, and include metadata such as docket id, docket title, etc. 
Each docket entry will also include information about the top 10 comments, including comment metadata
and comment text. 

In this version, the data has been preloaded and saved to the repository. 
Raw data can be found in docket_comments_all.json.
The code used to call the api can be found in api_call.py. 

If the user wants to call from the API
directly, reference [https://huggingface.co/datasets/ro-h/regulatory_comments_api].

## Dataset Details

### Dataset Description and Structure

This dataset will contain approximately 100 dockets. The number of dockets included are rate-limited by the
government API. If a larger set of dockets are required, consider requesting a rate-unlimited API key and 
directly calling from the API using [https://huggingface.co/datasets/ro-h/regulatory_comments_api].

Each docket will be associated with at least one comment. The maximum number of comments per docket is 10. 
Comments will be retrieved in relevance order according to Regulation.gov. 

The following information is included in this dataset: 

**Docket Metadata**

id (int): A unique numerical identifier assigned to each regulatory docket.

title (str): The official title or name of the regulatory docket. This title typically summarizes the main issue or area of regulation covered by the docket.

context (str): The date when the docket was last modified on Regulations.gov.

purpose (str): Whether the docket was rulemaking, non-rulemaking, or other.

keywords (list(str)): A list of string keywords, as determined by Regulations.gov.

**Comment Metadata**

Note that huggingface converts lists of dictionaries to dictionaries of lists.

comment_id (int): A unique numerical identifier for each public comment submitted on the docket.

comment_title (str): The title or subject line of the individual public comment.

comment_url (str): A URL or web link to the specific comment or docket on Regulations.gov. This allows direct access to the original document or page for replicability purposes.

comment_date (str): The date when the comment was posted on Regulations.gov. This is important for understanding the timeline of public engagement.

commenter_fname (str): The first name of the individual or entity that submitted the comment. This could be a person, organization, business, or government entity.

commenter_lname (str): The last name of the individual or entity that submitted the comment. 

comment_length (int): The length of the comment in terms of the number of characters (spaces included)

**Comment Content**
text (str): The actual text of the comment submitted. This is the primary content for analysis, containing the commenter's views, arguments, and feedback on the regulatory matter. 


### Dataset Limitations

Commenter name features were phased in later in the system, so some dockets will have no 
first name/last name entries. Further, some comments were uploaded solely via attachment,
and are stored in the system as null since the API has no access to comment attachments. However, many large companies will upload their 
comments via attachments, making any sentiment analysis biased towards individual commenters.

- **Curated by:** Ro Huang

### Dataset Sources

- **Repository:** [https://huggingface.co/datasets/ro-h/regulatory_comments_api]
- **Original Website:** [https://www.regulations.gov/]
- **API Website:** [https://open.gsa.gov/api/regulationsgov/]

## Uses

This dataset may be used by researchers or policy-stakeholders curious about the influence of 
public comments on regulation development. For example, sentiment analysis may be run on 
comment text; alternatively, simple descriptive analysis on the comment length and agency regulation
may prove interesting.

## Dataset Creation

### Curation Rationale

After a law is passed, it may require specific details or guidelines to be practically enforceable or operable. 
Federal agencies and the Executive branch engage in rulemaking, which specify the practical ways that legislation 
can get turned into reality. Then, they will open a Public Comment period in which they will receive comments, 
suggestions, and questions on the regulations they proposed. After taking in the feedback, the agency will modify their 
regulation and post a final rule.

As an example, imagine that the legislative branch of the government passes a bill to increase the number of hospitals 
nationwide. While the Congressman drafting the bill may have provided some general guidelines (e.g., there should be at 
least one hospital in a zip code), there is oftentimes ambiguity on how the bill’s goals should be achieved.
The Department of Health and Human Services is tasked with implementing this new law, given its relevance to national 
healthcare infrastructure. The agency would draft and publish a set of proposed rules, which might include criteria for 
where new hospitals can be built, standards for hospital facilities, and the process for applying for federal funding. 
During the Public Comment period, healthcare providers, local governments, and the public can provide feedback or express
concerns about the proposed rules. The agency will then read through these public comments, and modify their regulation 
accordingly.

While this is a vital part of the United States regulatory process, there is little understanding of how agencies approach
public comments and modify their proposed regulations. Further, the data extracted from the API is often unclean and difficult
to navigate. This dataset seeks to offer some clarity through aggregating comments related to Opioid Use Disorders, 
an issue that a diversity of stakeholders have investment in. 


#### Data Collection and Processing

**Filtering Methods:**
For each docket, we retrieve relevant metadata such as docket ID, 
title, context, purpose, and keywords. Additionally, the top 10 comments
for each docket are collected, including their metadata (comment ID, URL, date,
title, commenter's first and last name) and the comment text itself. The process 
focuses on the first page of 25 comments for each docket, and the top 10 comments 
are selected based on their order of appearance in the API response.

**Data Normalization:**
The collected data is normalized into a structured format. Each docket and 
its associated comments are organized into a nested dictionary structure. 
This structure includes key information about the docket and a list of comments,
each with its detailed metadata.

**Tools and Libraries Used:**
Requests Library: Used for making API calls to the Regulations.gov API to fetch dockets and comments data.
Datasets Library from HuggingFace: Employed for defining and managing the dataset's structure and generation process. 
Python: The entire data collection and processing script is written in Python.

**Error Handling:**
In the event of a failed API request (indicated by a non-200 HTTP response status), 
the data collection process for the current docket is halted, and the process moves to the next docket.