CitySDK to launch in Chicago for National Day of Civic Hacking

census-logoCity SDK was created by the US Census Bureau to be a user-friendly “toolbox” for civic technologists to connect local and national public data  The creation of the CitySDK came out of the desire to make it easier to use the Census API for common tasks that their developer community asked for. For the past two years, the Census Bureau has been engaging with the developer community to see how they use the API. After seeing the most commonly used functions being built out of the API, the Census Bureau has now built those functions into the SDK to make it easier for developers.

These features include:

  • Entering a lat/long location or a zipcode to get a FIPS code (A FIPS code identifies counties and county equivalents)
  • Use a single call to get American Community Survey (ACS) 5-yr 2013 values and Census geographic boundaries
  • A modular architecture which makes for use with third-party data.
  • The ability to pull down Census Bureau geographic boundaries by sending your own custom geography in the request. (For example, if you wanted to get information about a specific neighborhood.)

The CitySDK has the same data as the Census API, but the wrapper makes it easier to manage. The Census module can access the Census’s ACS 1-year, 3-year, and 5-year surveys.

To get started, you can request an API key through the census’ website.

The Census has made a number of guides available for developers interested in using the SDK. If you’re running a National Day of Civic Hacking event, the Census team has a Slack channel for people to ask question about the SDK.

The team will also have a live online demo on June 1st. To watch, simply register here.

The team will also be at Chi Hack Night on June 2nd for the official launch of the CitySDK.

The City of Chicago unveils predictive analytics model to find foodborne illness faster

city-of-chicago-tech-planCity of Chicago Chief Data Officer Tom Schenk Jr spoke at last week’s Chi Hack Night to talk about their new system to predict the riskiest restaurants in order to prioritize food inspections – and has found a way to find critical violations seven days faster.

Below, we’ve put up the slides from their presentation as well as the highlight video:

The problem with the way that most cities conduct food inspections is that by law they have to inspect all of them. However, the number of restaurants far outweigh the number of inspectors. In Chicago, there’s one inspector for every 470 restaurants. Since they have to inspect them all, the normal way of doing this is random inspections. However, the team knew that the residents wouldn’t get foodborne illness at random restaurants – they would get sick from those few restaurants who don’t follow all the rules.

The Department of Innovation and Technology partnered with the Chicago Department of Public Health and staff from Allstate Insurance to see if they could use analytics predict which restaurants would have critical violations. (Side note: It’s a brilliant move on the part of the City and the Allstate to contribute volunteer hours using something that actuaries specialize in.)  Some of the data sets used to make these determinations were:

    • Establishments that had previous critical or serious violations
    • Three-day average high temperature (Not on the portal)
    • Risk level of establishment as determined by CDPH
    • Location of establishment
    • Nearby garbage and sanitation complaints
    • The type of facility being inspected
    • Nearby burglaries
    • Whether the establishment has a tobacco license or has an incidental alcohol consumption license
    • Length of time since last inspection
    • The length of time the establishment has been operating

 All of the data, with the exception of the weather and the names of the individual health inspector, come directly from the city’s data portal. (Which builds on the city’s extensive work in opening up all this data in the first place.) When factoring all of these items together, the research team was able to provide a likelihood of critical violations for each establishment, which was developed to prioritize which ones should be inspected first.

In order to test the system, they conducted a double-blind study over a sixty day period to ensure the model was correct.

The system has gotten rave reviews and coverage from a number of publications and entities including Harvard University, Governing Magazine, and WBEZ’s Afternoon Shift.

Aside from the important aspect of less people getting sick from foodborne illness in the City of Chicago, there is another very important aspect of this work that has national impact. The entire project is open source and reproducible from end to end. We’re not just talking about the code being thrown on GitHub. (Although, it is on the city’s GitHub account.) The methodology used to make the calculations is also open source, well documented, and provides a training data set so that other data scientists can try to replicate the results. No other city has released their analytic models before this release. The Department of Innovation and Technology is openly inviting other data scientists to fork their model and attempt to improve upon it.

The City of Chicago accepts pull requests as long as you agree to their contributor license agreement.

Having the project be open source and reproducible from end to end also means that this projects is deployable to other cities that also have their data at the ready. (Which, for cities that aren’t, the City’s also made their OpenETL toolkit available as well.)

The Department of Innovation and Technology has a history of opening up their work and each piece they’ve released (from their data dictionary to scripts that download Socrata datasets into R data frames) builds on the other.

In time, we may not only see Chicago using data science to improve their cities – but other cities building off the Chicago model to do so as well.

You can find out more about the project by checking out the project page here.

The Naru Project at Chi Hack Night

The Naru ProjectAt Chi Hack Night, Zachary Damato and Nick Wesley from The Naru Project talked about their non-profit that focuses on incorporating artificial wetlands into our city’s river systems.

The Naru Project is facilitating the design and implementation of a park consisting of floating gardens, wildlife habitat, and more to be enjoyed by the local community.

The Naru Project is named after the ancient Akkadians word for river. In part because rivers were the heart of the Akkadian civilization, and the Naru Project want to connect our waterways to the heart of our communities.

Their works focuses on the Chicago River just east of Goose Island. The team would like to build a park that places wildlife back in the river as well as help clean up the river.

The Naru Project team explained that the river used to be full of wildlife, but that it was cleared out to make it easier for companies to ship goods through the Chicago River. The city has not always been kind to the river in the past and to this day the city still dumps sewage into the river during periods of heavy rain or snowmelt. The team hopes that by reintroducing wildlife into the river it can help the process of cleaning the river. The teams is using a series of artificial islands to give plant and animal life a place to grow. These are floating rafts that have inserts for plant life to grow. The Naru Project has just completed a 24 month study to see if these raft units can enable plant life to come back. The units not only survived *two* winters, but after the study was concluded they discovered that fish were breeding underneath the units – which the teams regards as a huge success. To get permission to do so, they had to coordinate the the US Army Corp of Engineers which has jurisdiction over water resources development in the Chicago metropolitan area. Now that the study has shown signs of success, the team is moving towards construction of the park. Here’s their Phase One Outline.

If you want to get involved in the Naru Project, you can reach out to them by emailing [email protected]. If you want to get more involved in environmental projects, check out the environment breakout group at ChiHackNight!

Modeling Pension Reform at OpenGov Hack Night

IMG_7951At Chi Hack Night, the Modeling Pension Reform Breakout Group shared their work so far and helped to explain the problem with pensions in Illinois.

The breakout group, led by Ben Galewsky, David Melton, Nathan Pinger, Denis Roarty and Tim Sharko, is comprised of volunteers trying to educate public employees, pensioners, tax payers and policy makers about the math behind pension systems, the current debt, and possible solutions. The group was formed at Chicago’s OpenGov Hack Night as one of the working groups and have been meeting regularly for the past six months.

Here’s the group’s slides and highlight video:

Below, we’ve laid out some key points from the team’s presentation:

The problem with pensions

In the private sector, most companies switched from offering pensions to a 401(k) defined contribution. However, in the public sector the majority of government employees still have a pension. The main difference between a pension and a 401(k) is that with a pension you’re guaranteed a certain monthly income per month and it places the investment risk on the plan provider. With a 401(k) there’s no such guarantee and the employee assumed the investment risk. While pensions are an employee benefit, state workers also pay into the system.

According to the team, the State of Illinois has $111 billion of unfunded liabilities for the five Illinois pension systems: General Assembly Retirement System, Judges Retirement System, State Employee Retirement System,  State Universities Retirement System, and the Teachers Retirement System.

The team stated that in order make up for the shortfall, each Illinois family would have to pay a levy of at least $ 23,000 or a loss of at least $146,000 in retirement savings for every employee and retiree in these five pension plans.

The problem in Illinois became even more difficult in 1970 when the Illinois Constitution was modified to ban Illinois from reducing pension benefits once they’ve been hired by the State. Illinois recently went to a two-tier system to reduce benefits for future employees – but was constitutionally bound to keep things the same for current employees.

The teams stressed that what got the state in trouble wasn’t the stock market tanking or government employees getting raises. It’s that the state skipped their required payments and it compounded the problem. The state has a fixed cost of living allowance (COLA) increase of 3% – and right now that’s compounding at or above inflation. An added complication is that in the Teachers Retirement System, the school districts can set the amount of benefits – but they don’t aren’t responsible for paying the bill.

And the last thing the team says that makes solving pensions difficult is that taxpayers tend to fall asleep when it gets to the nitty-gritty details of pension reform.

Building an understanding of the math

To help residents better understand the pension problem, the team has been building two calculations that model the effects pension reform would have.

The first is a Pension Calculator for pensioners and interested taxpayers to enter their personal information and compare current contributions and benefits to proposed scenarios. The second is a Liability Calculator for taxpayers and policy makers to explore what the state-wide liability looks like under various scenarios.  The calculator is designed to be a  rough model of the pension systems given our limited access to data and actuarial resources.

The calculator let’s users see what effects different pension plans would have.

The team is still working on the calculators, but expects to launch soon.

Currently, the team is working on reverse engineering the State’s actuarial tables that they use to determine how the pensions will look in later years. They have a FOIA request for both the database and the calculations they use.

Getting involved

The team is currently looking for help in getting access to detailed plan data provided to actuaries, access to state actuaries staff and models, javascript developers, UX Designers, help with marketing the tool. They also would like to have input on what is politically and pragmatically feasible and if there are other approaches the team should consider.

You can join them by attending the Chi Hack Night Pension Breakout Group.

The ACLU of Illinois at OpenGov Hack Night

aclu-logoKaren Sheley, staff attorney at the American Civic Liberties Union of Illinois, stopped by Chicago’s OpenGov Hack Night to give an overview of the ACLU’s work and describe how they use data to inform their advocacy.

The ACLU has a long and storied history, first being formed in 1929 and focusing on racial justice, religious liberty, freedom of expression, the rights of children and people with disabilities, criminal justice reform, fairness for Lesbian, Gay, Bisexual, Transgender individuals and reproductive justice. They have over 20,000 members in Illinois.

The ACLU advocates for transparency through legislation, litigation, and FOIA requests through the following reports:

  • CPD Traffic Stops and Resulting Searches in 2013
  • Stop and Frisk in Chicago
  • The War on Marijuana in Black and White

Criminal Justice Reform 

One of the main focuses of the ACLU is criminal justice reform, but every aspect of their work is data focused. The ACLU of Illinois is currently working on a a disparate impact case on response to 911 calls. They’re also working on an lawsuit regarding the Mayor of Peoria who responded to someone making a parody twitter account by issuing warrant for arrest.

One example of their works is the Traffic stop statistical study act — 625 ILCS 5/11-2012. It creates a database that records the details of the all the traffic stops in the state. They’ve used the datasets to find disparities in the race distribution of stops relative to population. They found that African-Americans are disproportionately stopped and with even greater disparity in white neighborhoods. The hit rate (the rate in which the police actually find something) is much higher for whites that other races. The conclusion of the ACLU is that the bar is set higher for stopping a white person than other races. You can see the details of that study on the ACLU website.

The ACLU has also used data to produce a report about the impact the War on Drugs has had on African-Americans. Almost all of the data that the ACLU was already open to the public. The study found that even though drug use is about even between white and black people, the arrest rate for black people is much higher. They’ve used this data to lobby Illinois state government for changes in the law.

Most recently, the ACLU has created a report on Stop and Frisk in Chicago. Stop and Frisk is when a police officer stops a residents because they have reasonable suspicion that they are about to commit a crime, and that the resident may create a danger to the officer because you may have a weapon. The ACLU feels that the policy has been abused in Chicago.

A most lawsuit that the ACLU was in involved with was the stop and frisk of Olympic gold medal speed skater Shani Davis. Shani was aggressively stopped a few blocks from his mother’s house in Roger’s park. The case was settled with one of the clauses being that the city had to collect more information about stops including an explanation for the reason of suspicion.

As part of a FOIA request by the ACLU, they found that 2014 Chicago had four times the number of stops compared to New York City. (Which really shocked them) The ACLU recommends that the city improve their data collection, have Chicago Police Officers issue receipts when they’re stopped, and require additional training on the use of stop and frisk.

Another effort by the ACLU is to regulate Automated License Plate Readers (ALPRs). These devices can be attached to police cars and can collect all information on every car on the street and geotags it. Currently, there aren’t any restrictions on how this information is stored. State House Bill 3289 regulates this and it’s waiting on action in the Illinois Senate.

You can view the entire presentation here:

The value of small wins in building the civic innovation community

One of the most common pieces of advice I give to civic innovation communities that are just starting up is to start with small wins.

Chicago’s civic innovation ecosystem has been up and running for awhile and we’re currently working on some big, substantial, and complicated projects. The ecosystem here has launched companies, startups, conferences, and boasts one of the largest hack nights in the country.

Even though it seems like Chicago is far far ahead, these efforts didn’t come out of nowhere fully formed. It’s taken time, investment, and effort to get the civic innovation engine running at full power. It’s also a process that’s repeatable. What’s helped to build the ecosystem here has been a series of small wins that grew into bigger ones. With each small win, we spread the news of what we can do with civic innovation – and that gives the community members more credibility to do bigger things.

A good example is the work surrounding the Chicago Department of Public Health. The Chicago Department of Public Health was one of the first government agencies to engage in the civic technology community. (September 11th, 2012 at OpenGov Hack Night to be exact!) That session at hack night resulted in the Chicago Flu Shot app by Tom Kompare. That app quickly spread and was hailed as a great way to for civic hackers to help their cities fight the flu.

Now, the Chicago Department of Public Health is working on advanced apps like Foodborne Chicago and working with Smart Chicago to run an entire Smart Health Center program.

But it started out small.

The small wins strategy isn’t just a Chicago phenomenon. In Philadelphia, a lawyer named Corey Arci was attending his first Code for Philly meetup when he found a derelict bike tracking app from Austin. He worked with others to redeploy the app to Philadelphia. He then worked with Delaware Valley Regional Planning Commission to launch a regional study using CyclePhilly data.

Small wins turn into bigger wins.

When first starting out, a small win can ease the fears of those in government who may see the ‘civic hacking’ term and freak out a little. An example of a small win can be something as simple as putting dots on a map. (Like the flu shot app) or redeploying an existing app (like CutePetsDenver).

It doesn’t matter how small the project is. The point is to show what’s possible and then turn around and go. OK, with this static list of flu shots locations we could do this. With a little more open data and support we could do this! 

The other major part of this is that after you get the small win – you have to tell the story. Telling your story not only builds your group’s credibility, but it also helps attract people to come join your group. If you don’t tell your story – nobody else will. Don’t be afraid to brag after you get your wins.

From there, you can use that momentum to help work on other projects which will yield bigger wins. Powerhouses take time to build, but they all start small and the steps are all repeatable. None of this is magic.

If you’d like help in getting your first small win – consider checking out the Organizing Resources page on the National Day of Civic Hacking website.