Hi -
We're working on updating the numbers on
oilmoney.priceofoil.org with
the Open Data data, and are having some problems making our numbers
match those posted on the opensecrets website. What we are trying to
get is an accurate representation of all contributions made to
congress members by the Oil and Gas industry, but when we tally up our
transaction amounts, a significant number of them differ from what's
on the CRP website.
Here's an example: For Ron Packard (N00007009 / H2CA43047), in 2000,
we have 7 contributions made to him
(0490782,0468041,0596189,0665787,0307230,0278526,0315402) for a total
of $6198 (all pac money). If we cross-reference this against the CRP
website (
http://www.opensecrets.org/politicians/industries.php?
cid=N00007009&cycle=2000&type=I&newMem=N&recs=0), we see him listed
with a total of $7198.
Another example:
Terry Everett (N00003083 / H2AL02067), again in 2000. From the queries
we ran against the open data, we have a total of 12 transactions
(0876955,1737702,1737701,0723894,0723893,0234180,0234179,0481614,0100386,0565461,1524755,2081732)
for a total of $6500 ($5000 in 6 pac contribs, $1500 in 6 individual
contribs). The site (
http://www.opensecrets.org/politicians/
industries.php?cid=N00003083&cycle=2000&type=I&newMem=N&recs=0) shows
him at $7500 Oil & Gas contribs - $6500 pac and $1000 individual.
I can only assume that this discrepency is due to a) our queries
against the open data being incorrect, b) the data used for the
website totals is somehow different than what is available for
download, or c) a combination of the two. My money is on our queries
being wrong, so if anyone could offer us any guidance, we would
greatly appreciate it.
Here are the queries that we are using to flag the contributions we
are interested in:
1) Individual contributions to Candidate Committees
select distinct i.FECTransID as fec_id, Orgname as company_name,
Party, i.Date as date, Amount, i.RecipID as recipient_id, feccandid
as candidateid, PacShort as recipientname, i.cycle as cycle, industry
as indshort , catname as catshort, i.microfilm as mflocations, if
(i.source = 'gen', 'g', 'i') as type, concat(i.FECTransID, '_',
substring(i.cycle, 3, 2)), i.realcode FROM indivs00 i left join
cmtes00 c on i.recipid = c.CmteID join categories b on i.realcode =
b.catcode where i.recipid like 'c%' and (primcode not like 'z4%' or
primcode is null) and i.recipcode not like 'p%' and i.type in (10, 11,
15, '15E', '15J', '22Y') group by FECTransID");
2) Individual contributions to Candidates
select distinct i.FECTransID, Orgname, Party, i.Date, Amount,
i.RecipID, FECCandID, FirstLastP, i.cycle, industry, catname,
i.microfilm, if(i.source = 'gen', 'g', 'i') as type, concat
(i.FECTransID, '_', substring(i.cycle, 3, 2)), i.realcode FROM
indivs00 i left join cands00 c on i.recipid = c.cid join categories b
on i.realcode = b.catcode where i.recipid like 'n%' and i.recipcode
not like 'p%' and i.type in (10, 11, 15, '15E', '15J', '22Y') group by
FECTransID");
3) PAC contributions to Candidates
select distinct i.FECRecNo as fec_id, e.pacshort as company_name,
c.Party, i.Date as date, Amount, i.cid as recipient_id, c.feccandid,
FirstLastP as recipientname, i.cycle as cycle, industry as indshort ,
catname as catshort, null as mflocations, 'c' as type, concat
(i.FECRecNo, '_', substring(i.cycle, 3, 2)), i.realcode FROM pacs00 i
join cmtes00 e on pacid = e.cmteid left join cands00 c on i.cid =
c.cid join categories b on i.realcode = b.catcode where i.cid like 'n
%' group by FECRecNo
We are assuming that we do not need to query against the pacs_other00
table, since it seems that any contribution from a PAC to a candidate
committee is reported by the candidates in pacs_00.
Again, any help in figuring this out would be appreciated. Thanks!