Technical Documentation v1.0

The 311 Data Protocol.

An in-depth exploration of the APIs, datasets, and architectural patterns that bridge municipal service requests with real-time geospatial intelligence.

01 / Infrastructure Overview

What is 311 Data?

311 is a non-emergency telephone number that people can call in many cities to find information about services, make complaints, or report problems like graffiti or road damage. Modern cities have digitized these requests into massive repositories of urban activity.

Core Principles

  • 01Transparency: Making government service performance visible to the public.
  • 02Accountability: Tracking the lifecycle of a request from report to resolution.
  • 03Efficiency: identifying high-density problem areas to optimize city resource allocation.

02 / System Architecture

Deployment Topology

Data Sources

SODA APIs / 311 Nodes

Analysis Hub

Next.js / LRU Cache

Geospatial UI

Leaflet / React Map

Our architecture follows a strictly decoupled approach. The Data Ingestion Layer handles multi-city API pooling, which feeds into our Normalization Engine. Finalized records are cached and delivered through a high-performance React frontend for real-time visualization.

03 / SODA Integration

The Socrata Open Data API

The SODA API provides a RESTful interface for querying datasets using a SQL-like syntax called SoQL. This allows our infrastructure to perform complex filtering, aggregation, and geospatial queries directly on city servers.

Query Layer
$where=REQCATEGORY='ILLDUMP'

We utilize SoQL (Socrata Query Language) to filter massive datasets server-side, ensuring only relevant "Illegal Dumping" records are transmitted.

Auth Protocol
X-App-Token: [API_KEY]

Standardized authentication headers allow for increased rate limits, facilitating the analysis of up to 50,000 requests per query.

Sample Fetching Protocol

To retrieve illegal dumping records from Oakland's 311 dataset for the year 2024, you can use the following `curl` command:

curl "https://data.oaklandca.gov/resource/quth-gb8e.json? \
  $where=REQCATEGORY='ILLDUMP'%20AND%20date_extract_y(DATETIMEINIT)=2024 & \
  $limit=100 & \
  $order=DATETIMEINIT%20DESC" \
  -H "X-App-Token: YOUR_APP_TOKEN"
CURL SAMPLE

Advanced Parameters

$limitControls number of records returned (max 50,000 per request).
$offsetEnables pagination through large datasets by skipping records.
$orderSorts data by timestamp or ID for chronological analysis.

04 / Data Transformation

The Unified Dumping Schema

Every city structures their 311 data differently. Our backend normalizes these disparate JSON payloads into a unified object structure for consistent visualization and analysis.

Standard FieldSource Mapping (Examples)Data Type
idrequest_id, sr_number, unique_keystring
lat / lonlatitude, srx/sry, location.coordinatesfloat64
datetimeinitcreated_date, requested_datetimeISO-8601
statusstatus_description, case_statusstring
descriptionservice_details, descriptor, typestring

04 / Urban Datasets

Supported Nodes

9 Active Data Streams

Oakland

CA

OA
Endpoint
data.oaklandca.gov
Dataset ID
quth-gb8e

San Francisco

CA

SA
Endpoint
data.sfgov.org
Dataset ID
vw6y-z8j6

Los Angeles

CA

LO
Endpoint
data.lacity.org
Dataset ID
b7dx-7gc3

New York City

NY

NE
Endpoint
data.cityofnewyork.us
Dataset ID
erm2-nwe9

Chicago

IL

CH
Endpoint
data.cityofchicago.org
Dataset ID
v6vf-nfxy

Seattle

WA

SE
Endpoint
data.seattle.gov
Dataset ID
bpvk-ju3y

Dallas

TX

DA
Endpoint
www.dallasopendata.com
Dataset ID
gc4d-8a49

Montgomery County

MD

MO
Endpoint
data.montgomerycountymd.gov
Dataset ID
d985-d2ak

Kansas City

MO

KA
Endpoint
data.kcmo.org
Dataset ID
7at3-sxhp