$npx -y skills add Abhinavbwj/Urban-Design-Skills-Claude --skill urban-calculatorPython computational tools for urban design metric calculations including density, FAR, walkability scoring, parking requirements, green space analysis, and block optimization. Use when the user asks to calculate density, compute FAR, score walkability, determine parking requirem
| 1 | # Urban Calculator |
| 2 | |
| 3 | A suite of Python computational tools for precise urban design metric calculations. Each script is self-contained, accepts inputs via command-line arguments, and outputs both human-readable text and structured JSON. |
| 4 | |
| 5 | ## Available Calculators |
| 6 | |
| 7 | | Script | Purpose | Key Inputs | Key Outputs | |
| 8 | |--------|---------|------------|-------------| |
| 9 | | `density_calculator.py` | Population and dwelling density | Site area, FAR, unit sizes, efficiency | DU/ha, persons/ha, population | |
| 10 | | `far_calculator.py` | FAR and GFA optimization | Site area, coverage, floors, uses | FAR, GFA per use, total GFA | |
| 11 | | `walkability_scorer.py` | Walk Score estimation | Amenity distances, network connectivity | Score 0-100, category | |
| 12 | | `parking_calculator.py` | Parking requirements | Uses, areas, ratios, reductions | Total spaces, area needed | |
| 13 | | `green_space_analyzer.py` | Green space adequacy | Population, park areas, distances | Per capita m2, service coverage | |
| 14 | | `block_optimizer.py` | Block dimension optimization | Target FAR, height, coverage, daylight | Optimal block dimensions | |
| 15 | |
| 16 | ## Usage Instructions |
| 17 | |
| 18 | All scripts are located in the `scripts/` subdirectory relative to this skill. Run them with Python 3 via the command line. Every script supports a `--json` flag to output structured JSON instead of formatted text. |
| 19 | |
| 20 | ### Density Calculator |
| 21 | |
| 22 | Calculate population and dwelling density for a development site: |
| 23 | |
| 24 | ```bash |
| 25 | python scripts/density_calculator.py --site-area 20000 --far 2.5 --avg-unit-size 85 --efficiency 0.75 --household-size 2.5 --residential-pct 0.7 --streets-pct 0.30 |
| 26 | ``` |
| 27 | |
| 28 | Minimal example (uses defaults for optional parameters): |
| 29 | |
| 30 | ```bash |
| 31 | python scripts/density_calculator.py --site-area 15000 --far 3.0 |
| 32 | ``` |
| 33 | |
| 34 | JSON output: |
| 35 | |
| 36 | ```bash |
| 37 | python scripts/density_calculator.py --site-area 20000 --far 2.5 --json |
| 38 | ``` |
| 39 | |
| 40 | ### FAR Calculator |
| 41 | |
| 42 | Calculate Floor Area Ratio and Gross Floor Area by use: |
| 43 | |
| 44 | ```bash |
| 45 | python scripts/far_calculator.py --site-area 10000 --coverage 0.6 --floors 4,6,8 --use-split "res:60,com:25,civic:10,open:5" |
| 46 | ``` |
| 47 | |
| 48 | With bonus FAR for affordable housing: |
| 49 | |
| 50 | ```bash |
| 51 | python scripts/far_calculator.py --site-area 10000 --coverage 0.6 --floors 6 --bonus-far 0.5 |
| 52 | ``` |
| 53 | |
| 54 | With explicit floor areas per zone: |
| 55 | |
| 56 | ```bash |
| 57 | python scripts/far_calculator.py --site-area 10000 --floor-areas "2000,3000,1500" --floors "4,6,8" |
| 58 | ``` |
| 59 | |
| 60 | ### Walkability Scorer |
| 61 | |
| 62 | Estimate a Walk Score based on amenity distances and intersection density: |
| 63 | |
| 64 | ```bash |
| 65 | python scripts/walkability_scorer.py --grocery 200 --restaurants 150 --shopping 400 --coffee 100 --parks 300 --schools 500 --intersection-density 150 |
| 66 | ``` |
| 67 | |
| 68 | Minimal example (unspecified amenities default to 9999m = not present): |
| 69 | |
| 70 | ```bash |
| 71 | python scripts/walkability_scorer.py --grocery 300 --parks 200 |
| 72 | ``` |
| 73 | |
| 74 | ### Parking Calculator |
| 75 | |
| 76 | Determine parking requirements with transit and TDM reductions: |
| 77 | |
| 78 | ```bash |
| 79 | python scripts/parking_calculator.py --residential-units 200 --office-area 5000 --retail-area 2000 --transit-reduction 0.2 --shared-reduction 0.1 --space-type structured |
| 80 | ``` |
| 81 | |
| 82 | Surface parking example: |
| 83 | |
| 84 | ```bash |
| 85 | python scripts/parking_calculator.py --residential-units 50 --space-type surface |
| 86 | ``` |
| 87 | |
| 88 | ### Green Space Analyzer |
| 89 | |
| 90 | Analyze green space provision against international standards: |
| 91 | |
| 92 | ```bash |
| 93 | python scripts/green_space_analyzer.py --population 5000 --parks "Central Park:8000:neighborhood,Pocket Plaza:400:pocket,River Walk:2000:linear" --standard who |
| 94 | ``` |
| 95 | |
| 96 | JSON output with UN-Habitat standard: |
| 97 | |
| 98 | ```bash |
| 99 | python scripts/green_space_analyzer.py --population 12000 --parks "Main Park:15000:district,Local Green:1200:neighborhood" --standard un-habitat --json |
| 100 | ``` |
| 101 | |
| 102 | ### Block Optimizer |
| 103 | |
| 104 | Find optimal block dimensions for a target FAR: |
| 105 | |
| 106 | ```bash |
| 107 | python scripts/block_optimizer.py --target-far 2.5 --max-height 6 --building-depth 14 --min-courtyard 21 --daylight-angle 25 |
| 108 | ``` |
| 109 | |
| 110 | Higher density example: |
| 111 | |
| 112 | ```bash |
| 113 | python scripts/block_optimizer.py --target-far 4.0 --max-height 10 --max-coverage 0.7 --building-depth 16 |
| 114 | ``` |
| 115 | |
| 116 | ## Formula Reference |
| 117 | |
| 118 | All formulas, worked examples, unit conversions, and standard assumptions are documented in `references/formulas.md`. Key formulas used across the calculators: |
| 119 | |
| 120 | - **FAR** = Total GFA / Site Area |
| 121 | - **Net Density (DU/ha)** = Dwelling Units / Net Site Area (ha) |
| 122 | - **Gross Density (DU/ha)** = Dwelling Units / Gross Site Area including streets (ha) |
| 123 | - **Population Density** = Net Density x Household Size |
| 124 | - **Wa |