caciviclab / odca-jekyll

New ODCA front end
https://www.opendisclosure.io
GNU Affero General Public License v3.0
17 stars 13 forks source link

Loans are included in contribution totals on candidate page but not on the candidate committe page #229

Open adborden opened 6 years ago

adborden commented 6 years ago

Saied's total contributions includes loans on the candidate page: screenshot from 2018-09-09 23-27-12

But his committe page does not: screenshot from 2018-09-09 23-27-03

ckingbailey commented 5 years ago

This is caused by the way loans are filed. Saied is the reason we have the disclaimer on the committee page

Note that contributor tables do not presently include loans, although funds from loans are included in the total contributions received.

I know this has been explained to me, but maybe you could explain it again, @sfdoran: why don't we include loans on the committee table? We could do it in Jekyll, but we would have to add the candidate finance data to the committee layout and check it for loans, and I'm not sure it really belongs there.

ckingbailey commented 5 years ago

The peculiar situation of loans also yields this unfortunate rendering of the data on Saied's page:

screen shot 2018-10-23 at 10 55 58 pm

That lower portion should be contributions by region, but loans don't get linked to that kind of information so what we get looks broken.

adborden commented 5 years ago

Quoting Colin (2018-10-23 23:08:12)

The peculiar situation of loans also yields this unfortunate rendering of the data on Saied's page:

screen shot 2018-10-23 at 10 55 58 pm

That lower portion should be contributions by region, but loans don't get linked to that kind of information so what we get looks broken.

Colin, can you open a new issue for this?

-- Aaron D Borden Human and hacker

ckingbailey commented 5 years ago

@adborden I've looked into this and I don't see a reasonable way to grab the candidate data from the committee page. My plan was to the check if the committee was a candidate's own committee and then, if so, check if the candidate has loans and add that amount to the committee's total_contributions. The committee front matter exposes the committee's filer_id, which is the same as the candidate's filer_id, but in order to retrieve a candidate's total_loans_received, I need locality and election to get to the candidate who controls the committee (unless I drill down into the subdirectories of, and iterate over, every candidate collection, looking for a match on 'filer_id. I haven't tried that yet, but it doesn't seem like a practical solution).

Do you see a solution that I'm missing here?

adborden commented 5 years ago

I'll take a look. My rule of thumb is that if the data is not available or awkward to get on the front end, then the fix should be a back end change to make the data available. I have to think about what that means for total_contributions, because committees can technically live beyond the election, so it's not really a "total", it's the total for this election period. There's also some other calculations we want to eventually calculate for committees. I think we want to create a finance object similar to what we do for candidates that contains the committee's finance history.

adborden commented 5 years ago

@ckingbailey and I just went over this, and I think this isn't the right thing to fix. I think we want to make a clearer distinction between "total contributions" (sum of only the contributions) and "total raised" (monetary contributions, loans, and non-monetary contributions). This also makes our data align better with the actual forms being filed. Here's the proposed changes:

Update tabulations

Saied Karamooz has mostly loans and a tiny bit of monetary contributions.

screenshot from 2018-10-30 20-22-50

We should change the Contributions line to only include monetary contributions. Currently it includes total amount collected: monetary contributions, loans, and non-monetary contributions.

We do similar for expenditures, although I'm not sure this has come up yet.

Then we add the subtotals: "Total raised" and "Total spent"

And those two add up to the Current balance.

This is similar to the form 460 (my annotations in pink): screenshot from 2018-10-30 20-26-08

Update contributions/expenditures breakdown

These values should be only the monetary contributions/expenditures because that's what the breakdown shows. The contribution break down does not include loans.

screenshot from 2018-10-30 20-36-40

Total contributions on committee page

This is currently correct in this proposal.

screenshot from 2018-10-30 20-39-51

Office election amount collected is the total raised

This is currently correct in this proposal.

screenshot from 2018-10-30 20-41-02

cc @elinaru @sfdoran

sfdoran commented 4 years ago

@ckingbailey I like the idea of contributions + loans = total raised. Remember contributions is Line item 1 + Line item 4.

One thing you could do would be to show the most recent loan balance separately on the top, just using Line item 2 from the most recent filing.

I've never really liked the contributions minus expenditures on this page since that isn't the actual cash balance reported. Might be worth discussing.

sfdoran commented 4 years ago

image

If you look at how Lynette's data is showing up loans are already included in Contributions (Total Contributions includes loans), so the way we are showing loans now is misleading.

mikeubell commented 4 years ago

I think the easiest fix would be to relabel the total on the committee contributions page as: Total itemized contributions. And label the money on the Candidate page as: Money Raised