Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrape independent expenditure data #27

Closed
hancush opened this issue Sep 10, 2024 · 3 comments · Fixed by #30
Closed

Scrape independent expenditure data #27

hancush opened this issue Sep 10, 2024 · 3 comments · Fixed by #30
Assignees

Comments

@hancush
Copy link
Member

hancush commented Sep 10, 2024

Scrape independent expenditure data from https://login.cfis.sos.state.nm.us/#/transaction/IE

To do this, page through the underlying API endpoint (https://login.cfis.sos.state.nm.us/api///Search/TransactionSearchInformation – use the Network tab in your console to see what those requests should look like). For each expenditure, get details and donors:
https://login.cfis.sos.state.nm.us/api/Public/GetExpenditureDetails?transactionID=1284056&transactionVersID=1
https://login.cfis.sos.state.nm.us/api///Public/GetIEDonors?transactionId=1284056&transactionVersId=1

Combine these data sources into a single record that looks something like:

Transaction Date
Reporting Entity Name
Reporting Entity Type
Payee
Payee Type
Payee Address
Expenditure Amount
Expenditure Description
Election Type
Election Year
Reason
Stance
Donor Name
Donor Address
Donor Amount

Upload the final dataset to S3.

@hancush
Copy link
Member Author

hancush commented Sep 10, 2024

From https://www.fec.gov/help-candidates-and-committees/candidate-taking-receipts/understanding-independent-expenditures:

An independent expenditure is an expenditure for a communication that expressly advocates the election or defeat of a clearly identified candidate and which is not made in coordination with any candidate or their campaign or political party.

@antidipyramid
Copy link
Contributor

@hancush

Each of these fields:

Transaction Date
Reporting Entity Name
Reporting Entity Type
Payee
Payee Type
Payee Address
Expenditure Amount
Expenditure Description
Election Type
Election Year
Reason
Stance
Donor Name
Donor Address
Donor Amount

other than the donor info look like they're recorded in the TransactionSearchInformation endpoint. Does that sound right to you? Is there anything in the transaction detail endpoint (i.e. GetExpenditureDetails) I'm overlooking?

@hancush
Copy link
Member Author

hancush commented Sep 13, 2024

I was working quickly, so it's very possible all of that info is in the main endpoint and we can save the request. Great spot, @antidipyramid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants