CitySDK: Helping Civic Hackers Deliver Local Solutions

Jun 22, 2015

Civic hackers are a special breed—their primary motivation is closely tied to the social issues closest to their hearts.

Most attend hack-a-thons, engage in civic meetups, and show up at city hearings to champion their cause and push solutions at the societal, technology, and policy levels.

On the technological front, creating civic city-based solutions has traditionally been unnecessarily difficult. Data issues range from the lack of open data access to the inconsistent interpretation of current data sets to the difficulty of using federal data, such as U.S. census information.

With this in mind, the U.S. Census Bureau created the U.S. City SDK: an open source, community-based, user-friendly software development kit for civic technologists, which takes the pain out of interacting with Census data, removes the need for them to become experts in Census methods and terminologies, and gets hacktivists to a deliverable quicker and with less hassle; all while enabling them to connect local and national public data through a simple and elegant Javascript library.

JavaScript is the initial language chosen in order to maximize flexibility and interoperability and to decrease the time from first blush to working Web application.

The launch of the beta was on June 6th, 2015—the National Civic Day of Hacking.

The initiative draws inspiration from the European CitySDK effort.

600-x-338-City-SDK

CitySDK Basics

Once a developer has registered for and received their API key, they can include the following code snippet to start using CitySDK:

A developer can then craft request and response statements that return GeoJSON shapefiles with the requested (statistical) data.

600-x-372-City-SDK-Census-module

CitySDK has built-in FIPS code translation for latitude and longitude, addresses, and ZIP codes. Also, there is a list of aliases for common variables in Census’s American Community Survey (ACS) and a Query Builder to help developers.

Examples are provided that enable those new to CitySDK to cut-and-paste sample code, modify it for their own purposes, and quickly get to their minimally viable solution.

600-x-372-City-SDK-Guides

The long term goal of CitySDK is to organically include as many functions or data sets as the community needs. For this, any community developer can host a CitySDK module in their own github repository and make it accessible to the broader community.

These are all the features in the initial CitySDK beta.

The Beta

On June 6th, 2015, there were two flagship events for CitySDK’s launch: one in Chicago and one in Washington, DC.

600-x-372-City-SDK-Beta-launch-map

CitySDK in Chicago

The Chicago launch was focused on sustainability. The Census team worked with Microsoft and the University of Chicago’s Data Science for Social Good fellows.

The two CitySDK projects from Chicago were Purshable and TechSpaces.

Purshable

Purshable builds demand for close-to-expiration food that grocery stores normally throw away by marketing it at a discount to low-income and environmentally conscious consumers, which has the added benefit of allowing grocers to earn new revenue.

Purshable won 1st place in the Center for Neighborhood Technology (CNT)’s Urban Sustainability Apps Challenge.

600-x-372-City-SDK-Purshable-weekend-launch

TechSpaces

The TechSpaces project seeks to understand city innovation hotspots using the Census CitySDK.

This project placed second in CNT’s Urban Sustainability Apps Challenge.

600-x-373-City-SDK-Techspaces

CitySDK in Washington, DC

The DC projects were focused on small businesses. The Census team collaborated with:

The five CitySDK projects from Washington, DC, were the Gender Disparity Map, DC Data Smoothie, Specialty EBiz, Brick and Mortar, and Chicken Little.

Gender Disparity Map

This project uses the demographic and occupation data from the ACS, via CitySDK, to identify states with disproportionately large numbers of one gender representing a variety of S.T.E.M. related occupations.

600-x-373-City-SDK-Gender-disparity-map-by-population

DC Data Smoothie

DC Data Smoothie’s mission is to help local Business Improvement Districts (BIDs) within DC understand the composition of their constituency.

They achieved this by creating a map that leverages CitySDK to send custom (DC BID) boundaries requests for all nested block-groups and displays the ACS data for the selected area(s).

600-x-373-City-SDK-DC-Data-Smoothie

Specialty EBiz

The Specialty EBiz team wanted to solve the following problems faced by a local specialty business owner: “How do I use open data to identify areas that have a high density of likely clients that meet certain criteria/fit a certain cohort?”

They used ACS data, via CitySDK, to build a novel multi-step mapping algorithm, which allows the user to combine multiple ACS variables by filtering higher level and then nested geographies that contain different criteria.

600-x-373-City-SDK-Specialty-EBiz

Brick and Mortar

This project used open data to maximize the number of customers who come through a company’s doors. They combined meetup information with ACS demographics from CitySDK to help businesses dynamically manage their operations based on their current open data indicators in their environment. For example, adjusting opening hours based on commute times, maximizing supplies based on meetups nearby, and increasing inventory based on community demographics.

600-x-373-City-SDK-Brick-and-Mortar

Chicken Little

Chicken Little is a data visualization using CitySDK, the U.S. Department of Agriculture’s QuickStats, and the Animal and Plant Health Inspection Service’s avian flu data to show the effects of avian flu across the United States.

The USDA hopes to distribute Chicken Little’s data to support small farmers in their efforts to protect their businesses.

600-x-373-City-Chicken-Little-map

Next Steps

CitySDK is for the community and by the community.

We are looking to help you, Mr. and Ms. Civic Hacker. Let us know how we can.

You can help the CitySDK team build and improve the platform by submitting an issue to our github repo, by helping us prioritize the community’s needs, by contributing to the code base, and/or by building CitySDK apps for Census’s Data Solutions Challenge.

For more information on CitySDK, please email Jeffrey Meisel and Tyrone Grandison.Tyrone Grandison is a Presidential Innovation Fellow at the General Services Administration, working with the United States Census Bureau.