Dustinhax commited on
Commit
a88c86b
·
verified ·
1 Parent(s): 87f1706

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +101 -108
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
- pretty_name: DIME - Database on Ideology, Money in Politics, and Elections (Parquet)
13
- size_categories:
14
- - 100M<n<1B
15
- ---
16
-
17
- # DIME: Database on Ideology, Money in Politics, and Elections (Parquet Format)
18
-
19
- This dataset is a Parquet conversion of the [Database on Ideology, Money in Politics, and Elections (DIME)](https://data.stanford.edu/dime) Public version 4.0, originally compiled by Adam Bonica at Stanford University.
20
-
21
- ## Dataset Description
22
-
23
- The DIME database provides a comprehensive resource for the study of campaign finance and ideology in American politics. It contains over **850 million itemized political contributions** made by individuals and organizations to local, state, and federal elections from 1979 to 2024.
24
-
25
- ### Key Features
26
-
27
- - **Data Processing:** Names, addresses, occupation, and employer titles have been cleaned and standardized
28
- - **Unique Identifiers:** Entity resolution assigns unique IDs for all donors, enabling tracking across election cycles and government levels
29
- - **Geocoding:** Records are geocoded and placed into congressional districts
30
- - **Ideological Measures:** Common-space DIME scores (CFscores) allow direct comparison of ideal points across political actors
31
- - **Candidate/Committee Data:** Includes fundraising statistics, election outcomes, gender, and other characteristics
32
-
33
- ### Coverage
34
-
35
- - **Time Span:** 1979-2024
36
- - **Geographic Coverage:** United States (local, state, and federal elections)
37
- - **Records:** 850M+ itemized contributions, 156K+ candidates, 37K+ committees, 36M+ individual donors
38
-
39
- ## Files
40
-
41
- | File | Description |
42
- |------|-------------|
43
- | `recipients/` | Candidate and committee CFscores (1979-2024) |
44
- | `contributors/` | Individual donor and PAC CFscores (1979-2024) |
45
- | `contributions/` | Itemized contribution records by election cycle |
46
-
47
- ## Usage
48
-
49
- ```python
50
- from datasets import load_dataset
51
-
52
- # Load a specific subset
53
- dataset = load_dataset("Dustinhax/dime", data_dir="contributions")
54
-
55
- # Or use pandas/polars directly
56
- import polars as pl
57
- df = pl.read_parquet("hf://datasets/Dustinhax/dime/contributions/*.parquet")
58
- ```
59
-
60
- ## Source and License
61
-
62
- This dataset is derived from the publicly available DIME database and is released under the [Open Data Commons Attribution License (ODC-BY 1.0)](https://opendatacommons.org/licenses/by/1.0/).
63
-
64
- ### You are free to:
65
-
66
- - **Share:** Copy, distribute, and use the data
67
- - **Create:** Produce works from the data
68
- - **Adapt:** Modify, transform, and build upon the data
69
-
70
- ### As long as you:
71
-
72
- - **Attribute:** You must attribute any public use of the data in the manner specified below
73
-
74
- ## Citation
75
-
76
- If you use this dataset, please cite the original source:
77
-
78
- ```bibtex
79
- @misc{bonica2024dime,
80
- author = {Bonica, Adam},
81
- title = {Database on Ideology, Money in Politics, and Elections: Public version 4.0},
82
- year = {2024},
83
- publisher = {Stanford University Libraries},
84
- address = {Stanford, CA},
85
- url = {https://data.stanford.edu/dime}
86
- }
87
- ```
88
-
89
- **Text citation:**
90
- > Bonica, Adam. 2024. Database on Ideology, Money in Politics, and Elections: Public version 4.0 [Computer file]. Stanford, CA: Stanford University Libraries. https://data.stanford.edu/dime
91
-
92
- ## Additional Notes
93
-
94
- - This Parquet conversion was created to improve query performance and reduce storage requirements compared to the original CSV format
95
- - The itemized contribution records in this dataset exclude records retrieved from the Center for Responsive Politics/NIMSP database (consistent with the public release)
96
- - For questions about the underlying data methodology, refer to the [DIME Codebook](https://bit.ly/dimeV4codebook)
97
- - For validation of the ideological measures, see the [validation results compendium](https://www.dropbox.com/s/2ntrx9auzifgujp/dime_validation.pdf?dl=1)
98
-
99
- ## Contact
100
-
101
- - **Original Data:** Adam Bonica (bonica@stanford.edu)
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)