Skip to content

Instantly share code, notes, and snippets.

@techieshark
Created June 1, 2014 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techieshark/67891cae67e44db0483a to your computer and use it in GitHub Desktop.
Save techieshark/67891cae67e44db0483a to your computer and use it in GitHub Desktop.
Campaign finance questions
Some questions that could be answered by the campaign finance database:
- How much money has been raised in Oregon in 2014? (In state? Out of state?)
- How much money has been spent in Oregon in 2014? (In state? Out of state?)
- Where is the money being spent on? (ex: bar chart, or maybe a wordle of the descriptions)
- How many unique donors are there in Oregon politics (in 2014)?
- What are the three most grass roots PACs? (most unique donations)
- What are the three least grass roots PACs? (fewest unique donations)
- What are the five PACs who have the highest % of their funding from out of state? (And what is that %?)
Extras (may be harder):
- What is the distribution of donations? (Ex: histogram of sizes of all donations, maybe grouped by donor - so you see histogram of aggregate donations)
- Where are donors? Show me a map of unique donors.
- What are the top ten most expensive races in Oregon? (Maybe excluding governor)
@znmeb
Copy link

znmeb commented Jun 1, 2014

Peter, can you post this Gist as an Issue on the Hackoregon 'backend' repository?

@techieshark
Copy link
Author

Since the most recent record in the database is from March 14th, let's look at 2013 as the most recent full year.

How much was raised in Oregon in 2013?

campaign_finance=# SELECT SUM(amount) FROM raw_committee_transactions WHERE tran_date >= '2013-01-01' AND tran_date <= '2014-01-01';
       sum        
------------------
 26323794.9599996
(1 row)

So, $26.3M.

@techieshark
Copy link
Author

Update--more activity over here now: hackoregon/btc-backend#9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment