Our friends at Sunlight Foundation recently released the iOS version of their popular Congress app. This free app lets you find out more about members of Congress, watch bills work their way through both chambers, and explore congressional districts using MapBox maps. It uses their open Congress API and the app itself is even open source on GitHub.

We got in touch with Jeremy Carbaugh and Daniel Cloud, two of the folks at Sunlight who helped develop the app, to find out more.

MapBox: Tell us about the app and why you made it.

Sunlight: Congress for iOS gives you access to the latest information from Washington like bills, votes, legislators and more. We launched a very successful version of Congress for Android four years ago and are finally catching up on iOS. We feel that the general public has to have easy access to information if they want to be involved in the governing of our country. It should be dead simple to find the legislators that represent you, know what they are working on, and get in touch with them to have your opinions heard.

Lobbyists and other influencers in Washington have access to expensive tools that let them know what’s happening on Capitol Hill. This often puts citizens and smaller groups at a disadvantage when it comes to having an impact on policy. We try to make tools that anyone can use and level the playing field. Congress for iOS is one part of that mission.

MapBox: Maps are featured prominently in the app. What were your design goals with using a custom map instead of the iOS default?

Sunlight: Our goal for maps in Congress for iOS was to make it easy for users to examine legislator districts and geolocate their legislators. Maps, especially district maps, can convey a lot of information to a person that is familiar with an area. How large is the district? Is it a really weird shape that could indicate gerrymandering? Are people of various socio-economic statuses included in the district or is it homogenous?


“TileMill is an invaluable resource that lets us design maps without having to write code.”


Sunlight has used MapBox in our web projects, so we were familiar with the features and customizability of MapBox maps. Since we were going to overlay district shapes, it was important that the map be clean and legible, and we knew we could control that with MapBox maps. TileMill is an invaluable resource that lets us design maps without having to write code. It’s also great that we can use the same underlying map tiles across platforms, making our design consistent on iOS, Android, and the web.

MapBox: What were the good parts of using our SDK and what were the hard parts? Of our service? API?

Sunlight: It was easy to start using the SDK, especially since it is available with CocoaPods. Between the support forums and the example code on the SDK site, most of the questions we had were covered. There were a few instances where I had to dig through the source code to find the order in which methods were called or how certain objects were used under the hood, but it didn’t take too much work to figure out. Fortunately, we had access to the code since the SDK is open source!

We did consider rendering the district Shapefiles into the tiles themselves, but we didn’t have the stamina to manually export and upload over 500 individual tilesets. It would be great to have an API so that much of that work could be done programmatically. It would make for much faster and smoother maps, though we are still quite happy with the result using RMPolygonAnnotation.

The accessibilty of Congress for iOS is very important to us so we were really happy with how easy it was to make the MapBox map work with VoiceOver. It was just two simple lines of code:

[_mapView setIsAccessibilityElement:YES];
 [_mapView setAccessibilityLabel:
     [NSString stringWithFormat:@"Map of %@, district %@", stateName, district]];

When the map is read by VoiceOver, it tells the user the state and district that are being displayed.


Thanks again to Jeremy and Daniel at Sunlight for taking the time to talk with us. You can find more info about Congress for iOS at congress.sunlightfoundation.com and you can follow the app on Twitter at @congress_app. You can also download the source code to use as a starting point for your own app.

Have a great app that you’ve built using MapBox? Get in touch with us or feel free to message me directly on Twitter or App Dot Net.