a pythonic query language
Sign in or create a new account.
|66540.0||Personal Expenditure for Reimbursement|
|2390.0||Loan Received (Non-Exempt)|
|3275.0||Refunds and Rebates|
|955.0||Cash Balance Adjustment|
|15042.0||Miscellaneous Other Receipt|
|30998.0||Items Sold at Fair Market Value|
|2682.0||Miscellaneous Other Disbursement|
|5743.0||Expenditure Made by an Agent|
|3269.0||Pledge of Cash|
|31.0||Loan Received (Exempt)|
|1314.0||Loan Payment (Non-Exempt)|
|586.0||Loan Forgiven (Non-Exempt)|
|30.0||Loan Payment (Exempt)|
|2388.0||Return or Refund of Contribution|
|296.0||Miscellaneous Account Receivable|
|225.0||Account Payable Rescinded|
|934.0||In-Kind/Forgiven Personal Expenditures|
|2414.0||Lost or Returned Check|
|286.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|
|69.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 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: