Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,108 +1,101 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: odc-by
|
| 3 |
-
language:
|
| 4 |
-
- en
|
| 5 |
-
tags:
|
| 6 |
-
- politics
|
| 7 |
-
- campaign-finance
|
| 8 |
-
- elections
|
| 9 |
-
- ideology
|
| 10 |
-
- united-states
|
| 11 |
-
- political-science
|
| 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 |
-
- **This Parquet Conversion:** [Your contact info]
|
| 103 |
-
|
| 104 |
-
## Related Resources
|
| 105 |
-
|
| 106 |
-
- [DIME Homepage](https://data.stanford.edu/dime)
|
| 107 |
-
- [DIME PLUS](https://data.stanford.edu/dime-plus) - Extended data on Congressional activity
|
| 108 |
-
- [Original Documentation](https://bit.ly/dimeV4codebook)
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: odc-by
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- politics
|
| 7 |
+
- campaign-finance
|
| 8 |
+
- elections
|
| 9 |
+
- ideology
|
| 10 |
+
- united-states
|
| 11 |
+
- political-science
|
| 12 |
+
- congress
|
| 13 |
+
- voting-records
|
| 14 |
+
pretty_name: TYT Political Data (Parquet)
|
| 15 |
+
size_categories:
|
| 16 |
+
- 100M<n<1B
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# TYT Political Data (Parquet Format)
|
| 20 |
+
|
| 21 |
+
A comprehensive collection of U.S. political data in Parquet format, combining campaign finance, congressional voting records, and legislator information.
|
| 22 |
+
|
| 23 |
+
## Datasets
|
| 24 |
+
|
| 25 |
+
### DIME - Campaign Finance (1979-2024)
|
| 26 |
+
|
| 27 |
+
The [Database on Ideology, Money in Politics, and Elections](https://data.stanford.edu/dime) compiled by Adam Bonica at Stanford University.
|
| 28 |
+
|
| 29 |
+
| Directory | Description | Records |
|
| 30 |
+
|-----------|-------------|---------|
|
| 31 |
+
| `dime/contributions/by_year/` | Itemized political contributions | 850M+ |
|
| 32 |
+
| `dime/recipients/` | Candidate and committee CFscores | 156K+ |
|
| 33 |
+
| `dime/contributors/` | Individual donor and PAC CFscores | 36M+ |
|
| 34 |
+
|
| 35 |
+
### Voteview - Congressional Voting (1789-Present)
|
| 36 |
+
|
| 37 |
+
[Voteview](https://voteview.com/) roll-call voting data from Lewis, Poole, Rosenthal et al.
|
| 38 |
+
|
| 39 |
+
| File | Description | Records |
|
| 40 |
+
|------|-------------|---------|
|
| 41 |
+
| `voteview/HSall_members.parquet` | Congressional members with NOMINATE scores | 51K |
|
| 42 |
+
| `voteview/HSall_rollcalls.parquet` | Roll call vote metadata | 113K |
|
| 43 |
+
| `voteview/HSall_votes.parquet` | Individual vote records | 26M |
|
| 44 |
+
|
| 45 |
+
### United States Congress Legislators
|
| 46 |
+
|
| 47 |
+
Legislator data from [@unitedstates/congress-legislators](https://github.com/unitedstates/congress-legislators).
|
| 48 |
+
|
| 49 |
+
| File | Description | Records |
|
| 50 |
+
|------|-------------|---------|
|
| 51 |
+
| `unitedstates_congress_github/legislators-current.parquet` | Currently serving legislators | 540 |
|
| 52 |
+
| `unitedstates_congress_github/legislators-historical.parquet` | All historical legislators | 12,222 |
|
| 53 |
+
|
| 54 |
+
## Usage
|
| 55 |
+
|
| 56 |
+
```python
|
| 57 |
+
import polars as pl
|
| 58 |
+
|
| 59 |
+
# Load DIME contributions
|
| 60 |
+
contributions = pl.read_parquet("hf://datasets/Dustinhax/tyt/dime/contributions/by_year/*.parquet")
|
| 61 |
+
|
| 62 |
+
# Load Voteview voting records
|
| 63 |
+
votes = pl.read_parquet("hf://datasets/Dustinhax/tyt/voteview/HSall_votes.parquet")
|
| 64 |
+
|
| 65 |
+
# Load current legislators
|
| 66 |
+
legislators = pl.read_parquet("hf://datasets/Dustinhax/tyt/unitedstates_congress_github/legislators-current.parquet")
|
| 67 |
+
|
| 68 |
+
# Join legislators with Voteview using ICPSR ID
|
| 69 |
+
members = pl.read_parquet("hf://datasets/Dustinhax/tyt/voteview/HSall_members.parquet")
|
| 70 |
+
joined = legislators.join(members, left_on="icpsr_id", right_on="icpsr", how="inner")
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
## Cross-Reference Keys
|
| 74 |
+
|
| 75 |
+
| Dataset | Key Column | Links To |
|
| 76 |
+
|---------|------------|----------|
|
| 77 |
+
| Voteview Members | `icpsr` | Voteview Votes (`icpsr`), Legislators (`icpsr_id`) |
|
| 78 |
+
| Voteview Members | `bioguide_id` | Legislators (`bioguide_id`) |
|
| 79 |
+
| Legislators | `icpsr_id` | Voteview data |
|
| 80 |
+
| Legislators | `bioguide_id` | Voteview Members, Congress.gov |
|
| 81 |
+
| DIME Recipients | `recipient.icpsr` | Voteview Members |
|
| 82 |
+
|
| 83 |
+
## Licenses & Citations
|
| 84 |
+
|
| 85 |
+
### DIME
|
| 86 |
+
- **License:** Academic use, non-commercial research
|
| 87 |
+
- **Citation:** Bonica, Adam. 2024. Database on Ideology, Money in Politics, and Elections: Public version 4.0. Stanford, CA: Stanford University Libraries. https://data.stanford.edu/dime
|
| 88 |
+
|
| 89 |
+
### Voteview
|
| 90 |
+
- **License:** CC BY-NC 4.0 (attribution required, non-commercial)
|
| 91 |
+
- **Citation:** Lewis, Jeffrey B., Keith Poole, Howard Rosenthal, Adam Boche, Aaron Rudkin, and Luke Sonnet. 2024. Voteview: Congressional Roll-Call Votes Database. https://voteview.com/
|
| 92 |
+
|
| 93 |
+
### United States Congress Legislators
|
| 94 |
+
- **License:** Public Domain
|
| 95 |
+
- **Source:** https://github.com/unitedstates/congress-legislators
|
| 96 |
+
|
| 97 |
+
## Related Resources
|
| 98 |
+
|
| 99 |
+
- [DIME Homepage](https://data.stanford.edu/dime)
|
| 100 |
+
- [Voteview](https://voteview.com/)
|
| 101 |
+
- [unitedstates/congress-legislators](https://github.com/unitedstates/congress-legislators)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|