Pipeline status: The application now consumes validated assets generated by the installable package in
pipeline/. Usepython -m tree11_pipeline.cli build --fixturefor a reproducible local build orbuild --fullfor the configured NYC Open Data analysis window. The weekly refresh workflow publishes onlypublic/dataartifacts;fetch_server/is retained as deprecated historical reference.
Tree11 is a public-data dashboard that explains how tree-related NYC 311 service requests progress through NYC Parks inspections and work orders. It was created through a Cornell Tech and New York City Department of Parks and Recreation collaboration.
Lifecycle assets preserve source event time, source update time, and Tree11 observation time separately. They retain compact state deltas rather than raw source exports; see docs/architecture/lifecycle-history.md.
The research layer publishes compact, validated operational artifacts under public/data/research/ and public/data/quality/; the /analysis page exposes backlog, lifecycle, cohort coverage, geography, and data-quality disclosures. See docs/methodology/research-metrics.md.
Production: tree11.org
The Next.js 16 application is connected to a reproducible Python batch pipeline. Fixture builds support local work and PR CI, while a weekly workflow can refresh the configured NYC Open Data window and commit only validated serving assets.
pages/: Next.js Pages Router pages and two API routes.components/: Mapbox map, Chart.js visualizations, navigation, header, and footer.pages/styles/and component SCSS modules: visual styling.pipeline/: installable ingestion, canonicalization, transformation, validation, and publication package.public/data/: generated browser contracts: summary, chart JSON, minimal map GeoJSON, history, and manifest.data/andfetch_server/: retained historical snapshots and deprecated pipeline reference.notebooks/: exploratory data preparation and analysis.
The homepage and primary metric/deep-dive views consume generated JSON. Browser CSV parsing and manually synchronized chart arrays are no longer part of these active paths.
Prerequisites:
- Node.js 22.14.0 (recorded in
.nvmrc) - npm 11 or a compatible npm version
Install and run:
npm ci
npm run devOpen http://localhost:3000.
Create .env.local from .env.example. Without a Mapbox token the map shows a useful configuration error and the rest of the application remains available.
| Variable | Scope | Purpose |
|---|---|---|
NEXT_PUBLIC_MAPBOX_TOKEN |
Browser/public | Mapbox map access token. Restrict it to approved website origins. |
NEXT_PUBLIC_MAPBOX_STYLE |
Browser/public | Optional map style; defaults to Mapbox Streets. |
SOCRATA_APP_TOKEN |
Pipeline only | Optional token for higher NYC Open Data API limits. |
TREE11_ANALYSIS_START |
Pipeline only | Earliest source createddate; defaults to 2022-01-01. |
Never commit .env.local or real credentials.
| Command | Purpose |
|---|---|
npm run dev |
Start the Next.js development server. |
npm run build |
Create an optimized production build. |
npm start |
Serve a completed production build. |
npm run lint |
Run the Next.js ESLint rules. |
Pipeline tests cover deterministic pagination, bounded retries, source identity, relationship quality, transformations, history, and atomic publication. CI also runs fixture build/validation plus frontend lint and production build.
The research pipeline references these NYC Open Data datasets:
- Forestry Service Requests (
mu46-p9is) - Forestry Inspections (
4pt5-3vv4) - Forestry Work Orders (
bdjm-n7q4) - Forestry Risk Assessments (
259a-b6s7), referenced by the experimental fetch script
The data files in this repository are historical snapshots. Running fetch_server/fetch.py is not currently a supported update procedure: it has known state, pagination, validation, and publication defects documented in the audit.
Before opening a pull request, run:
npm ci
npm run lint
npm run build
npm auditGitHub Actions repeats install, lint, optional tests, and build for pull requests and pushes to main.
The repository is believed to be connected to Vercel, with main serving the production domain. Confirm the Git repository, production branch, Node.js version, environment variables, and www.tree11.org domain in the Vercel project before a production release.
Pushing a branch should create a preview deployment when the Git integration is active. Merging into the configured production branch may deploy automatically. This repository does not contain enough configuration to prove the current Vercel project settings.
- If
nextis not recognized, runnpm cifirst. - If linting displays a setup prompt, confirm
.eslintrc.jsonexists. - A build may warn when Google Fonts cannot be downloaded. The current code loads Six Caps remotely; self-hosting it is planned for a later phase.
- Map loading depends on a valid Mapbox token, the external Mapbox style, and
public/tree11_collection.geojson. - The production dependency audit currently reports zero known vulnerabilities. The complete development tree still has two high-severity transitive findings in the lint toolchain; keep the lockfile and framework patches current.
