a pythonic query language
Sign in or create a new account.
|73516.0||Personal Expenditure for Reimbursement|
|2764.0||Loan Received (Non-Exempt)|
|3637.0||Refunds and Rebates|
|1068.0||Cash Balance Adjustment|
|16194.0||Miscellaneous Other Receipt|
|33807.0||Items Sold at Fair Market Value|
|3295.0||Miscellaneous Other Disbursement|
|5743.0||Expenditure Made by an Agent|
|3269.0||Pledge of Cash|
|37.0||Loan Received (Exempt)|
|1451.0||Loan Payment (Non-Exempt)|
|656.0||Loan Forgiven (Non-Exempt)|
|36.0||Loan Payment (Exempt)|
|2832.0||Return or Refund of Contribution|
|299.0||Miscellaneous Account Receivable|
|239.0||Account Payable Rescinded|
|1048.0||In-Kind/Forgiven Personal Expenditures|
|2721.0||Lost or Returned Check|
|321.0||In-Kind/Forgiven Account Payable|
|39.0||Unexpended Agent Balance|
|176.0||Pledge of In-Kind|
|193.0||Uncollectible Pledge of Cash|
|6.0||Pledge of Loan|
|7.0||Uncollectible Pledge of In-Kind|
|85.0||Personal Expenditure Balance Adjustment|
AggregateAmount, Amount, City, ContributorPayee, County, Date, FiledByName, Filer, OriginalId, PurposeCodes, State, SubType, TransactionId, Zip
Both fields and conditions are made up of terms.
A term is a valid Python expression in a name space made up of: database parameters; any imported python modules; PyQL Aggregators such as Average (A), Sum (S), and Replace (R); and other domain specific terms.
|About the Oregon Campaign Finance Database||Sample Queries|
The Oregon Campaign Finance Database originates with the Oregon Secretary of State website at: https://secure.sos.state.or.us/orestar/gotoPublicTransactionSearch.do. The raw data files are avaiable throught the data link in the upper left.
The original data headers were mapped into CamelCase PyQL parameters.
This allows easy access by just the capital letters or the first few letters of a parameter.
For example, to see the Date, Filer, ContributorPayee, and Amount for Ted Wheeler's transactions use the PyQL:
All of the transaction amounts are given as posititve numbers. Use the parameter SubType to help tease out the various machinations. For example, to see the total amount of transactions for each of Ted Wheeler's reported SubTypes, use the PyQL:
To start exploring a database, the PyQL Syntax S(1),R(Parameter)@Parameter is often handy. Let's start here by looking at the break down of transactions by SubType with the PyQL:
Sorting on the first column by clicking on that header, shows that Cash Constibutions is the most popular way to get money into the system.
Similarly, to see the total amount of transactions breaken down by state, use the PyQL:
To make a scatter plot of campaign contributions v date for Portland City Council Position #2, use the PyQL:
To see details of all reported transations for a candidate use (eg): Date,F,CP,A,ST@'Nick Fish' in F
And likewise for Portland City Council Position #3:
To see details of all reported transations for a candidate use (eg): Date,F,CP,A,ST@'Loretta' in F
To make a scatter plot of total Amount vs Zip for Zip codes in Oregon, use the PyQL:
To plot rather the number of transactions for each Zip, use the PyQL:
To plot cumulative transaction Amounts for Ted Wheeler and Jules Baily, use the PyQL:
To see transactions for Kate Brown and Bud Pierce, use the PyQL: