Skip to content

Diogo TravassosData leadership · Analytics · Decision-making

Real public data

Acceptance criteria from the documentation, run on Chicago's licence register

The handover set, written from five public documents before any record was read, holds 8 user stories and 37 acceptance criteria.

The request and the requirements

Shown as frozen before the data.

Written from the published documentation only, the five documents on the method page, before any row of the register was read. The stories and criteria are below; this document says why they exist.

1. The request

A city small-business office asks a vague question: "Can we use the open licence data for our licence speed report?" Two people own the answer.

  • The licensing operations lead decides what the office promises new businesses ("most licences are issued within N days") and where to put staff.
  • The performance analyst builds and publishes the monthly report.

Narrowed, the question becomes: can the monthly report read the open register as published, or does it need an acceptance step that holds back failing rows first, and which rules must that step apply? The decision it serves is whether to fund that step before the report goes live.

2. Scope

In scope:

  • the open register as published (one extract, every record since 2002);
  • the stages the register records, from application to expiry, cancellation or revocation;
  • the two report measures: days from application to issue for new licences, and the share of renewals filed on time.

Out of scope:

  • whether the city is fast or slow (that is the report's job, not this one's);
  • fees and inspections (the register holds neither amounts nor inspection results);
  • the separate business owners dataset;
  • any fix to the source system (the data owner decides fixes; this step only holds rows back and logs why).

3. How the process is meant to work

The business process map follows one licence from application to renewal or end, in four lanes: the applicant, the licensing office, other city departments and finance. Each step that writes a field of the register names it. The data flow diagram shows where those fields are created, copied to the open register each night, checked by the acceptance step and read by the report.

4. Business requirements

  • 1. The report shows the median days from application to issue for new licences, by month of issue.
  • 2. The report shows the share of renewals filed by the 15th of the month the previous licence expires, the deadline in Municipal Code 4-4-021.
  • 3. No record is counted twice, and every record type is counted under its documented meaning.
  • 4. A record that breaks a rule is held back with the rule it broke, and the data owner gets the list. Held back rows are counted and the count is published beside each figure.
  • 5. The report and its acceptance step read only the published columns. Owner names never appear in the report; they stay in the quarantine log, which only the analyst and the data owner can open.

5. Data requirements

Each data requirement is a user story with its acceptance criteria, listed below. Every criterion quotes the sentence of the documentation it rests on.

Table
StoryWhat its criteria check
One record, one licenceids present and unique, a licence number on every record, one owner account and one licence type per licence number
Codes agreeeach licence code and activity id has one name, only documented record types and status codes, ward and precinct agree, each community area has one name
Stage dates in orderapplication, documents, payment, approval and issue dates present where the process creates them, in process order, none after the extract date, none before 2002
Term rulesstart and expiry present, expiry after start, a two or four year term, a period starting on the 15th, in the month of issue
Renewals linkedeach renewal continues a period of the same licence, periods do not overlap, the renewal is created near its period start
Status dateda status change date exactly on cancelled, revoked and appealed records, and a cancellation inside its term
Who and wherea valid zip code, an address, a legal name, a location inside the city when a ward is given
Liquor-only stepsconditional approval and location expansion only where liquor is licensed

6. Acceptance and sign-off

The acceptance round runs every criterion on the full extract as a test script: rows in scope, rows failing, a pass or fail, and the failing row keys written to the quarantine log.

  • A criterion passes with no failing row, is within tolerance with failing rows at most 0.1% of its scope, and fails above that. With no row in scope it is not testable.
  • A story is accepted when all its criteria pass or are within tolerance. Otherwise its failing rows are held back and the story goes back to the data owner.
  • The report may go live on accepted rows when the stories behind its measures (stage dates and term rules for the speed measure, term rules and renewals for the renewal measure) are accepted, or when their failing rows are held back and counted as business requirement 4 says.

Roles: the performance analyst runs the round and owns the checks; the licensing operations lead signs each story; the data owner (Business Affairs and Consumer Protection, as the dataset names it) receives every failure log and owns the fixes.

7. Open questions and assumptions

  • Chapter 4-4 says a term is two or four years (4-4-021) and that no licence is granted for longer than two years (4-4-110). The term criterion accepts both terms; the licensing office should say which holds today.
  • The chapter 4-4 text used is a 2011 compilation hosted by the city. A rule amended since would show up as a criterion that fails on most rows.
  • The documentation does not say what values conditional_approval takes. The conditional approval criterion assumes Y.
  • Change of location, capacity, expansion and activity records have no documented term, so the term criteria leave them out.
  • The city's extent in the location criterion (41.64 to 42.03 north, 87.52 to 87.95 west) is an assumption, not a published rule.

Business process map

One licence from application to renewal or end, in four lanes. Grey notes name the register field each step writes. Drawn as code, so the download rebuilds it.

Process map: the applicant registers the business, applies and sends documents; the licensing office reviews, checks for inspection and debt, approves and issues; the licence becomes active, is renewed by the 15th of the expiry month, or is cancelled, revoked or left to expire. Notes name the fields each step writes.

Data flow diagram

Where each field is created, copied to the open register each night, checked by the acceptance step and read by the report.

Data flow: applicants and departments feed the licensing system; a nightly copy publishes the open register; the acceptance step reads it, writes held-back rows to a quarantine log for the data owner and passes accepted rows to the monthly report.

Business case

Written before any row of the register was read. Costs are assumptions, labelled as such; the benefit is measured on the register after the criteria were frozen, on the results page.

The decision

Fund an acceptance step between the open register and the monthly licence speed report, or build the report straight on the register.

Options

Table
OptionWhat it doesCost (assumed)
A. Report straight on the registerThe report reads every published row.none to build
B. Acceptance step (recommended if the rule below holds)The acceptance criteria run on every refresh; failing rows are held back with their rule, counted beside each figure, and sent to the data owner.about 8 analyst days to build, 2 analyst hours a month to read the failure log; at an assumed US$75 an hour, about US$4,500 once and US$1,800 a year
C. Clean the sourceThe data owner fixes the records at source.not priced; the data owner's call, informed by B's failure log

The rule that decides it (declared before the data)

Fund option B when, on the extract, holding back the failing rows moves either measure in any of the five most recent full years (2021 to 2025) by at least:

  • 1 day in the median days from application to issue for new licences, or
  • 1 percentage point in the share of renewals filed on time,

or when more than 1% of the rows a measure reads would be held back. Otherwise build option A and run the checks monthly as an alarm only.

Risks

  • A wrong published figure is corrected in public; the cost is credibility, which this case does not price.
  • The acceptance step can hold back good rows when a requirement is wrong. Criteria that fail on a fifth or more of their rows are treated as a wrong requirement to rewrite, not as bad data.
  • The documentation is partly a 2011 compilation, so some rules may be out of date.

Stories and acceptance criteria

Each criterion quotes the sentence of the documentation it rests on. The tester runs it as a query on the full register.

One record, one licence

As the performance analyst, I want every record and every licence identified once, so that monthly counts of new licences are not doubled.

Criteria: One record, one licence
CriterionGivenThenThe rule it rests on
Record id present and uniqueAny recordIts id is present and no other record has the same idA calculated ID for each record.
Licence id present and uniqueAny recordIts license_id is present and no other record has the same license_idAn internal database ID for each record.
Licence number on every recordAny recordIt carries a license_numberEach license has a single license number that stays consistent throughout the lifetime of the license.
One owner account per licence numberAll records of one license_numberThey carry one account_number (the owner cannot change)No transfer of ownership shall be allowed on any license.
One licence type per licence numberAll records of one license_numberThey carry one license_code (one licence, one type)Each license has a single license number that stays consistent throughout the lifetime of the license.

Codes agree

As the performance analyst, I want codes and their names to agree, and only documented codes, so that the report groups licence types and record types the same way every month.

Criteria: Codes agree
CriterionGivenThenThe rule it rests on
Each licence code has one nameAll records with one license_codeThey carry the same license_description; rows with a description other than the code's most common one failEach code value corresponds to a specific LICENSE DESCRIPTION value.
Each activity id has one nameAll records with one business_activity_idThey carry the same business_activity; rows with an activity other than the id's most common one failEach ID value corresponds to a specific BUSINESS ACTIVITY value.
Only documented record typesAny recordApplication_type is one of ISSUE, RENEW, C_LOC, C_CAPA, C_EXPA, C_SBAis a change of business activity record.
Only documented status codesAny recordLicense_status is one of AAI, AAC, REV, REAmeans the license revocation has been appealed.
Ward and precinct agreeA record with a ward and a precinctWard_precinct is present and holds that ward, then that precinctThe ward and precinct where the business is located.
Each community area has one nameAll records with one community_areaThey carry the same community_area_name; rows with a name other than the area's most common one failCommunity Area Name

Stage dates in order

As the licensing operations lead, I want each record's stage dates present and in process order, so that days from application to issue is a real duration.

Criteria: Stage dates in order
CriterionGivenThenThe rule it rests on
New licences carry an application dateA record that is not a renewalApplication_created_date is presentThe date the business license application was created.
Renewals carry no application dateA renewal recordApplication_created_date is emptyRENEW type records do not have an application.
Documents-complete date on every recordAny recordApplication_requirements_complete is present (documents received, or the renewal record created)For all application types except RENEW, this is the date all required application documents were received.
Application on or before documents completeA non-renewal record with both datesThe application was created on or before the day its documents were completeFor all application types except RENEW, this is the date all required application documents were received.
Documents complete on or before approvalA record with both datesDocuments were complete on or before the day the licence was approved for issuanceThis is the date the license was ready for issuance.
Approval on or before issueA record with both datesThe licence was approved for issuance on or before the day it was issuedThis is the date the license was ready for issuance.
Fee paid on or before issueA record with both datesThe fee was paid on or before the day the licence was issuedSome license types require renewal inspections after license payment but before the license certificate can be issued.
Issue date on every recordAny record (the register holds issued licences)Date_issued is presentBusiness licenses issued by the Department of Business Affairs and Consumer Protection in the City of Chicago from 2002 to the present.
No past-event date after the extractAny recordNo stage date that records a past event (created, complete, payment, approved, issued, status change) is later than the extract dateFrequency: Data is updated daily.
Issued in 2002 or laterA record with an issue dateIt was issued on or after 1 January 2002Time Period: January 1, 2002 to present.

Term rules

As the licensing operations lead, I want each licence period to follow the term rules, so that expiry and renewal dates can be trusted.

Criteria: Term rules
CriterionGivenThenThe rule it rests on
Start and expiry dates presentAny recordLicense_start_date and expiration_date are both presenta licensee may elect to have the term of a license expire at the end of two years or four years
Expiry after startA record with both datesThe licence expires after it startsa licensee may elect to have the term of a license expire at the end of two years or four years
A two or four year termA new or renewal record with both datesThe term is two years (699 to 822 days, which allows an initial licence issued up to 90 days into a period) or four years (1,430 to 1,553 days)a licensee may elect to have the term of a license expire at the end of two years or four years
Period starts on the 15thA new or renewal record with a start dateThe licence period starts on the 15th of a monthshall begin on the 15th day of the month the license was originally issued.
New licence starts in its month of issueA new licence issued from 2011 onIts period starts in the month it was issuedshall begin on the 15th day of the month the license was originally issued.

Renewals linked

As the performance analyst, I want each renewal linked to the period it continues, so that on-time renewal can be measured.

Criteria: Renewals linked
CriterionGivenThenThe rule it rests on
Each renewal continues an earlier periodA renewal recordAnother record of the same license_number expires within the three days before this period startsmay renew any license at the beginning of a new license period upon proper application and payment of the required fee.
Periods of one licence do not overlapThe new and renewal records of one license_number, in start orderNo period starts before the previous one has expiredmay renew any license at the beginning of a new license period upon proper application and payment of the required fee.
Renewal created near its period startA renewal record with both datesThe renewal record was created no more than 90 days before its period starts and no more than 92 days after (the late window before a new application is needed)Licenses may be renewed beginning 45 days prior to the renewal application dates provided in this section.

Status changes dated

As the licensing operations lead, I want cancellations, revocations and appeals dated, so that active licences are counted right.

Criteria: Status changes dated
CriterionGivenThenThe rule it rests on
Status change dated exactly when cancelled, revoked or appealedAny recordLicense_status_change_date is present exactly when the status is AAC, REV or REAThis date corresponds to the date a license was cancelled (AAC), revoked (REV) or appealed (REA).
Cancellation inside the termA cancelled record with its datesThe cancellation date falls between the licence start and expirationmeans the license was cancelled during its term.

Who and where

As a report reader, I want each licence to say who holds it and where it is, so that the report can be cut by area.

Criteria: Who and where
CriterionGivenThenThe rule it rests on
Zip code of five or nine digitsA record with a zip codeZip_code is five digits, optionally followed by a hyphen and four digitsThe business location address and square footage
Address presentAny recordAddress is presentAll such licenses so issued shall bear the seal of the city, the name of the licensee, address,
Location inside the city when a ward is givenA record with a ward (so inside the city)Latitude and longitude are present and inside the city's extent (41.64 to 42.03 north, 87.52 to 87.95 west; an assumption, not a published rule)The ward where the business is located.
Legal name presentAny recordLegal_name is presentAll such licenses so issued shall bear the seal of the city, the name of the licensee, address,

Liquor-only steps

As the licensing operations lead, I want liquor-only steps to appear only on liquor licences, so that liquor processing times are not mixed with others.

Criteria: Liquor-only steps
CriterionGivenThenThe rule it rests on
Conditional approval only on liquor licencesA record marked for conditional approval (value Y)The licence is a liquor licence (its description names liquor)This pertains to applications that contain liquor licenses.
Expansion records only with a liquor licenceA location expansion record (C_EXPA)The same account and site hold a liquor licence in the registeronly applies to businesses that have liquor licenses.