OHIO GOV BFF STARTS LOBBYING PRACTICE –Columbus Dispatch: “A half-dozen blocks south of the Statehouse, Donald G. Thibaut’s red clapboard... View Article
Continue readingChecking in on the House Oversight Committee
This Tuesday, the House Committee on Oversight and Government Reform will have a doozy of a doubleheader. In the morning, the full committee will tackle the issue of rising gas prices, asking the question, how are government actions and regulations driving the price at the pump?
In the afternoon, the subcommittee on TARP, Financial Services and Bailouts of Public and Private Programs will check in on the Consumer Protection Financial Bureau, a new controversial agency designed to help consumers as they deal with the financial products and services industry.
At Sunlight, we plan to cover both hearings on Sunlight Live ...
Continue readingCFPB Releases Their Redesigned Mortgage Forms
Find loan forms confusing? Wish there was a team out there that was working to make them easier for you? Well, you're in luck! The Consumer Financial Protection Bureau has set out to redesign mortgage disclosure forms, making them easier for citizens to understand the loans they're accepting when purchasing a home. The CFPB team should be commended for making their design process transparent and involving the public as much as possible. The more importance that is placed on design, the more informed citizens will be — hopefully this will lead to a stronger mortgage lending system.
Continue readingSunlight Weekly Round-up: Montana uses cost to clamp down on transparency
In our still on going campaign to tell our governors to support open government, we stand beside citizen activists who... View Article
Continue readingSunrise (5/20/11)
DARK MONEY EXPLOSION —Bloomberg: “Commission on Hope and four other Republican-leaning groups spent at least $4.05 million attacking candidates in... View Article
Continue readingDemocratic Super PACs ask FEC to OK candidate fundraising
Following on the heels of the new fundraising strategy laid out by James Bopp Jr. for Republican Super PAC, a pair of similar Democratic groups -- also known as independent expenditure-only committees -- have asked the Federal Election Commission to rule on whether party committee officials and candidates for federal office can permissibly raise unlimited funds from any source for these outside organizations.
The letter, sent on behalf of the House Majority PAC and the Majority PAC by Marc E. Elias, Ezra W. Reese and Jonathan S. Berkon of the Perkins Coie law firm, also asks whether candidates can participate in fundraisers ...
Continue readingUsing our APIs is Absurdly Easy
A little while ago Ethan blogged about how to use our Influence Explorer APIs. It was a great intro to just how easy it is to start pulling influence data from our systems and into your projects.
But of course that's just one of several APIs that we offer. A couple of weeks ago I responded to an email from someone interested in matching a dataset of zip codes to congressional districts. This is a pretty common task for people doing research, or building advocacy websites, or otherwise trying to link citizens to their elected representatives. It also happens to be a problem that our APIs are perfectly suited to solving.
So here's an example that I wrote to try to show a non-programmer how to get up to speed with our APIs in Python. If you're on OS X or a Linux system, you've already got Python installed. If you're on Windows, you'll need to jump through a few more hoops -- this blog post should be helpful (it's probably a good idea to stick with a Python version earlier than 3.0). Hopefully this will show just how simple it can be to start using our services.
This particular code is oriented toward taking a CSV file with zip codes and adding information about the congressional districts associated with each zip. There's sample data included as well -- just a random assortment of zipcodes -- to help you see how everything works. You shouldn't need much more than a free API key and a command line prompt.
This code interfaces with our API through the use of a helper library. I've included that file too, but if you want the most up-to-date version you can find it here (Rubyists: we have a gem as well). I should also note that the code doesn't follow optimal conventions -- for instance, hardcoding the input filename is not how I'd normally do things -- but I think it's a bit easier to follow this way. I've tried to add a lot of comments.
For this exercise I assumed that the zip is in the row's final column -- the row[-1] code at line 26 determines this. This is the case for the sample file, but if you have your own CSV to process, it might not be. But it's easy to change this! If the zip is in the second-to-last column, for instance, you can use row[-2], and so on. You can also use positive addressing: row[0] is the first column, row[1] the second, etc. Please make sure that whatever CSV you use doesn't begin with a header row, as this will confuse our API and throw an error ("Dear API: which congressional districts fall within the zipcode with the number 'Zipcode'?").
To use the script:
-
Obtain a free API key from services.sunlightlabs.com.
-
Download this zip file and uncompress it. Place its contents in the same same directory as the CSV file you want to process (or just use the included one, if you're trying things out -- you can put them in any old folder).
-
Open getdistricts.py in a decent text editor, like TextWrangler (OS X), vim/emacs (Linux), or Notepad++ (Windows).
-
Insert your API key in the appropriate spot on line 4.
-
Change the value of the INPUT_FILENAME variable on line 5 to match your desired CSV's filename.
-
In a terminal window, navigate to the appropriate directory and run the script by typing "python getdistricts.py"
You should see output as a query is made for each zip code (zip codes that have already been looked up will be cached). When the process is complete, a file called output.csv will be present in the same directory. It will contain the same columns as the source file, plus two new columns at each row's end: one with the number of districts within that zipcode, and another with those districts delimited with semicolons.
That's it! Now, yes, if you're coming to this as a complete newbie, following these steps probably won't make you instantly comfortable with programming. But for those who've tinkered but never tangled with a real API, hopefully this will go some of the way toward showing how easy it is to use our services. And don't forget: if you run into trouble, we're here to help.
Continue readingUpstate New York race sees the first of the outside spending this cycle
The May 24 special House election in upstate New York is attracting the first slew of outside spending in the current election cycle. Party committees and other nonprofit groups have spent more than $1.88 million on this race so far.
The three-way race between Democrat Kathleen Hochul, Republican Jane Corwin and self-described Tea Party candidate Jack Davis has attracted spending from both national party committees and some outside groups that were the most prolific spenders in the 2010 elections. The National Republican Congressional Committee that has spent more than $424,000 opposing both Hochul and Davis, which is less ...
Sunrise (5/19/11)
DEMS SUPER GROUPS TO POOL RESOURCES —Bloomberg: “Three Democratic political groups will team up with a new organization founded by... View Article
Continue readingSunlight Live to cover Obama Middle East speech
On Thursday, May 19, President Obama will give a speech on recent events in the Middle East, from the "Arab Spring" uprisings to the lack of progress on an Israeli-Palestinian peace pact. How he addresses these issues is influenced by U.S. interests in the region, as well as lobbying efforts by foreign governments and organizations such as the American Israel Public Affairs Committee, better known as AIPAC.
To try to sort out these tangled relationships, the Sunlight Foundation will live-blog the president's address on sunlightlive.com, our award-winning multimedia platform. Our reporters and researchers will work to provide ...
Continue reading


