As stated in the note from the Sunlight Foundation′s Board Chair, as of September 2020 the Sunlight Foundation is no longer active. This site is maintained as a static archive only.

Follow Us

Tag Archive: Technology

The Consequences of the e-Gov Cuts

by

Save the Data!If you haven't already, please be sure to check out my colleague Daniel Schuman's post over at the main Sunlight Foundation blog, where he details the consequences of the cuts to the e-Gov fund. The short version: in a letter to Sen. Carper, federal CIO Vivek Kundra is reporting that the cuts will negatively affect upgrades to a broad variety of executive branch transparency- and good-government-related websites; lead to the cancellation of FedSpace and the Citizen Services Dashboard; and hinder efforts at improving data quality.

There's no doubt this is bad news -- that the administration is already making excuses for not following through on fixing data quality is particularly discouraging. But there's also no question that things could have been worse. This fight isn't over yet, but our community has already made a big difference.

So thanks for your help, and for sticking with us as we try to ensure that our government doesn't stagger backward from its early, tentative steps into the online era.

Continue reading

Recap: RailsConf 2011

by

Last week at RailsConf, Sunlight held an Open Government Hackathon at the event's official unconference, BohConf. We worked on a few projects:

Speaking of Dan, he gave a keynote at RailsConf the next day:

Thanks to all who made it out and contributed!

Continue reading

CFPB Releases Their Redesigned Mortgage Forms

by

one of CFPB's proposed form one of CFPB's proposed 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 reading

Using our APIs is Absurdly Easy

by

wooden ABC blocksA 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:

  1. Obtain a free API key from services.sunlightlabs.com.

  2. 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).

  3. Open getdistricts.py in a decent text editor, like TextWrangler (OS X), vim/emacs (Linux), or Notepad++ (Windows).

  4. Insert your API key in the appropriate spot on line 4.

  5. Change the value of the INPUT_FILENAME variable on line 5 to match your desired CSV's filename.

  6. 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 reading

Open Government Hackathon at RailsConf

by

This Wednesday, May 18, Sunlight Labs will be at RailsConf in Baltimore, running an Open Government Hackathon at the event's official unconference, BohConf. We'll have several projects that need your help, and of course, you're welcome to bring your own. The hackathon runs from 1:50 to 5:15 pm.

But that's not the only #opengov activity happening at RailsConf. Dan from Code for America is giving a lightning keynote on Thursday morning. It'll be livestreamed at 9:50 am ET. Also, check out BohConf's schedule for more unconference fun. It should be a good time.

Continue reading

Sunlight at Google I/O

by

I spent most of this week in San Francisco for Google I/O. While Google I/O doesn't have a whole lot to do with open government, we do enough Android development in the service of open government that it seemed worth my attendance.

In the end, Google I/O was a mixed bag, offering nice goodies and announcements, but at the cost of tightly crowded sessions and what felt like an embarrassment of riches.

Continue reading

JSConf, NodeConf, and Open Government

by

I was in Portland last week, soaking up back-to-back conferences in JSConf and NodeConf. JavaScript (or just JS) is experiencing a bit of a renaissance. Not only are the modern browser wars a boon to client-side JS performance and functionality, but JS is being used on the server side via Node.js. The speakers and attendees are on the cutting edge of software development. It was an inspiring, mind-expanding week.

Reflecting on these two conferences, another important observation comes to mind about my fellow attendees: Many of them are active in the open government and open data community. Our community!

Continue reading

Open States Reaches Halfway Mark

by

Open States map @ 25

Today marks an important milestone for the Open State Project: the addition of New York to our list of experimental states brings our total number of supported states to 25 (plus Washington DC). This marks the halfway point on our journey to bring clean, consistent, machine readable legislative information to all 50 states.

This means that residents of 25 states (accounting for approximately two-thirds of US citizens) can access their state's legislative data in a variety of machine readable formats (JSON, XML, CSV) and will soon be benefiting from sites like like OpenGovernment.org and MyGov365 that use our bulk downloads and free API to keep citizens informed about their state legislature.

Continue reading

CFC (Combined Federal Campaign) Today 59063

Charity Navigator