# Reading New York — tutorial kit

Local research snapshot: 18 October 2026. Article: https://theonovak.com/sites/blog/26.10.18_nyc_3d_models.html

## Census

1. Download and extract your own NYC Planning models. Source: https://www.nyc.gov/content/planning/pages/resources/datasets/nyc-3d-model . Original model archives are not included here.
2. Open `inspect_nyc.py` in Rhino 8's Python 3 ScriptEditor. Set `SOURCE` to the extracted folder containing the `.3dm` files directly. Nested folders are not traversed. Set `OUT` to a fresh output folder outside the models folder. The default points to `research-output/evidence` beside this script. Save the script before running.
3. Run the file, then allow its background worker to finish. Keep Rhino running. Inspect `progress.json` and `results.json`. `status=complete` means traversal finished; check `errors=0` as well. Memory and runtime depend on the largest source file and hardware; there is no promised duration. One file is loaded at a time, but it must still fit in memory. Source files and the active document are never saved or modified.
4. In a standard Python terminal, run `python summarize.py` from this folder (or pass the evidence path as its argument). For the study's exact copies: 49 files, 19,320,233 object records, 648,058 eligible footprint entries, 31 feet / 18 millimeter files. A different selection or source revision will differ.
5. Inspect per-file JSON and the footprint and height-proxy CSVs. `inspect_nyc.py` includes assert-based known-answer geometry tests run before extraction. SHA-256 is recorded for every input.

The tested original reader used Rhino 8.35.26251.13001 / CPython 3.9.10. Its portable copy changes paths, validates source/output locations and prevents replacing an existing census. The tutorial verification record distinguishes the original full census from the smaller repeat check of this copy. An optional malformed creation date is recorded, not treated as a geometry-read failure.

## Grasshopper city

1. In a **new** Grasshopper document, add a **Python 3 Script** component (Rhino 8). Set Rhino document units to **meters** before using the preview. No third-party GH plugin or Python package is required.
2. Add five inputs, all **Item** access, with exact names: `n`, `spacing`, `seed`, `scale`, `height_scale`. Create number sliders: n integer 1–20/default7; spacing24–60/default26; seed integer0–1000000/default42; scale0.5–1.3/default0.9; height_scale0.5–3/default1.4. Wire every input.
3. In the Python editor's default Script-Mode, replace its code with **all** of `parametric_city.py`. Avoid SDK/`RunScript` mode: this file expects top-level input variables. Add four output names: `bodies`, `crowns`, `base`, `report`. Output access is the component default; connect geometry outputs to previews or geometry parameters. Bodies/crowns are Brep lists; base is one Brep; report is text. Hide the Python component preview if also using Custom Preview.
4. Default output: 49 bodies, 49 stepped crowns, one 190×190×3 m square base. The geometry checks itself for valid closed solids. No baking or document writes occur on solve. Use separate Custom Preview components to color bodies, crowns and base if desired. Bake only when you choose to keep a particular design.
5. Change n to4: expect16 bodies/crowns and a112 m square base. Reset7; change seed43: new cohort choices. Reset42: exact original numeric layout. Changing scale alters footprint area by its square; changing height_scale affects heights. The validated limits keep rectangles inside separate grid cells.

`cohort.json` records the 96 filtered BK04 tuples embedded in the script. Each tuple keeps area, aspect and a spatially inferred height together; seed selection can reuse the same source tuple. This is not a representative district sample. Rectangle dimensions are derived from area/aspect and do not reproduce original outlines. Regular grid, spacing, flat ground and crowns are invented. No street, parcel, floor-count or planning-compliance claim is made. The included 3DM is a static snapshot, not a parametric GH file: recreate the editable GH component with these steps.

## Notes and checks

Read `research-notes/SNAPSHOT.md` before using the research Markdown files. Original large CSVs/models are omitted; references into `evidence/` refer to that local study, not files in this kit. The article's verification notes say which steps were checked. `manifest.json` identifies all packaged assets by SHA-256. Source models remain obtainable from NYC Planning subject to their terms; this bundle does not grant rights in those models.
