{ "cells": [ { "cell_type": "code", "execution_count": 31, "id": "6c4898b7", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import json\n", "from pathlib import Path\n", "from datasets import load_dataset" ] }, { "cell_type": "code", "execution_count": 2, "id": "e8f4075f", "metadata": {}, "outputs": [], "source": [ "# !ls records/session/118/bill/hr1.*\n", "base = Path(\"records/session/118/bill\")" ] }, { "cell_type": "code", "execution_count": 3, "id": "423587ee", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "16971" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "bills = sorted(list(base.glob('*')))\n", "len(bills)" ] }, { "cell_type": "code", "execution_count": 4, "id": "980385c7", "metadata": {}, "outputs": [], "source": [ "p = bills[0]" ] }, { "cell_type": "code", "execution_count": 5, "id": "d3f4a030", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['hconres1', '2023-03-17T17-45-06Z']" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p.parts[-1].split('.')" ] }, { "cell_type": "code", "execution_count": 6, "id": "0c7c740b", "metadata": {}, "outputs": [], "source": [ "bits = []\n", "for p in bills:\n", " bits.append([p, *p.parts[-1].split('.')])" ] }, { "cell_type": "code", "execution_count": 7, "id": "028480f8", "metadata": {}, "outputs": [], "source": [ "paths = pd.DataFrame(bits, columns=['path', 'key', 'date']).sort_values(['key', 'date'])" ] }, { "cell_type": "code", "execution_count": 8, "id": "4f0f546b", "metadata": {}, "outputs": [], "source": [ "measures = paths.groupby('key').last()" ] }, { "cell_type": "code", "execution_count": 25, "id": "84f1767f", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | actions | \n", "amendments | \n", "committees | \n", "cosponsors | \n", "index | \n", "relatedbills | \n", "subjects | \n", "summaries | \n", "text | \n", "titles | \n", "
---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "{'actions': [{'actionDate': '2023-01-23', 'sou... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [], 'request': {'billNumber': '... | \n", "{'cosponsors': [], 'pagination': {'count': 0, ... | \n", "{'bill': {'actions': {'count': 7, 'url': 'http... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
1 | \n", "{'actions': [{'actionCode': 'H11100', 'actionD... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'P000605', 'dis... | \n", "{'bill': {'actions': {'count': 4, 'url': 'http... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
2 | \n", "{'actions': [{'actionDate': '2023-02-02', 'sou... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [], 'request': {'billNumber': '... | \n", "{'cosponsors': [], 'pagination': {'count': 0, ... | \n", "{'bill': {'actions': {'count': 10, 'url': 'htt... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 3}, 'request': {'bill... | \n", "{'pagination': {'count': 3}, 'request': {'bill... | \n", "{'pagination': {'count': 3}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
3 | \n", "{'actions': [{'actionCode': 'H11000', 'actionD... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'K000380', 'dis... | \n", "{'bill': {'actions': {'count': 5, 'url': 'http... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 6}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
4 | \n", "{'actions': [{'actionCode': 'H11100', 'actionD... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'C001066', 'dis... | \n", "{'bill': {'actions': {'count': 3, 'url': 'http... | \n", "{'pagination': {'count': 1}, 'relatedBills': [... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
6070 | \n", "{'actions': [{'actionDate': '2023-03-07', 'com... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'W000817', 'fir... | \n", "{'bill': {'actions': {'count': 2, 'url': 'http... | \n", "{'pagination': {'count': 1}, 'relatedBills': [... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 0}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
6071 | \n", "{'actions': [{'actionDate': '2023-03-08', 'com... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'C000141', 'fir... | \n", "{'bill': {'actions': {'count': 2, 'url': 'http... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
6072 | \n", "{'actions': [{'actionDate': '2023-03-08', 'com... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'H000601', 'fir... | \n", "{'bill': {'actions': {'count': 2, 'url': 'http... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 0}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
6073 | \n", "{'actions': [{'actionDate': '2023-03-08', 'com... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'B001267', 'fir... | \n", "{'bill': {'actions': {'count': 2, 'url': 'http... | \n", "{'pagination': {'count': 1}, 'relatedBills': [... | \n", "{'pagination': {'count': 5}, 'request': {'bill... | \n", "{'pagination': {'count': 0}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
6074 | \n", "{'actions': [{'actionDate': '2023-05-10', 'sou... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'C001035', 'fir... | \n", "{'bill': {'actions': {'count': 7, 'url': 'http... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 11}, 'request': {'bil... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
6075 rows × 10 columns
\n", "\n", " | key | \n", "title | \n", "sponsor | \n", "actions | \n", "amendments | \n", "committees | \n", "cosponsors | \n", "index | \n", "relatedbills | \n", "subjects | \n", "summaries | \n", "text | \n", "titles | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "118HCONRES1 | \n", "Regarding consent to assemble outside the seat... | \n", "Rep. Cole, Tom [R-OK-4] | \n", "{'actions': [{'actionDate': '2023-01-23', 'sou... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [], 'request': {'billNumber': '... | \n", "{'cosponsors': [], 'pagination': {'count': 0, ... | \n", "{'bill': {'actions': {'count': 7, 'url': 'http... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
1 | \n", "118HCONRES10 | \n", "Expressing the sense of Congress that the Unit... | \n", "Rep. Tiffany, Thomas P. [R-WI-7] | \n", "{'actions': [{'actionCode': 'H11100', 'actionD... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'P000605', 'dis... | \n", "{'bill': {'actions': {'count': 4, 'url': 'http... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
2 | \n", "118HCONRES11 | \n", "Providing for a joint session of Congress to r... | \n", "Rep. Scalise, Steve [R-LA-1] | \n", "{'actions': [{'actionDate': '2023-02-02', 'sou... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [], 'request': {'billNumber': '... | \n", "{'cosponsors': [], 'pagination': {'count': 0, ... | \n", "{'bill': {'actions': {'count': 10, 'url': 'htt... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 3}, 'request': {'bill... | \n", "{'pagination': {'count': 3}, 'request': {'bill... | \n", "{'pagination': {'count': 3}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
3 | \n", "118HCONRES12 | \n", "Expressing the sense of Congress that all dire... | \n", "Rep. Cammack, Kat [R-FL-3] | \n", "{'actions': [{'actionCode': 'H11000', 'actionD... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'K000380', 'dis... | \n", "{'bill': {'actions': {'count': 5, 'url': 'http... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 6}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
4 | \n", "118HCONRES13 | \n", "Supporting the Local Radio Freedom Act. | \n", "Rep. Womack, Steve [R-AR-3] | \n", "{'actions': [{'actionCode': 'H11100', 'actionD... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'C001066', 'dis... | \n", "{'bill': {'actions': {'count': 3, 'url': 'http... | \n", "{'pagination': {'count': 1}, 'relatedBills': [... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
6070 | \n", "118SRES95 | \n", "A resolution honoring the life of Dr. Paul Far... | \n", "Sen. Brown, Sherrod [D-OH] | \n", "{'actions': [{'actionDate': '2023-03-07', 'com... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'W000817', 'fir... | \n", "{'bill': {'actions': {'count': 2, 'url': 'http... | \n", "{'pagination': {'count': 1}, 'relatedBills': [... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 0}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
6071 | \n", "118SRES96 | \n", "A resolution celebrating the extraordinary acc... | \n", "Sen. Risch, James E. [R-ID] | \n", "{'actions': [{'actionDate': '2023-03-08', 'com... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'C000141', 'fir... | \n", "{'bill': {'actions': {'count': 2, 'url': 'http... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
6072 | \n", "118SRES97 | \n", "A resolution expressing concern about economic... | \n", "Sen. Risch, James E. [R-ID] | \n", "{'actions': [{'actionDate': '2023-03-08', 'com... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'H000601', 'fir... | \n", "{'bill': {'actions': {'count': 2, 'url': 'http... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 0}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
6073 | \n", "118SRES98 | \n", "A resolution declaring March 8, 2023, as \"Nati... | \n", "Sen. Hickenlooper, John W. [D-CO] | \n", "{'actions': [{'actionDate': '2023-03-08', 'com... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'B001267', 'fir... | \n", "{'bill': {'actions': {'count': 2, 'url': 'http... | \n", "{'pagination': {'count': 1}, 'relatedBills': [... | \n", "{'pagination': {'count': 5}, 'request': {'bill... | \n", "{'pagination': {'count': 0}, 'request': {'bill... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
6074 | \n", "118SRES99 | \n", "A resolution supporting the goals of Internati... | \n", "Sen. Shaheen, Jeanne [D-NH] | \n", "{'actions': [{'actionDate': '2023-05-10', 'sou... | \n", "{'amendments': [], 'pagination': {'count': 0},... | \n", "{'committees': [{'activities': [{'date': '2023... | \n", "{'cosponsors': [{'bioguideId': 'C001035', 'fir... | \n", "{'bill': {'actions': {'count': 7, 'url': 'http... | \n", "{'pagination': {'count': 0}, 'relatedBills': [... | \n", "{'pagination': {'count': 11}, 'request': {'bil... | \n", "{'pagination': {'count': 1}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "{'pagination': {'count': 2}, 'request': {'bill... | \n", "
6075 rows × 13 columns
\n", "