yes-man-today commited on
Commit
6a48e5d
2 Parent(s): a633346 9665a58

Merge branch 'main' of hf.co:datasets/ro-h/regulatory_comments_api

Browse files
Files changed (1) hide show
  1. README.md +112 -0
README.md ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dataset Card for Dataset Name
2
+
3
+ United States governmental agencies often make proposed regulations open to the public for comment.
4
+ Proposed regulations are organized into "dockets". This dataset will use Regulation.gov public API
5
+ to aggregate and clean public comments for dockets that mention opioid use.
6
+
7
+ Each example will consist of one docket, and include metadata such as docket id, docket title, etc.
8
+ Each docket entry will also include information about the top 10 comments, including comment metadata
9
+ and comment text.
10
+
11
+ In this version, the data is called directly from the API, which can result in slow load times.
12
+ If the user wants to simply load a pre-downloaded dataset,
13
+ reference https://huggingface.co/datasets/ro-h/regulatory_comments.
14
+
15
+ ## Dataset Details
16
+
17
+ ### Dataset Description and Structure
18
+
19
+ This dataset will call the API to individually gather docket and comment information; data collection will stop when
20
+ all dockets with opioid-related information have been gathered, or when the API hits a rate-limit. The government
21
+ API limit is 1000 calls per hour. Since each comment's text requires an individual call and there will be ~10 comments collected per docket,
22
+ only around 100 dockets can be collected without extending the limit. Furthermore, since some dockets don't have comment data and
23
+ thus will not be included, it is realistic to expect approximatley 60-70 dockets collected.
24
+
25
+ If a larger set of dockets are required, consider requesting a rate-unlimited API key. For more details, visit
26
+ [https://open.gsa.gov/api/regulationsgov/].
27
+
28
+ The following information is included in this dataset:
29
+
30
+ **Docket Metadata**
31
+ id (int): A unique numerical identifier assigned to each regulatory docket.
32
+ 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.
33
+ context (str): The date when the docket was last modified on Regulations.gov.
34
+ purpose (str): Whether the docket was rulemaking, non-rulemaking, or other.
35
+ keywords (list): A string of keywords, as determined by Regulations.gov.
36
+
37
+ **Comment Metadata**
38
+ comment_id (int): A unique numerical identifier for each public comment submitted on the docket.
39
+ comment_title (str): The title or subject line of the individual public comment.
40
+ 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.
41
+ comment_date (str): The date when the comment was posted on Regulations.gov. This is important for understanding the timeline of public engagement.
42
+ 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.
43
+ commenter_lname (str): The last name of the individual or entity that submitted the comment.
44
+ comment_length (int): The length of the comment in terms of the number of characters (spaces included)
45
+
46
+ **Comment Content**
47
+ 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.
48
+
49
+ - **Curated by:** Ro Huang
50
+
51
+ ### Dataset Sources
52
+
53
+ - **Repository:** [https://huggingface.co/datasets/ro-h/regulatory_comments_api]
54
+ - **Original Website:** [https://www.regulations.gov/]
55
+ - **API Website:** [https://open.gsa.gov/api/regulationsgov/]
56
+
57
+ ## Uses
58
+
59
+ This dataset may be used by researchers or policy-stakeholders curious about the influence of
60
+ public comments on regulation development. For example, sentiment analysis may be run on
61
+ comment text; alternatively, simple descriptive analysis on the comment length and agency regulation
62
+ may prove interesting.
63
+
64
+ ## Dataset Creation
65
+
66
+ ### Curation Rationale
67
+
68
+ After a law is passed, it may require specific details or guidelines to be practically enforceable or operable.
69
+ Federal agencies and the Executive branch engage in rulemaking, which specify the practical ways that legislation
70
+ can get turned into reality. Then, they will open a Public Comment period in which they will receive comments,
71
+ suggestions, and questions on the regulations they proposed. After taking in the feedback, the agency will modify their
72
+ regulation and post a final rule.
73
+
74
+ As an example, imagine that the legislative branch of the government passes a bill to increase the number of hospitals
75
+ nationwide. While the Congressman drafting the bill may have provided some general guidelines (e.g., there should be at
76
+ least one hospital in a zip code), there is oftentimes ambiguity on how the bill’s goals should be achieved.
77
+ The Department of Health and Human Services is tasked with implementing this new law, given its relevance to national
78
+ healthcare infrastructure. The agency would draft and publish a set of proposed rules, which might include criteria for
79
+ where new hospitals can be built, standards for hospital facilities, and the process for applying for federal funding.
80
+ During the Public Comment period, healthcare providers, local governments, and the public can provide feedback or express
81
+ concerns about the proposed rules. The agency will then read through these public comments, and modify their regulation
82
+ accordingly.
83
+
84
+ While this is a vital part of the United States regulatory process, there is little understanding of how agencies approach
85
+ public comments and modify their proposed regulations. Further, the data extracted from the API is often unclean and difficult
86
+ to navigate. This dataset seeks to offer some clarity through aggregating comments related to Opioid Use Disorders,
87
+ an issue that a diversity of stakeholders have investment in.
88
+
89
+ #### Data Collection and Processing
90
+
91
+ **Filtering Methods:**
92
+ For each docket, we retrieve relevant metadata such as docket ID,
93
+ title, context, purpose, and keywords. Additionally, the top 10 comments
94
+ for each docket are collected, including their metadata (comment ID, URL, date,
95
+ title, commenter's first and last name) and the comment text itself. The process
96
+ focuses on the first page of 25 comments for each docket, and the top 10 comments
97
+ are selected based on their order of appearance in the API response.
98
+
99
+ **Data Normalization:**
100
+ The collected data is normalized into a structured format. Each docket and
101
+ its associated comments are organized into a nested dictionary structure.
102
+ This structure includes key information about the docket and a list of comments,
103
+ each with its detailed metadata.
104
+
105
+ **Tools and Libraries Used:**
106
+ Requests Library: Used for making API calls to the Regulations.gov API to fetch dockets and comments data.
107
+ Datasets Library from HuggingFace: Employed for defining and managing the dataset's structure and generation process.
108
+ Python: The entire data collection and processing script is written in Python.
109
+
110
+ **Error Handling:**
111
+ In the event of a failed API request (indicated by a non-200 HTTP response status),
112
+ the data collection process for the current docket is halted, and the process moves to the next docket.