chrissoria/federal-bills-active
收藏资源简介:
--- configs: - config_name: default data_files: - split: train path: data/train-* dataset_info: features: - name: date_last_action dtype: string - name: date_introduced dtype: string - name: title dtype: string - name: text dtype: string - name: policy_area dtype: string - name: summary_bullets dtype: string - name: short_summary dtype: string - name: sponsor_full_name dtype: string - name: sponsor_party dtype: string - name: sponsor_state dtype: string - name: num_cosponsors dtype: int64 - name: chamber_of_origin dtype: string - name: republican_yeas dtype: float64 - name: democrat_yeas dtype: float64 - name: republican_nays dtype: float64 - name: democrat_nays dtype: float64 - name: total_yeas dtype: float64 - name: total_nays dtype: float64 - name: republican_support_pct dtype: float64 - name: democrat_support_pct dtype: float64 - name: is_bipartisan dtype: bool - name: bill_type dtype: string - name: bill_number dtype: string - name: date_updated dtype: string - name: congress dtype: string - name: status dtype: string - name: last_action_text dtype: string - name: subjects dtype: string - name: bill_text_version dtype: string - name: url dtype: string - name: doc_type dtype: string - name: source dtype: string - name: threads_post dtype: string - name: public_law_number dtype: string - name: package_id dtype: string - name: pages dtype: string splits: - name: train num_bytes: 201421545 num_examples: 14606 download_size: 73203468 dataset_size: 201421545 --- # Federal Bills & Votes Datasets Two linked datasets tracking U.S. federal legislation in the 119th Congress (2025–2026): - **[chrissoria/federal-bills-active](https://huggingface.co/datasets/chrissoria/federal-bills-active)** — active 119th Congress bills with full text, status, sponsors, and bill-level vote breakdowns - **[chrissoria/federal-votes](https://huggingface.co/datasets/chrissoria/federal-votes)** — 56,569 individual legislator votes (alter-level) Both datasets update daily at 9:15 AM via automated pipeline. --- ## federal-bills-active — Codebook ### Date Columns | Column | Type | Description | |--------|------|-------------| | `date_last_action` | string | Date of the most recent action on the bill (YYYY-MM-DD). Dataset is sorted by this column, newest first. | | `date_introduced` | string | Date the bill was first introduced in its chamber of origin. | | `date_updated` | string | Date the record was last updated in the Congress.gov system. May reflect metadata changes, not substantive action. | ### Bill Identity | Column | Type | Description | |--------|------|-------------| | `bill_type` | string | Type of legislation. See values below. | | `bill_number` | string | Numeric identifier within the bill type (e.g., "7147"). | | `congress` | string | Congressional session number. "119" = 119th Congress (Jan 2025 – Jan 2027). | | `title` | string | Official long title of the bill. | | `short_title` | string | Popular/short title if available (often empty for bills in early stages). | | `status` | string | Current stage in the legislative process. See values below. | | `last_action_text` | string | Full text of the most recent action (e.g., "Referred to the Committee on the Judiciary."). | #### `bill_type` Values | Value | Meaning | Count | |-------|---------|-------| | `HR` | House Bill — standard legislation originating in the House | 1,519 | | `S` | Senate Bill — standard legislation originating in the Senate | 665 | | `HRES` | House Resolution — non-binding, House-only (rules, opinions) | 154 | | `SRES` | Senate Resolution — non-binding, Senate-only | 89 | | `HJRES` | House Joint Resolution — binding, requires both chambers + President (often constitutional amendments) | 60 | | `SJRES` | Senate Joint Resolution — same as HJRES but originates in Senate | 23 | | `HCONRES` | House Concurrent Resolution — non-binding, both chambers (budget, adjournment) | 14 | | `SCONRES` | Senate Concurrent Resolution — same as HCONRES but originates in Senate | 7 | #### `status` Values (Legislative Pipeline) Listed in order of the legislative process: | Value | Meaning | Count | |-------|---------|-------| | `Introduced` | Filed but no committee assignment yet | 11 | | `In Committee` | Referred to one or more committees for review | 2,051 | | `Reported from Committee` | Committee approved the bill (voted to report it) | 62 | | `Calendared` | Placed on the chamber's legislative calendar (scheduled for floor action) | 100 | | `Passed House` | Approved by the House of Representatives | 173 | | `Passed Senate` | Approved by the Senate | 88 | | `Senate Floor` | Active on the Senate floor (cloture votes, debate) but not yet passed | 4 | | `Signed into Law` | Passed both chambers and signed by the President | 40 | | `Vetoed` | Passed both chambers but vetoed by the President | 2 | ### Sponsor Information | Column | Type | Description | |--------|------|-------------| | `sponsor_full_name` | string | Full name with title, party, and state (e.g., "Rep. Cole, Tom [R-OK-4]"). | | `sponsor_party` | string | Party of the bill's primary sponsor: `R` (Republican), `D` (Democrat), `I` (Independent). | | `sponsor_state` | string | Two-letter state abbreviation of the sponsor. | | `num_cosponsors` | int | Number of cosponsors who signed onto the bill. | | `chamber_of_origin` | string | `House` or `Senate` — where the bill was introduced. | ### Classification | Column | Type | Description | |--------|------|-------------| | `policy_area` | string | Primary policy area assigned by CRS (Congressional Research Service). Top areas: Taxation, Government Operations, Health, Armed Forces, Crime, International Affairs. | | `subjects` | string | Semicolon-separated list of subject terms (e.g., "Immigration; Border security; Department of Homeland Security"). | ### Vote Data (Selected Roll Call) These columns are derived from `federal-votes` by selecting one best-available roll call per bill, prioritizing passage-like votes over procedural votes and falling back to the latest recorded floor vote when needed. Null for bills with no recorded roll call in the votes dataset. | Column | Type | Description | |--------|------|-------------| | `republican_yeas` | float | Number of Republican Yea/Aye votes on the selected roll call. | | `democrat_yeas` | float | Number of Democrat Yea/Aye votes on the selected roll call. | | `republican_nays` | float | Number of Republican Nay/No votes on the selected roll call. | | `democrat_nays` | float | Number of Democrat Nay/No votes on the selected roll call. | | `total_yeas` | float | Total Yea/Aye votes across all parties on the selected roll call. | | `total_nays` | float | Total Nay/No votes across all parties on the selected roll call. | | `republican_support_pct` | float | Percentage of voting Republicans who voted Yea (0–100). | | `democrat_support_pct` | float | Percentage of voting Democrats who voted Yea (0–100). | | `is_bipartisan` | bool | `True` if both parties had >10% support. | ### Text and Metadata | Column | Type | Description | |--------|------|-------------| | `text` | string | Full text of the bill (latest version). Plain text extracted from Congress.gov. | | `bill_text_version` | string | Version of the text (e.g., "Introduced in House", "Engrossed in House", "Enrolled Bill"). | | `url` | string | Link to the bill page on congress.gov. | | `doc_type` | string | Always "bill" in this dataset. | | `source` | string | Always "federal_bills_active". | --- ## federal-votes — Codebook One row per legislator per roll call vote (alter-level data). Join to bills on `bill_type` + `bill_number` + `congress`. | Column | Type | Description | |--------|------|-------------| | `date_of_vote` | string | Date the roll call vote occurred (YYYY-MM-DD). Dataset sorted newest first. | | `bill_type` | string | Bill type (HR, S, HJRES, etc.). Foreign key to bills dataset. | | `bill_number` | string | Bill number. Foreign key to bills dataset. | | `congress` | string | Congressional session ("119"). | | `chamber` | string | `House` or `Senate` — where this vote took place. | | `roll_call_number` | int | Official roll call number for the session. | | `vote_type` | string | What was being voted on. See values below. | | `vote_outcome` | string | Result of the vote: `Passed`, `Failed`, `Cloture on the Motion to Proceed Rejected`, or empty. | | `legislator_full_name` | string | Legislator's name (House: last name only; Senate: "Last, First"). | | `legislator_id` | string | Official ID (House: name-id attribute; Senate: LIS member ID). | | `party` | string | `R` (Republican), `D` (Democrat), or `I` (Independent). | | `state` | string | Two-letter state abbreviation. | | `district` | string | Congressional district number (House only; empty for Senate). | | `vote` | string | Individual vote cast. See values below. | | `total_yeas` | int | Total Yea votes on this roll call (all legislators). | | `total_nays` | int | Total Nay votes on this roll call (all legislators). | #### `vote` Values | Value | Meaning | Count | |-------|---------|-------| | `Yea` | Voted in favor (Senate and some House votes) | 37,250 | | `Nay` | Voted against (Senate and some House votes) | 14,679 | | `Aye` | Voted in favor (House suspension votes) | 1,288 | | `No` | Voted against (House suspension votes) | 1,239 | | `Not Voting` | Did not vote (absent, abstained, or recused) | 2,100 | | `Present` | Voted "present" (neither for nor against) | 13 | #### `vote_type` Values (Top 10) | Value | Meaning | Count | |-------|---------|-------| | `On Passage` | Final vote on whether to pass the bill | 17,302 | | `On Motion to Suspend the Rules and Pass` | Expedited passage (2/3 majority required, no amendments) | 15,141 | | `On Motion to Suspend the Rules and Pass, as Amended` | Same as above, with amendments | 6,045 | | `On Motion to Recommit` | Vote to send bill back to committee (usually fails) | 5,626 | | `On the Motion` | General procedural motion | 1,800 | | `On Ordering the Previous Question` | House procedural vote to end debate | 1,733 | | `On Agreeing to the Resolution` | Vote on a resolution | 1,733 | | `On the Motion to Proceed` | Senate vote to begin debate on a bill | 1,498 | | `On the Joint Resolution` | Vote on a joint resolution | 1,200 | | `On Cloture on the Motion to Proceed` | Senate vote to overcome filibuster (60 votes needed) | 1,199 | --- ## Joining the Datasets ```python import pandas as pd from datasets import load_dataset bills = load_dataset("chrissoria/federal-bills-active", split="train").to_pandas() votes = load_dataset("chrissoria/federal-votes", split="train").to_pandas() # Join: get all individual votes for a specific bill hr7147_votes = votes[(votes["bill_type"] == "HR") & (votes["bill_number"] == "7147")] # Voting pattern by party hr7147_votes.groupby(["party", "vote"]).size().unstack(fill_value=0) # Join bills with vote summary merged = bills.merge( votes.groupby(["bill_type", "bill_number"]).size().reset_index(name="num_votes"), on=["bill_type", "bill_number"], how="left" ) ``` --- ## Data Source - **API**: [Congress.gov API](https://api.congress.gov/) (bill metadata, actions, subjects, text) - **House Roll Calls**: [clerk.house.gov](https://clerk.house.gov/) (XML) - **Senate Roll Calls**: [senate.gov](https://www.senate.gov/legislative/votes.htm) (XML) - **Update frequency**: Daily at 9:15 AM PT (incremental) - **Coverage**: 119th Congress (January 2025 – present) ## License GPL-3.0-or-later
configs: - config_name: "default" data_files: - split: train path: data/train-* dataset_info: features: - name: date_last_action dtype: string - name: date_introduced dtype: string - name: title dtype: string - name: text dtype: string - name: policy_area dtype: string - name: summary_bullets dtype: string - name: short_summary dtype: string - name: sponsor_full_name dtype: string - name: sponsor_party dtype: string - name: sponsor_state dtype: string - name: num_cosponsors dtype: int64 - name: chamber_of_origin dtype: string - name: republican_yeas dtype: float64 - name: democrat_yeas dtype: float64 - name: republican_nays dtype: float64 - name: democrat_nays dtype: float64 - name: total_yeas dtype: float64 - name: total_nays dtype: float64 - name: republican_support_pct dtype: float64 - name: democrat_support_pct dtype: float64 - name: is_bipartisan dtype: bool - name: bill_type dtype: string - name: bill_number dtype: string - name: date_updated dtype: string - name: congress dtype: string - name: status dtype: string - name: last_action_text dtype: string - name: subjects dtype: string - name: bill_text_version dtype: string - name: url dtype: string - name: doc_type dtype: string - name: source dtype: string - name: threads_post dtype: string - name: public_law_number dtype: string - name: package_id dtype: string - name: pages dtype: string splits: - name: train num_bytes: 201421545 num_examples: 14606 download_size: 73203468 dataset_size: 201421545 --- # 联邦法案与投票数据集 两个关联数据集,追踪第119届美国国会(2025–2026年)的联邦立法进程: - **[chrissoria/federal-bills-active](https://huggingface.co/datasets/chrissoria/federal-bills-active)** — 收录第119届国会活跃法案,包含完整文本、立法状态、提案人信息及法案级投票统计 - **[chrissoria/federal-votes](https://huggingface.co/datasets/chrissoria/federal-votes)** — 包含56,569条议员个体投票记录(议员级细粒度数据) 两个数据集每日上午9:15通过自动化流水线更新。 --- ## federal-bills-active — 代码手册 ### 日期字段 | 字段名 | 数据类型 | 说明 | |--------|------|-------------| | `date_last_action` | 字符串 | 法案最新行动发生日期(格式:YYYY-MM-DD)。数据集按该字段降序排列,最新数据优先。 | | `date_introduced` | 字符串 | 法案在提案议院首次提交的日期。 | | `date_updated` | 字符串 | 该记录在Congress.gov系统中的最后更新日期。可能仅反映元数据变更,而非法案实质行动。 | ### 法案标识 | 字段名 | 数据类型 | 说明 | |--------|------|-------------| | `bill_type` | 字符串 | 立法类型,详见下文取值说明。 | | `bill_number` | 字符串 | 对应法案类型下的数字标识符(例如:"7147")。 | | `congress` | 字符串 | 国会届数编号。"119" 代表第119届国会(2025年1月–2027年1月)。 | | `title` | 字符串 | 法案正式长标题。 | | `short_title` | 字符串 | 法案通俗/短标题(法案初期阶段通常为空)。 | | `status` | 字符串 | 立法进程当前所处阶段,详见下文取值说明。 | | `last_action_text` | 字符串 | 最新法案行动的完整文本(例如:"已提交至司法委员会审议")。 | #### `bill_type` 可选取值 | 取值 | 含义 | 数量 | |-------|---------|-------| | `HR` | 众议院法案(House Bill) — 起源于众议院的标准立法 | 1,519 | | `S` | 参议院法案(Senate Bill) — 起源于参议院的标准立法 | 665 | | `HRES` | 众议院决议案(House Resolution) — 无约束力的众议院专属法案(用于规则制定、表达意见等) | 154 | | `SRES` | 参议院决议案(Senate Resolution) — 无约束力的参议院专属法案 | 89 | | `HJRES` | 众议院联合决议案(House Joint Resolution) — 有约束力,需参众两院通过并经总统签署(通常用于宪法修正案) | 60 | | `SJRES` | 参议院联合决议案(Senate Joint Resolution) — 与HJRES规则一致,起源于参议院 | 23 | | `HCONRES` | 众议院协同决议案(House Concurrent Resolution) — 无约束力,需参众两院通过(用于预算、休会等事项) | 14 | | `SCONRES` | 参议院协同决议案(Senate Concurrent Resolution) — 与HCONRES规则一致,起源于参议院 | 7 | #### `status` 可选取值(立法流程阶段) 按立法流程顺序列出: | 取值 | 含义 | 数量 | |-------|---------|-------| | `Introduced` | 已提交,但尚未分配委员会 | 11 | | `In Committee` | 已提交至一个或多个委员会审议 | 2,051 | | `Reported from Committee` | 委员会审议通过该法案(表决同意提交全院) | 62 | | `Calendared` | 已列入议院立法日程(安排全院表决) | 100 | | `Passed House` | 获众议院表决通过 | 173 | | `Passed Senate` | 获参议院表决通过 | 88 | | `Senate Floor` | 正处于参议院全院流程(包括终结辩论投票、辩论环节等),尚未通过 | 4 | | `Signed into Law` | 已获参众两院通过并经总统签署成为法律 | 40 | | `Vetoed` | 已获参众两院通过,但被总统否决 | 2 | ### 提案人信息 | 字段名 | 数据类型 | 说明 | |--------|------|-------------| | `sponsor_full_name` | 字符串 | 提案人全名,包含头衔、党派及所在州(例如:"Rep. Cole, Tom [R-OK-4]")。 | | `sponsor_party` | 字符串 | 法案主提案人的党派:`R`(共和党)、`D`(民主党)、`I`(无党派)。 | | `sponsor_state` | 字符串 | 提案人所在州的两字母缩写。 | | `num_cosponsors` | 整数 | 签署联名支持该法案的共同提案人数。 | | `chamber_of_origin` | 字符串 | `House`(众议院)或`Senate`(参议院)—— 法案首次提交的议院。 | ### 分类信息 | 字段名 | 数据类型 | 说明 | |--------|------|-------------| | `policy_area` | 字符串 | 美国国会研究服务处(Congressional Research Service, CRS)指定的核心政策领域。热门领域包括:税收、政府运作、医疗、武装部队、犯罪、国际事务。 | | `subjects` | 字符串 | 分号分隔的主题标签列表(例如:"移民;边境安全;国土安全部")。 | ### 投票数据(精选唱名投票) 这些字段源自`federal-votes`数据集,为每个法案选取一条最优唱名投票记录:优先选择与法案通过相关的表决而非程序性投票,若无相关记录则采用最新的全院表决记录。无对应唱名投票记录的法案此字段为空。 | 字段名 | 数据类型 | 说明 | |--------|------|-------------| | `republican_yeas` | 浮点数 | 本次精选投票中共和党议员的赞成票数量。 | | `democrat_yeas` | 浮点数 | 本次精选投票中民主党议员的赞成票数量。 | | `republican_nays` | 浮点数 | 本次精选投票中共和党议员的反对票数量。 | | `democrat_nays` | 浮点数 | 本次精选投票中民主党议员的反对票数量。 | | `total_yeas` | 浮点数 | 本次精选投票中所有党派的总赞成票数量。 | | `total_nays` | 浮点数 | 本次精选投票中所有党派的总反对票数量。 | | `republican_support_pct` | 浮点数 | 参与投票的共和党议员中投赞成票的占比(0–100)。 | | `democrat_support_pct` | 浮点数 | 参与投票的民主党议员中投赞成票的占比(0–100)。 | | `is_bipartisan` | 布尔值 | 若两党支持率均超过10%,则取值为`True`。 | ### 文本与元数据 | 字段名 | 数据类型 | 说明 | |--------|------|-------------| | `text` | 字符串 | 法案的最新完整文本,从Congress.gov提取的纯文本格式。 | | `bill_text_version` | 字符串 | 法案文本的版本(例如:"众议院提交版本"、"众议院定稿版本"、"最终 enrolled 法案版本")。 | | `url` | 字符串 | 指向congress.gov法案详情页的链接。 | | `doc_type` | 字符串 | 本数据集内固定取值为"bill"。 | | `source` | 字符串 | 本数据集内固定取值为"federal_bills_active"。 | --- ## federal-votes — 代码手册 ### 数据集说明 本数据集每条记录对应一位议员在单次唱名投票中的表决结果(议员级细粒度数据)。可通过`bill_type` + `bill_number` + `congress`与法案数据集进行关联。 | 字段名 | 数据类型 | 说明 | |--------|------|-------------| | `date_of_vote` | 字符串 | 唱名投票发生日期(格式:YYYY-MM-DD)。数据集按该字段降序排列,最新数据优先。 | | `bill_type` | 字符串 | 法案类型,为法案数据集的外键。 | | `bill_number` | 字符串 | 法案编号,为法案数据集的外键。 | | `congress` | 字符串 | 国会届数(例如:"119")。 | | `chamber` | 字符串 | `House`(众议院)或`Senate`(参议院)—— 本次投票所在议院。 | | `roll_call_number` | 整数 | 本届国会的官方唱名投票编号。 | | `vote_type` | 字符串 | 本次表决的议题类型,详见下文取值说明。 | | `vote_outcome` | 字符串 | 表决结果:`Passed`(通过)、`Failed`(否决)、`Cloture on the Motion to Proceed Rejected`(终结辩论动议被否决)或空值。 | | `legislator_full_name` | 字符串 | 议员全名(众议院仅显示姓氏;参议院格式为"姓氏, 名字")。 | | `legislator_id` | 字符串 | 官方议员ID(众议院采用name-id属性;参议院采用LIS议员ID)。 | | `party` | 字符串 | `R`(共和党)、`D`(民主党)或`I`(无党派)。 | | `state` | 字符串 | 议员所在州的两字母缩写。 | | `district` | 字符串 | 国会选区编号(仅众议院议员有此字段;参议院议员为空)。 | | `vote` | 字符串 | 议员的个人表决意向,详见下文取值说明。 | | `total_yeas` | 整数 | 本次唱名投票的总赞成票数量(所有议员)。 | | `total_nays` | 整数 | 本次唱名投票的总反对票数量(所有议员)。 | #### `vote` 可选取值 | 取值 | 含义 | 数量 | |-------|---------|-------| | `Yea` | 投赞成票(参议院及部分众议院表决使用) | 37,250 | | `Nay` | 投反对票(参议院及部分众议院表决使用) | 14,679 | | `Aye` | 投赞成票(众议院暂停规则表决使用) | 1,288 | | `No` | 投反对票(众议院暂停规则表决使用) | 1,239 | | `Not Voting` | 未参与投票(缺席、弃权或回避) | 2,100 | | `Present` | 投"出席"票(不明确支持或反对) | 13 | #### `vote_type` 可选取值(TOP10) | 取值 | 含义 | 数量 | |-------|---------|-------| | `On Passage` | 法案最终通过表决 | 17,302 | | `On Motion to Suspend the Rules and Pass` | 快速通过动议(需2/3多数支持,无修正案环节) | 15,141 | | `On Motion to Suspend the Rules and Pass, as Amended` | 带修正案的快速通过动议 | 6,045 | | `On Motion to Recommit` | 将法案退回委员会审议的动议(通常被否决) | 5,626 | | `On the Motion` | 一般性程序性动议 | 1,800 | | `On Ordering the Previous Question` | 众议院终结辩论的程序性表决 | 1,733 | | `On Agreeing to the Resolution` | 决议案表决 | 1,733 | | `On the Motion to Proceed` | 参议院启动法案辩论的动议 | 1,498 | | `On the Joint Resolution` | 联合决议案表决 | 1,200 | | `On Cloture on the Motion to Proceed` | 参议院终结辩论动议表决(需60票才能通过,打破阻挠议事) | 1,199 | --- ## 数据集关联方法 python import pandas as pd from datasets import load_dataset bills = load_dataset("chrissoria/federal-bills-active", split="train").to_pandas() votes = load_dataset("chrissoria/federal-votes", split="train").to_pandas() # 关联获取指定法案的所有个体投票记录 hr7147_votes = votes[(votes["bill_type"] == "HR") & (votes["bill_number"] == "7147")] # 按党派统计表决分布 hr7147_votes.groupby(["party", "vote"]).size().unstack(fill_value=0) # 关联法案与投票统计数据 merged = bills.merge( votes.groupby(["bill_type", "bill_number"]).size().reset_index(name="num_votes"), on=["bill_type", "bill_number"], how="left" ) --- ## 数据来源 - **API接口**:[Congress.gov API](https://api.congress.gov/)(用于获取法案元数据、行动记录、主题标签及全文) - **众议院唱名投票数据**:[clerk.house.gov](https://clerk.house.gov/)(XML格式) - **参议院唱名投票数据**:[senate.gov](https://www.senate.gov/legislative/votes.htm)(XML格式) - **更新频率**:太平洋时间每日上午9:15(增量更新) - **覆盖范围**:第119届国会(2025年1月至今) ## 许可协议 GPL-3.0-or-later




