diff --git a/.claude/skills/motion-video/toolkit/dc/compose-area.sh b/.claude/skills/motion-video/toolkit/dc/compose-area.sh new file mode 100644 index 0000000..f79f9fb --- /dev/null +++ b/.claude/skills/motion-video/toolkit/dc/compose-area.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Remotion pass: map frames (from three-render) + timeline -> final MP4s. +# usage: compose-area.sh AREA_DIR FRAMES_DIR NAME [still FRAME] +set -e; cd $(dirname $0); A=$1; FR=$2; N=$3; R=../remo; PORT=8765 +mkdir -p $A/flat; rm -f $A/flat/*.jpg +for f in $FR/s*/f*.jpg; do ln -sf "$(realpath $f)" $A/flat/; done +python3 - "$A" "$FR" <<'PY' +import json, glob, sys +A, FR = sys.argv[1:3]; tl = json.load(open(f'{A}/timeline.json')); pins = {} +for fn in glob.glob(f'{FR}/s*/ov.jsonl'): + for l in open(fn): + o = json.loads(l) + if o.get('pins'): pins[str(o['f'])] = o['pins'] +import os +if os.path.exists(f'{A}/labels.json') and os.path.exists(f'{A}/labels-proj.json'): tl['labels'] = {'defs': json.load(open(f'{A}/labels.json')), 'proj': json.load(open(f'{A}/labels-proj.json'))} +tl['pins'] = pins; tl['frameDir'] = 'http://127.0.0.1:8765' +json.dump(tl, open('../remo/public/timeline.json', 'w')); print('timeline', tl['total'], 'frames,', len(pins), 'frames with pins') +PY +python3 -m http.server $PORT -d $A/flat >/dev/null 2>&1 & SRV=$!; trap "kill $SRV" EXIT; sleep 1 +CH=/opt/pw-browsers/chromium_headless_shell-1194/chrome-linux/headless_shell +cd $R +if [ "$4" = "still" ]; then npx remotion still src/index.ts Motion ../rec/$A/still-$5.png --frame=$5 --browser-executable=$CH --log=error; exit 0; fi +npx remotion render src/index.ts Motion ../tiktok/$N.mp4 --browser-executable=$CH --codec=h264 --crf=17 --concurrency=3 --log=error +cd ../tiktok && D=$(python3 -c "import json;t=json.load(open('../remo/public/timeline.json'));print(t['total']/t['fps']-4)") +ffmpeg -y -loglevel error -i $N.mp4 -i "../music/Floating%20Cities.mp3" -filter_complex "[1:a]afade=t=in:st=0:d=1.5,afade=t=out:st=$D:d=4,volume=0.8[m];[0:a][m]amix=inputs=2:normalize=0:duration=first,loudnorm=I=-14:TP=-1.5:LRA=11[a]" -map 0:v -map "[a]" -c:v copy -ar 48000 -c:a aac -b:a 192k -movflags +faststart $N-youtube-music.mp4 +ls -la $N*.mp4 | awk '{print $5,$9}'; echo COMPOSE-DONE +Shell cwd was reset to /home/user/Motion \ No newline at end of file diff --git a/.claude/skills/motion-video/toolkit/dc/compose-dc.sh b/.claude/skills/motion-video/toolkit/dc/compose-dc.sh new file mode 100644 index 0000000..bedf97d --- /dev/null +++ b/.claude/skills/motion-video/toolkit/dc/compose-dc.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Remotion pass for the DC video: map frames (three-render) + timeline -> final MP4. +# usage (from the toolkit copy): bash dc/compose-dc.sh dcv FRAMES_DIR NAME [still FRAME] +# needs dcv/timeline.json (make-dc-job.py), optional dcv/labels.json + dcv/labels-proj.json (PROJ pass), remo/ with node_modules. +set -e; cd "$(dirname "$0")/.."; A=$1; FR=$2; N=$3; PORT=8765 +mkdir -p $A/flat out; rm -f $A/flat/*.jpg +for f in $FR/s*/f*.jpg; do ln -sf "$(realpath $f)" $A/flat/; done +python3 - "$A" <<'PY' +import json, os, sys +A = sys.argv[1]; tl = json.load(open(f'{A}/timeline.json')) +if os.path.exists(f'{A}/labels.json') and os.path.exists(f'{A}/labels-proj.json'): tl['labels'] = {'defs': json.load(open(f'{A}/labels.json')), 'proj': json.load(open(f'{A}/labels-proj.json'))} +tl['pins'] = {}; tl['frameDir'] = 'http://127.0.0.1:8765' +json.dump(tl, open('remo/public/timeline.json', 'w')); print('timeline', tl['total'], 'frames') +PY +python3 -m http.server $PORT -d $A/flat >/dev/null 2>&1 & SRV=$!; trap "kill $SRV" EXIT; sleep 1 +CH=$(ls /opt/pw-browsers/chromium_headless_shell-*/chrome-*/{headless_shell,chrome-headless-shell} 2>/dev/null | head -1) +cd remo +if [ "$4" = "still" ]; then npx remotion still src/index.ts Motion ../$A/still-$5.png --frame=$5 --browser-executable=$CH --log=error; exit 0; fi +npx remotion render src/index.ts Motion ../out/$N.mp4 --browser-executable=$CH --codec=h264 --crf=18 --concurrency=3 --log=error +ls -la ../out/$N*.mp4 | awk '{print $5,$9}'; echo COMPOSE-DONE diff --git a/.claude/skills/motion-video/toolkit/dc/config.json b/.claude/skills/motion-video/toolkit/dc/config.json new file mode 100644 index 0000000..a28b49d --- /dev/null +++ b/.claude/skills/motion-video/toolkit/dc/config.json @@ -0,0 +1,417 @@ +{ + "name": "Washington", + "day": "2026-11-18", + "len": 79.5, + "fps": 30, + "prefix": "day", + "slices": 15, + "title": "24 hours in Washington", + "kicker": "WEDNESDAY, NOVEMBER 18", + "sub": "every Metro train, bus and flight, recorded live", + "date": "wednesday, november 18", + "outro_line": "recorded live, nothing simulated", + "outro_from": 76.5, + "hook": { + "place": "Washington", + "line": "Metro trains and buses moving right now.", + "cta": "now watch the whole day \u2192" + }, + "counter_label": "metro trains and buses moving", + "credit": "motion. WMATA, MARC, VRE, DASH, Fairfax Connector, Amtrak realtime feeds. flights ADS-B (adsb.lol, adsb.fi). map CARTO, OpenStreetMap", + "look": { + "geo": [ + -77.03, + 38.9 + ], + "hi_png": "dcv/bg-core.png", + "hi_proj": "dcv/bg-core-proj.json", + "sunrise": "6:57", + "sunset": "16:49", + "noon": "11:53", + "railW": 1.6, + "dotScale": 1.3, + "dotBright": 1.2, + "busA": 0.75, + "fogNear": 6500, + "fogFar": 16000, + "runways": "dc/runways.json", + "planeScale": 0.4, + "drops": false, + "railDim": 0.55, + "railOpacity": 1.0, + "trainCore": true, + "busColor": "#ffb347", + "railMiter": true, + "overTrails": false, + "ringScale": 0.45, + "ringAlpha": 0.55 + }, + "warp": [ + [ + 0, + "8:13" + ], + [ + 3, + "8:16" + ], + [ + 3, + "0:00" + ], + [ + 5.0, + "1:05" + ], + [ + 6.75, + "1:10" + ], + [ + 8.5, + "1:15" + ], + [ + 10.25, + "1:20" + ], + [ + 12.0, + "1:25" + ], + [ + 14.0, + "4:30" + ], + [ + 15.75, + "4:35" + ], + [ + 17.5, + "4:40" + ], + [ + 19.25, + "4:45" + ], + [ + 21.0, + "4:50" + ], + [ + 23.5, + "7:50" + ], + [ + 27.0, + "8:00" + ], + [ + 30.5, + "8:10" + ], + [ + 34.0, + "8:20" + ], + [ + 37.5, + "8:30" + ], + [ + 40.0, + "9:40" + ], + [ + 43.4, + "9:45" + ], + [ + 46.8, + "9:50" + ], + [ + 50.2, + "9:55" + ], + [ + 53.6, + "10:00" + ], + [ + 57.0, + "10:05" + ], + [ + 59.5, + "17:15" + ], + [ + 63.0, + "17:25" + ], + [ + 66.5, + "17:35" + ], + [ + 70.0, + "17:45" + ], + [ + 73.5, + "17:55" + ], + [ + 76.5, + "23:59" + ], + [ + 79.5, + "23:59:59" + ] + ], + "cam": [ + [ + 0, + -77.03, + 38.898, + -15, + 48, + 800, + 0 + ], + [ + 3, + -77.03, + 38.898, + -10, + 50, + 850, + 0 + ], + [ + 3, + -77.05, + 38.915, + -12, + 38, + 2200, + 0 + ], + [ + 21, + -77.045, + 38.91, + -15, + 40, + 1900, + 0 + ], + [ + 23.5, + -77.035, + 38.902, + -8, + 46, + 1100, + 0 + ], + [ + 37.5, + -77.03, + 38.898, + 4, + 48, + 950, + 0 + ], + [ + 40, + -77.038, + 38.856, + -12, + 52, + 620, + 0 + ], + [ + 48.5, + -77.04, + 38.852, + 2, + 55, + 540, + 0 + ], + [ + 57, + -77.04, + 38.85, + 14, + 56, + 580, + 0 + ], + [ + 59.5, + -77.03, + 38.898, + -10, + 48, + 1000, + 0 + ], + [ + 73.5, + -77.03, + 38.9, + 8, + 46, + 1100, + 0 + ], + [ + 76.5, + -77.05, + 38.915, + 0, + 38, + 2300, + 0 + ], + [ + 79.5, + -77.05, + 38.915, + 0, + 38, + 2300, + 0 + ] + ], + "focus": [ + [ + 0, + { + "transit": 1, + "planes": 0.6, + "lime": 0 + } + ], + [ + 37.5, + { + "transit": 1, + "planes": 0.6, + "lime": 0 + } + ], + [ + 40, + { + "transit": 0.6, + "planes": 1, + "lime": 0 + } + ], + [ + 57, + { + "transit": 0.6, + "planes": 1, + "lime": 0 + } + ], + [ + 59, + { + "transit": 1, + "planes": 0.6, + "lime": 0 + } + ], + [ + 79.5, + { + "transit": 1, + "planes": 0.6, + "lime": 0 + } + ] + ], + "chapters": [ + [ + "6:00", + "rush hour" + ], + [ + "9:45", + "national airport" + ], + [ + "15:30", + "evening rush" + ] + ], + "cards": [ + { + "at": "1:17", + "hold": 3.4, + "kick": "1:17 am", + "fact": null, + "text": "The last Metro train stops moving." + }, + { + "at": "4:40", + "hold": 3.4, + "kick": "4:40 am", + "fact": "metro_dark_minutes", + "count_up": false, + "text": "Metro sat dark for 3 hours 23 minutes. The buses never stopped." + }, + { + "at": "8:15", + "hold": 3.4, + "kick": "8:15 am, the peak", + "fact": "all_peak_am", + "text": "Metro trains and buses moving at the same moment." + }, + { + "at": "10:00", + "hold": 3.4, + "kick": "9 to 10 am", + "fact": "DCA_by_hour", + "text": "landings and takeoffs at Reagan National in that one hour.", + "value_path": [ + "value", + "9" + ] + }, + { + "at": "17:32", + "hold": 3.4, + "kick": "5:32 pm, the evening peak", + "fact": "all_peak_pm", + "text": "Metro trains and buses moving at once, more than the morning." + } + ], + "legend": [ + { + "kind": "train", + "label": "train", + "color": "#BF0D3E" + }, + { + "kind": "bus", + "label": "bus", + "color": "#ffb347" + }, + { + "kind": "plane", + "label": "flight" + } + ], + "ff_chip": true +} \ No newline at end of file diff --git a/.claude/skills/motion-video/toolkit/dc/facts-dc.py b/.claude/skills/motion-video/toolkit/dc/facts-dc.py new file mode 100644 index 0000000..935ccf6 --- /dev/null +++ b/.claude/skills/motion-video/toolkit/dc/facts-dc.py @@ -0,0 +1,62 @@ +# Verified numbers for the DC video, from prep-dc.py outputs. Prints every count with its rule; writes OUT/facts.json and OUT/running.json. +# usage: python3 dc/facts-dc.py PREFIX OUTDIR Y-M-D +# Counting rules (quote them in the caption if asked): +# moving = a vehicle with a position fix in the 2 minutes up to t AND at least 100 m between its fixes in the 4 minutes around t. +# Metro = WMATA rail vehicles in the Metrorail realtime feed (route RED/ORANGE/SILVER/BLUE/YELLOW/GREEN). +# bus = WMATA Metrobus vehicles (other operators are counted separately). +# flights = ground<->air changes within 4 km of the airport (prep-dc.py events). A change seen twice within 5 min counts once. +import json, sys, math, bisect, collections, os +from datetime import datetime +from zoneinfo import ZoneInfo +ET = ZoneInfo('America/New_York') +pre, outd, day = sys.argv[1:4]; os.makedirs(outd, exist_ok=True) +y, m, d = map(int, day.split('-')); D0 = int(datetime(y, m, d, tzinfo=ET).timestamp() * 1000) +hm = lambda t: datetime.fromtimestamp(t / 1000, ET).strftime('%-I:%M %p').lower() +TR = json.load(open(f'{pre}-transit.json')); PL = json.load(open(f'{pre}-planes.json')) +km = lambda a, b: math.hypot((a[1] - b[1]) * 86.6, (a[2] - b[2]) * 111.2) +STEP = 60000; t0 = min(tr[0][0] for tr in TR['tracks'].values()) // STEP * STEP; t1 = max(tr[-1][0] for tr in TR['tracks'].values()) +NB = (t1 - t0) // STEP + 1 +series = collections.defaultdict(lambda: [0] * NB) +for k, tr in TR['tracks'].items(): + f = TR['props'][k]['f']; ts = [q[0] for q in tr] + for i in range(NB): + t = t0 + i * STEP; j = bisect.bisect_right(ts, t) - 1 + if j < 0 or t - ts[j] > 120000: continue + a = bisect.bisect_left(ts, t - 120000); b = bisect.bisect_right(ts, t + 120000) - 1 + if b > a and max(km(tr[a], tr[x]) for x in range(a + 1, b + 1)) >= 0.1: series[f][i] += 1 +at = lambda i: t0 + i * STEP +day_ix = lambda h0, h1: [i for i in range(NB) if D0 + h0 * 3600000 <= at(i) < D0 + h1 * 3600000] +def peak(f, h0, h1): + ix = day_ix(h0, h1); i = max(ix, key=lambda i: series[f][i]) if ix else None + return None if i is None else {'value': series[f][i], 't': at(i), 'clock': hm(at(i))} +F = {} +F['rail_peak_am'] = peak('wmata-rail', 6, 10); F['rail_peak_pm'] = peak('wmata-rail', 15, 19) +F['bus_peak_am'] = peak('wmata-bus', 6, 10); F['bus_peak_pm'] = peak('wmata-bus', 15, 19) +both = [series['wmata-rail'][i] + series['wmata-bus'][i] for i in range(NB)] +for nm, h0, h1 in (('all_peak_am', 6, 10), ('all_peak_pm', 15, 19)): + ix = day_ix(h0, h1) + if ix: i = max(ix, key=lambda i: both[i]); F[nm] = {'value': both[i], 't': at(i), 'clock': hm(at(i))} +# Metro overnight: last minute with a moving train before 3 am, first after 3 am (night of the recording start) +r = series['wmata-rail']; c3 = D0 + 3 * 3600000 +last = max((i for i in range(NB) if at(i) < c3 and r[i] > 0), default=None); first = min((i for i in range(NB) if at(i) >= c3 and r[i] > 0), default=None) +if last is not None: F['metro_last_train'] = {'value': hm(at(last)), 't': at(last)} +if first is not None: F['metro_first_train'] = {'value': hm(at(first)), 't': at(first)} +if last is not None and first is not None: F['metro_dark_minutes'] = {'value': (at(first) - at(last)) // 60000} +F['bus_3am'] = {'value': series['wmata-bus'][(c3 - t0) // STEP] if 0 <= (c3 - t0) // STEP < NB else None, 't': c3} +# flights +ev, seen = [], {} +for e in PL['events']: + key = (e[3], e[0], e[4]) + if key in seen and e[1] - seen[key] < 300000: continue + seen[key] = e[1]; ev.append(e) +for ap in ('DCA', 'IAD', 'BWI'): + E = [e for e in ev if e[4] == ap and D0 <= e[1] < D0 + 86400000] + F[f'{ap}_flights'] = {'value': len(E), 'arr': sum(e[0] == 'arr' for e in E), 'dep': sum(e[0] == 'dep' for e in E)} + hrs = collections.Counter(datetime.fromtimestamp(e[1] / 1000, ET).hour for e in E) + if hrs: h, n = hrs.most_common(1)[0]; F[f'{ap}_busiest_hour'] = {'value': n, 'hour': h} + F[f'{ap}_by_hour'] = {'value': {str(k): hrs[k] for k in sorted(hrs)}} +cov = {f: sum(1 for v in s if v) for f, s in series.items()} +F['_coverage_minutes'] = {'value': cov, 'from': hm(t0), 'to': hm(t1)} +json.dump({'facts': F, 'rules': 'see header of facts-dc.py'}, open(f'{outd}/facts.json', 'w'), indent=1) +json.dump({'t0': t0, 'step': STEP, 'rail': series['wmata-rail'], 'bus': series['wmata-bus'], 'all': both}, open(f'{outd}/running.json', 'w'), separators=(',', ':')) +for k, v in F.items(): print(f'{k:22s} {v}') diff --git a/.claude/skills/motion-video/toolkit/dc/labels.json b/.claude/skills/motion-video/toolkit/dc/labels.json new file mode 100644 index 0000000..eaaa0d8 --- /dev/null +++ b/.claude/skills/motion-video/toolkit/dc/labels.json @@ -0,0 +1,22 @@ +[ + {"t":"wp","label":"Capitol","at":[-77.0091,38.8899]}, + {"t":"wp","label":"White House","at":[-77.0365,38.8977]}, + {"t":"wp","label":"Washington Monument","at":[-77.0352,38.8895]}, + {"t":"wp","label":"Lincoln Memorial","at":[-77.0502,38.8893]}, + {"t":"wp","label":"Pentagon","at":[-77.0558,38.8719]}, + {"t":"wp","label":"Union Station","at":[-77.0063,38.8973]}, + {"t":"wp","label":"Reagan National","at":[-77.0410,38.8520]}, + {"t":"hood","label":"Georgetown","at":[-77.0654,38.9097]}, + {"t":"hood","label":"Capitol Hill","at":[-76.9960,38.8870]}, + {"t":"hood","label":"Navy Yard","at":[-77.0030,38.8760]}, + {"t":"hood","label":"Anacostia","at":[-76.9850,38.8630]}, + {"t":"hood","label":"Dupont Circle","at":[-77.0434,38.9096]}, + {"t":"hood","label":"Columbia Heights","at":[-77.0300,38.9280]}, + {"t":"hood","label":"Rosslyn","at":[-77.0717,38.8960]}, + {"t":"hood","label":"Crystal City","at":[-77.0510,38.8570]}, + {"t":"hood","label":"Old Town Alexandria","at":[-77.0470,38.8048]}, + {"t":"hood","label":"Silver Spring","at":[-77.0261,38.9907]}, + {"t":"hood","label":"Bethesda","at":[-77.0947,38.9847]}, + {"t":"boro","label":"VIRGINIA","at":[-77.1500,38.8500]}, + {"t":"boro","label":"MARYLAND","at":[-76.9300,38.9600]} +] diff --git a/.claude/skills/motion-video/toolkit/dc/make-area-job.py b/.claude/skills/motion-video/toolkit/dc/make-area-job.py new file mode 100644 index 0000000..37ac061 --- /dev/null +++ b/.claude/skills/motion-video/toolkit/dc/make-area-job.py @@ -0,0 +1,81 @@ +# Area video from a recorded day: config + facts -> map-only render job (three/area.html) + Remotion timeline. +# usage: python3 make-area-job.py bk/config.json [test frames e.g. 0,600] -> bk/job.json (or bk/job-test.json), bk/timeline.json +# Config: area/day/len/fps, warp = [[video s, "HH:MM[:SS]"], ...] (a repeated video second = hard cut), cam = [[s, lon, lat, az, tilt, dist, lead], ...] +# (repeat a second to cut), focus = [[s, {layer: w}]], cards = [{"at": "HH:MM" clock it may appear, "hold": s, "kick", "fact": key or null, +# "value_path": [...], "big": suffix, "text"}], pins = [[s0, s1, label, lon, lat]], counter = "bus". +import json, sys, bisect, math, os +from datetime import datetime +from zoneinfo import ZoneInfo +cfgp = sys.argv[1]; C = json.load(open(cfgp)); OUTD = os.path.dirname(cfgp); facts = json.load(open(os.path.join(OUTD, 'facts.json')))['facts'] +ET = ZoneInfo('America/New_York'); y, m, d = map(int, C['day'].split('-')); D0 = int(datetime(y, m, d, tzinfo=ET).timestamp() * 1000) +def clk(s): + p = list(map(int, s.split(':'))) + [0, 0]; return D0 + (p[0] * 3600 + p[1] * 60 + p[2]) * 1000 +FPS, DUR = C['fps'], C['len']; N = int(DUR * FPS); F = lambda s: int(round(s * FPS)) +# ---- time warp: piecewise monotone cubic per segment; a repeated video second starts a new segment (hard cut) +A = [(s, clk(c)) for s, c in C['warp']] +segs, cur = [], [A[0]] +for a in A[1:]: + if a[0] == cur[-1][0]: segs.append(cur); cur = [a] + else: cur.append(a) +segs.append(cur) +def mono(pts): + xs = [p[0] for p in pts]; ys = [p[1] for p in pts] + if len(xs) == 1: return lambda v: ys[0] + d = [(ys[i + 1] - ys[i]) / (xs[i + 1] - xs[i]) for i in range(len(xs) - 1)] + mm = [d[0]] + [0 if d[i - 1] * d[i] <= 0 else 2 / (1 / d[i - 1] + 1 / d[i]) for i in range(1, len(d))] + [d[-1]] + def f(v): + i = max(0, min(len(xs) - 2, next((j for j in range(len(xs) - 1) if v < xs[j + 1]), len(xs) - 2))) + h = xs[i + 1] - xs[i]; t = max(0, min(1, (v - xs[i]) / h)); t2, t3 = t * t, t * t * t + return int((2 * t3 - 3 * t2 + 1) * ys[i] + (t3 - 2 * t2 + t) * h * mm[i] + (-2 * t3 + 3 * t2) * ys[i + 1] + (t3 - t2) * h * mm[i + 1]) + return f +fs_ = [(sg[0][0], mono(sg)) for sg in segs] +def clock(v): return [f for s0, f in fs_ if s0 <= v][-1](v) +tmap = [clock(f / FPS) for f in range(N)] +for sg_start, _ in fs_[1:]: + pass +cuts = [F(s0) for s0, _ in fs_[1:]] +for i in range(1, N): + if i not in cuts: assert tmap[i] >= tmap[i - 1], ('time ran backwards', i) +# ---- camera: keyframes; a repeated second = cut (two keys one frame apart) +keys, prev = [], None +for s, lon, lat, az, ti, di, le in C['cam']: + f = F(s) + (1 if prev is not None and F(s) <= prev else 0); prev = f + keys.append({'f': f, 'at': [lon, lat], 'az': az, 'tilt': ti, 'dist': di, 'lead': le}) +focus = [{'f': F(s), 'w': w} for s, w in C['focus']] +# ---- cards: appear only once the clock has reached their time, after any cut, never overlapping +def first_frame(c, after=0): + for i in range(after, N): + if tmap[i] >= c and (i == 0 or tmap[i - 1] < c or i == after): return i + raise SystemExit(f'card time {c} never reached') +cards, last = [], 0 +for c in C['cards']: + v = None + if c.get('fact'): + v = facts[c['fact']] + for k in c.get('value_path', ['value']): v = v[k] + if c.get('abs') and isinstance(v, (int, float)): v = abs(v) + f0 = max(first_frame(clk(c['at']), max(last, cuts[0] if cuts and c.get('after_cut', True) else 0)), last + F(0.3)); f1 = f0 + F(c['hold']) + assert f1 < N, c + cards.append({'f0': f0, 'f1': f1, 'kick': c['kick'], 'big': c.get('big', ''), 'bigValue': v if isinstance(v, (int, float)) and c.get('count_up', True) else None, 'decimals': c.get('decimals', 0), + 'text': c['text'].replace('{v}', f'{v:,}' if isinstance(v, (int, float)) else str(v))}); last = f1 +chapters = [{'f': first_frame(clk(t), cuts[0] if cuts else 0), 'text': x} for t, x in C.get('chapters', [])] +pins = [{'f0': F(a), 'f1': F(b), 'label': l, 'at': [lo, la]} for a, b, l, lo, la in C.get('pins', [])] +# ---- counter series per frame (area numbers only) +run = json.load(open(os.path.join(OUTD, 'running-area.json'))) +def series(T): i = (T - run['t0']) // run['step']; return run['bus'][int(max(0, min(len(run['bus']) - 1, i)))] +counter = [{'label': f"mta buses on the move in {C['name'].lower()}", 'values': [series(T) for T in tmap]}] +base = json.load(open('job-v5.json')) # reuse the proven NYC v5 look/assets +look = dict(base['look']); look.update({'total': N, 'tmap': tmap, 'keys': keys, 'focus': focus, 'notes': [], 'pins': pins, 'noText': True, 'textFrames': 10 ** 6, + 'ovIn': 10 ** 6, 'hudOut': 10 ** 6, 'expoKeys': None, 'dayStart': D0}) +NS = C.get('slices', 12) +job = dict(base); job.update({'total': N, 'page': 'area.html', 'fps': FPS, 'overlay': True, 'look': look, 'slices': [{'f0': i * N // NS, 'f1': (i + 1) * N // NS} for i in range(NS)]}) +if len(sys.argv) > 2: + fr = [int(x) for x in sys.argv[2].split(',')]; job['slices'] = [{'f0': f, 'f1': f + 1} for f in fr]; job['warm'] = 90 + json.dump(job, open(os.path.join(OUTD, 'job-test.json'), 'w')) +else: json.dump(job, open(os.path.join(OUTD, 'job.json'), 'w')) +tl = {'total': N, 'fps': FPS, 'clock': tmap, 'date': C['date'], 'title': C['title'], 'kicker': C.get('kicker', 'MOTION'), 'sub': C['sub'], 'counter': counter, + 'cards': cards, 'chapters': chapters, 'cuts': cuts, 'dayStart': D0, 'pins': {}, 'credit': C['credit'], 'outroFrom': F(C.get('outro_from', DUR - 3)), 'frameDir': 'frames'} +json.dump(tl, open(os.path.join(OUTD, 'timeline.json'), 'w')) +for c in cards: print(f"{c['f0']/FPS:6.1f}-{c['f1']/FPS:6.1f}s clock {datetime.fromtimestamp(tmap[c['f0']]/1000, ET):%H:%M} {c['kick']}: {c['text']}") +print('frames', N, 'cuts at', [c / FPS for c in cuts]) + diff --git a/.claude/skills/motion-video/toolkit/dc/make-dc-job.py b/.claude/skills/motion-video/toolkit/dc/make-dc-job.py new file mode 100644 index 0000000..b4206c8 --- /dev/null +++ b/.claude/skills/motion-video/toolkit/dc/make-dc-job.py @@ -0,0 +1,87 @@ +# DC video: config + facts -> map-only render job (three/dc.html) + Remotion timeline. Adapted from the Brooklyn make-area-job.py. +# usage: python3 dc/make-dc-job.py dcv/config.json [test frames e.g. 0,600] -> OUTD/job.json (or job-test.json), OUTD/timeline.json +# OUTD (the config's folder) needs facts.json + running.json from facts-dc.py. +# Config: area/day/len/fps, warp = [[video s, "HH:MM[:SS]"], ...] (a repeated video second = hard cut), cam = [[s, lon, lat, az, tilt, dist, lead], ...] +# (repeat a second to cut), focus = [[s, {layer: w}]], cards = [{"at": "HH:MM" clock it may appear, "hold": s, "kick", "fact": key or null, +# "value_path": [...], "big": suffix, "text"}], pins = [[s0, s1, label, lon, lat]], counter = "bus". +import json, sys, bisect, math, os +from datetime import datetime +from zoneinfo import ZoneInfo +cfgp = sys.argv[1]; C = json.load(open(cfgp)); OUTD = os.path.dirname(cfgp); facts = json.load(open(os.path.join(OUTD, 'facts.json')))['facts'] +ET = ZoneInfo('America/New_York'); y, m, d = map(int, C['day'].split('-')); D0 = int(datetime(y, m, d, tzinfo=ET).timestamp() * 1000) +def clk(s): + p = list(map(int, s.split(':'))) + [0, 0]; return D0 + (p[0] * 3600 + p[1] * 60 + p[2]) * 1000 +FPS, DUR = C['fps'], C['len']; N = int(DUR * FPS); F = lambda s: int(round(s * FPS)) +# ---- time warp: piecewise monotone cubic per segment; a repeated video second starts a new segment (hard cut) +A = [(s, clk(c)) for s, c in C['warp']] +segs, cur = [], [A[0]] +for a in A[1:]: + if a[0] == cur[-1][0]: segs.append(cur); cur = [a] + else: cur.append(a) +segs.append(cur) +def mono(pts): + xs = [p[0] for p in pts]; ys = [p[1] for p in pts] + if len(xs) == 1: return lambda v: ys[0] + d = [(ys[i + 1] - ys[i]) / (xs[i + 1] - xs[i]) for i in range(len(xs) - 1)] + mm = [d[0]] + [0 if d[i - 1] * d[i] <= 0 else 2 / (1 / d[i - 1] + 1 / d[i]) for i in range(1, len(d))] + [d[-1]] + def f(v): + i = max(0, min(len(xs) - 2, next((j for j in range(len(xs) - 1) if v < xs[j + 1]), len(xs) - 2))) + h = xs[i + 1] - xs[i]; t = max(0, min(1, (v - xs[i]) / h)); t2, t3 = t * t, t * t * t + return int((2 * t3 - 3 * t2 + 1) * ys[i] + (t3 - 2 * t2 + t) * h * mm[i] + (-2 * t3 + 3 * t2) * ys[i + 1] + (t3 - t2) * h * mm[i + 1]) + return f +fs_ = [(sg[0][0], mono(sg)) for sg in segs] +def clock(v): return [f for s0, f in fs_ if s0 <= v][-1](v) +tmap = [clock(f / FPS) for f in range(N)] +for sg_start, _ in fs_[1:]: + pass +cuts = [F(s0) for s0, _ in fs_[1:]] +for i in range(1, N): + if i not in cuts: assert tmap[i] >= tmap[i - 1], ('time ran backwards', i) +# ---- camera: keyframes; a repeated second = cut (two keys one frame apart) +keys, prev = [], None +for s, lon, lat, az, ti, di, le in C['cam']: + f = F(s) + (1 if prev is not None and F(s) <= prev else 0); prev = f + keys.append({'f': f, 'at': [lon, lat], 'az': az, 'tilt': ti, 'dist': di, 'lead': le}) +focus = [{'f': F(s), 'w': w} for s, w in C['focus']] +# ---- cards: appear only once the clock has reached their time, after any cut, never overlapping +def first_frame(c, after=0): + for i in range(after, N): + if tmap[i] >= c and (i == 0 or tmap[i - 1] < c or i == after): return i + raise SystemExit(f'card time {c} never reached') +cards, last = [], 0 +for c in C['cards']: + v = None + if c.get('fact'): + v = facts[c['fact']] + for k in c.get('value_path', ['value']): v = v[k] + if c.get('abs') and isinstance(v, (int, float)): v = abs(v) + f0 = max(first_frame(clk(c['at']), max(last, cuts[0] if cuts and c.get('after_cut', True) else 0)), last + F(0.3)); f1 = f0 + F(c['hold']) + assert f1 < N, c + cards.append({'f0': f0, 'f1': f1, 'kick': c['kick'], 'big': c.get('big', ''), 'bigValue': v if isinstance(v, (int, float)) and c.get('count_up', True) else None, 'decimals': c.get('decimals', 0), + 'text': c['text'].replace('{v}', f'{v:,}' if isinstance(v, (int, float)) else str(v))}); last = f1 +chapters = [{'f': first_frame(clk(t), cuts[0] if cuts else 0), 'text': x} for t, x in C.get('chapters', [])] +pins = [{'f0': F(a), 'f1': F(b), 'label': l, 'at': [lo, la]} for a, b, l, lo, la in C.get('pins', [])] +# ---- counter series per frame: Metro trains + Metrobuses moving (facts-dc.py rule) +run = json.load(open(os.path.join(OUTD, 'running.json'))) +def series(T): i = (T - run['t0']) // run['step']; return run['all'][int(max(0, min(len(run['all']) - 1, i)))] +counter = [{'label': C.get('counter_label', 'metro trains and buses moving'), 'values': [series(T) for T in tmap]}] +L = C['look']; pre = C['prefix'] +look = {'total': N, 'tmap': tmap, 'keys': keys, 'focus': focus, 'notes': [], 'pins': [], 'geo': L['geo'], 'title': '', 'sub': '', 'textFrames': 10 ** 6, + 'hi': {'url': '/hi-core.png', 'proj': json.load(open(L['hi_proj']))}, 'fogNear': L.get('fogNear', 5000), 'fogFar': L.get('fogFar', 12000), 'railW': L.get('railW', 1.6), + 'dayStart': D0, 'sunrise': clk(L['sunrise']), 'sunset': clk(L['sunset']), 'noon': clk(L['noon'])} +base = {'warm': 48, 'page': 'dc.html', 'assets': {'/hi-core.png': L['hi_png'], '/fonts/': 'fonts'}, + 'extraJson': {'rail': 'dc/rail-lines.json', 'transit': f'{pre}-transit.json', 'planes': f'{pre}-planes.json', 'lime': f'{pre}-lime.json'}} +look.update({k: L[k] for k in ('dotScale', 'dotBright', 'busA', 'bloom', 'railOpacity', 'railDim', 'planeScale', 'drops', 'trainCore', 'busColor', 'railMiter', 'overTrails', 'ringScale', 'ringAlpha') if k in L}) # clarity knobs, optional +if L.get('runways'): base['extraJson']['airport'] = L['runways'] +NS = C.get('slices', 12) +job = dict(base); job.update({'total': N, 'fps': FPS, 'look': look, 'slices': [{'f0': i * N // NS, 'f1': (i + 1) * N // NS} for i in range(NS)]}) +if len(sys.argv) > 2: + fr = [int(x) for x in sys.argv[2].split(',')]; job['slices'] = [{'f0': f, 'f1': f + 1} for f in fr]; job['warm'] = 90 + json.dump(job, open(os.path.join(OUTD, 'job-test.json'), 'w')) +else: json.dump(job, open(os.path.join(OUTD, 'job.json'), 'w')) +tl = {'total': N, 'fps': FPS, 'clock': tmap, 'date': C['date'], 'title': C['title'], 'kicker': C.get('kicker', 'MOTION'), 'sub': C['sub'], 'counter': counter, + 'cards': cards, 'chapters': chapters, 'cuts': cuts, 'dayStart': D0, 'pins': {}, 'hook': C.get('hook'), 'outroLine': C.get('outro_line', ''), 'legend': C.get('legend'), 'ffChip': C.get('ff_chip', False), 'credit': C['credit'], 'outroFrom': F(C.get('outro_from', DUR - 3)), 'frameDir': 'frames'} +json.dump(tl, open(os.path.join(OUTD, 'timeline.json'), 'w')) +for c in cards: print(f"{c['f0']/FPS:6.1f}-{c['f1']/FPS:6.1f}s clock {datetime.fromtimestamp(tmap[c['f0']]/1000, ET):%H:%M} {c['kick']}: {c['text']}") +print('frames', N, 'cuts at', [c / FPS for c in cuts]) + diff --git a/.claude/skills/motion-video/toolkit/dc/prep-dc.py b/.claude/skills/motion-video/toolkit/dc/prep-dc.py new file mode 100644 index 0000000..19d2a5f --- /dev/null +++ b/.claude/skills/motion-video/toolkit/dc/prep-dc.py @@ -0,0 +1,99 @@ +# DC recording (record-dc.py hour folders) -> compact inputs for the three.js pages. +# usage: python3 prep-dc.py REC_DIR OUT_PREFIX [HOURS ...] (HOURS like 1118-07; default: every hour folder) +# writes OUT-transit.json {props, tracks} rows [t_ms, lon, lat] (Metro rail, Metro bus, MARC, VRE, DASH, Fairfax, Amtrak) +# OUT-planes.json {props, tracks} rows [t_ms, lon, lat, alt_ft, onGround] +# OUT-bikes.json {stations: {id: [lon, lat]}, snaps: [[t_ms, {id: bikes}]]}, OUT-lime.json [[t_ms, [lon, lat, lon, lat, ...]]] (flat: nested pairs blow the page heap on a full day) +import glob, json, sys, os, collections, urllib.request +from datetime import datetime +rec, out = sys.argv[1], sys.argv[2] +hours = sys.argv[3:] or sorted(os.path.basename(p) for p in glob.glob(f'{rec}/[01]*-[0-2]*') if os.path.isdir(p)) +BOX = (-77.62, -76.45, 38.55, 39.25) +inb = lambda lon, lat: lon is not None and lat is not None and BOX[0] < lon < BOX[1] and BOX[2] < lat < BOX[3] +iso = lambda s: int(datetime.fromisoformat(s.replace('Z', '+00:00')).timestamp() * 1000) +RAIL = {'RED': '#BF0D3E', 'ORANGE': '#ED8B00', 'SILVER': '#A2A4A1', 'BLUE': '#009CDE', 'YELLOW': '#FFD100', 'GREEN': '#00B140'} +REG = {'marc': ('commuter', '#f0a03c'), 'vre': ('commuter', '#e0435d'), 'dash': ('bus', '#58a6e8'), 'fairfax': ('bus', '#7cc46a')} +tracks, props = collections.defaultdict(dict), {} +def rows(h, feed): + p = f'{rec}/{h}/{feed}.jsonl' + if not os.path.exists(p): return + for line in open(p): + try: j = json.loads(line) + except ValueError: continue # a half-written last line after a restart + yield j['t'], j['d'] +for h in hours: + for t, d in rows(h, 'rail'): + for vid, lon, lat, route, trip, brg, ts in d: + if route not in RAIL or not inb(lon, lat): continue + k = f'rail-{vid}'; props[k] = {'g': 'subway', 'f': 'wmata-rail', 'l': route.title(), 'c': RAIL[route]} + tracks[k][ts * 1000] = [ts * 1000, round(lon, 5), round(lat, 5)] + for t, d in rows(h, 'bus'): + for vid, lon, lat, route, trip, brg, ts in d: + if not inb(lon, lat): continue + k = f'bus-{vid}'; props[k] = {'g': 'bus', 'f': 'wmata-bus', 'l': route, 'c': '#d9c2ff'} + tracks[k][ts * 1000] = [ts * 1000, round(lon, 5), round(lat, 5)] + for t, d in rows(h, 'regional'): + for vid, lon, lat, route, feed, brg, ts in d: + f = next((x for x in REG if feed.startswith(x)), None) + if not f or not inb(lon, lat): continue + k = f'{f}-{vid}'; props[k] = {'g': REG[f][0], 'f': f, 'l': route, 'c': REG[f][1]} + tt = iso(ts) if isinstance(ts, str) else int(ts) * 1000 + tracks[k][tt] = [tt, round(lon, 5), round(lat, 5)] + for t, d in rows(h, 'amtrak'): + for tid, lon, lat, name, hdg, vel, ts in d: + if not inb(lon, lat) or not ts: continue + k = f'amtrak-{tid}'; props[k] = {'g': 'amtrak', 'f': 'amtrak', 'l': name, 'c': '#7fb2ff'} + tt = iso(ts); tracks[k][tt] = [tt, round(lon, 5), round(lat, 5)] +T = {} +for k, d in tracks.items(): + g = props[k]['g']; step = 45000 if g == 'bus' else 20000; tr, last = [], -1e15; ts = sorted(d) + for i, t in enumerate(ts): # thin, but keep the fixes either side of a long silence so tracks end cleanly + if t - last >= step or i == len(ts) - 1 or ts[i + 1] - t > 300000 or (i and t - ts[i - 1] > 300000): tr.append(d[t]); last = t + if len(tr) > 1: T[k] = tr +json.dump({'props': {k: props[k] for k in T}, 'tracks': T}, open(f'{out}-transit.json', 'w'), separators=(',', ':')) +print('vehicles', len(T), collections.Counter(props[k]['f'] for k in T).most_common()) +# planes: one fix per position update (snapshot time minus seen_pos), thinned to 20 s +fix, pprops = collections.defaultdict(dict), {} +for h in hours: + for t, d in rows(h, 'planes'): + for hx, lon, lat, alt, trk, gs, flt, typ, seen in d: + if not inb(lon, lat) or alt is None: continue + gnd = alt == 'ground'; tt = int(t - (seen or 0) * 1000) + fix[hx][tt] = [tt, round(lon, 5), round(lat, 5), 0 if gnd else max(0, int(alt)), 1 if gnd else 0] + pprops[hx] = {'fl': flt or pprops.get(hx, {}).get('fl', ''), 'ty': typ or pprops.get(hx, {}).get('ty')} +P = {} +for k, d in fix.items(): + tr, last, ts = [], -1e15, sorted(d) + for i, t in enumerate(ts): + if t - last >= 20000 or i == len(ts) - 1 or ts[i + 1] - t > 300000: tr.append(d[t]); last = t + if len(tr) > 1: P[k] = tr +# landings / takeoffs: a ground <-> air change within 4 km of an airport (same rule as the Logan video) +APT = {'DCA': (-77.0377, 38.8512), 'IAD': (-77.4565, 38.9445), 'BWI': (-76.6684, 39.1754)} +near = lambda q: next((a for a, (lo, la) in APT.items() if abs(q[1] - lo) * 86.6 < 4 and abs(q[2] - la) * 111.2 < 4), None) +EV = [] +for k, tr in P.items(): + for a, b in zip(tr, tr[1:]): + if b[0] - a[0] > 300000 or a[4] == b[4]: continue + ap = near(b) or near(a) + if ap: EV.append(['arr' if b[4] else 'dep', b[0], [b[1], b[2]], k, ap]) +EV.sort(key=lambda e: e[1]) +json.dump({'props': {k: pprops[k] for k in P}, 'tracks': P, 'events': EV}, open(f'{out}-planes.json', 'w'), separators=(',', ':')) +print('aircraft', len(P), 'events', collections.Counter((e[4], e[0]) for e in EV)) +# Capital Bikeshare docks: station positions + bikes docked, every snapshot (2 min) +si = json.loads(urllib.request.urlopen('https://gbfs.lyft.com/gbfs/1.1/dca-cabi/en/station_information.json', timeout=30).read()) +SI = [s for s in si['data']['stations'] if inb(s['lon'], s['lat'])]; IX = {s['station_id']: i for i, s in enumerate(SI)} +snaps = [] +for h in hours: + for t, d in rows(h, 'bikes'): + row = [-1] * len(SI) + for sid, nb, ne, ok in d: + if sid in IX and ok: row[IX[sid]] = nb + snaps.append([t, row]) +json.dump({'stations': [[round(s['lon'], 5), round(s['lat'], 5), s.get('capacity', 0)] for s in SI], 'ids': [s['station_id'] for s in SI], 'names': [s['name'] for s in SI], 'snaps': snaps}, + open(f'{out}-bikes.json', 'w'), separators=(',', ':')) +ST = SI +lime, lt = [], -1e15 # one snapshot per 10 min is plenty for a density layer (IDs rotate, so no trips anyway) +for h in hours: + for t, d in rows(h, 'lime'): + if t - lt >= 600000: lime.append([t, [c for r in d if not r[3] for c in (round(r[1], 4), round(r[0], 4))]]); lt = t +json.dump(lime, open(f'{out}-lime.json', 'w'), separators=(',', ':')) +print('bike snaps', len(snaps), 'stations', len(ST), 'lime snaps', len(lime)) diff --git a/.claude/skills/motion-video/toolkit/dc/rail-lines.json b/.claude/skills/motion-video/toolkit/dc/rail-lines.json new file mode 100644 index 0000000..1faa560 --- /dev/null +++ b/.claude/skills/motion-video/toolkit/dc/rail-lines.json @@ -0,0 +1 @@ +{"lines":[{"r":"RED","c":"#C80F2D","pts":[[-77.05358,39.06182],[-77.0536,39.0618],[-77.05142,39.06003],[-77.05096,39.05962],[-77.05059,39.05923],[-77.05043,39.05902],[-77.05029,39.0588],[-77.05006,39.05835],[-77.04997,39.05812],[-77.0499,39.05787],[-77.04983,39.05751],[-77.0498,39.05714],[-77.04982,39.05675],[-77.04989,39.05638],[-77.05002,39.05593],[-77.05117,39.05229],[-77.05135,39.05168],[-77.05162,39.05059],[-77.05173,39.05003],[-77.05182,39.04947],[-77.0519,39.04882],[-77.05196,39.04814],[-77.05211,39.04521],[-77.05211,39.04477],[-77.05209,39.04433],[-77.05204,39.04389],[-77.05198,39.04347],[-77.05185,39.04286],[-77.05167,39.04224],[-77.05063,39.03919],[-77.05039,39.03842],[-77.05078,39.03834],[-77.05039,39.03842],[-77.04964,39.03604],[-77.04761,39.02982],[-77.04401,39.01923],[-77.04375,39.01829],[-77.04329,39.01634],[-77.04291,39.0149],[-77.0429,39.0149],[-77.04291,39.0149],[-77.0429,39.0149],[-77.04291,39.0149],[-77.04246,39.01319],[-77.04225,39.01251],[-77.0409,39.00846],[-77.04063,39.00758],[-77.0405,39.0071],[-77.04039,39.00657],[-77.0403,39.00604],[-77.04022,39.00551],[-77.04017,39.00491],[-77.04013,39.0042],[-77.04011,39.00206],[-77.04009,39.00158],[-77.04005,39.00119],[-77.03999,39.00091],[-77.03991,39.00064],[-77.0398,39.00038],[-77.03961,39.00004],[-77.0394,38.99975],[-77.03913,38.99947],[-77.0388,38.99919],[-77.03834,38.99887],[-77.03732,38.99829],[-77.03686,38.99801],[-77.03597,38.9974],[-77.03249,38.99475],[-77.03165,38.99409],[-77.03082,38.99339],[-77.03061,38.9932],[-77.03026,38.99344],[-77.03061,38.9932],[-77.0295,38.99222],[-77.02816,38.99093],[-77.027,38.98973],[-77.0264,38.98907],[-77.02588,38.98848],[-77.02497,38.98736],[-77.02406,38.98614],[-77.02322,38.98491],[-77.02244,38.98366],[-77.02147,38.98201],[-77.01971,38.97883],[-77.01755,38.97499],[-77.01394,38.96857],[-77.01362,38.96802],[-77.01329,38.96754],[-77.01296,38.96709],[-77.0126,38.96666],[-77.01223,38.96626],[-77.01182,38.96586],[-77.01126,38.96536],[-77.00802,38.96262],[-77.00729,38.96195],[-77.00684,38.96148],[-77.00642,38.96101],[-77.00604,38.96053],[-77.00568,38.96003],[-77.00538,38.95955],[-77.00509,38.95905],[-77.00484,38.95855],[-77.0046,38.95802],[-77.00343,38.95509],[-77.0027,38.95313],[-77.00219,38.95187],[-77.00159,38.95036],[-76.99942,38.94515],[-76.9984,38.94279],[-76.99647,38.93814],[-76.99519,38.93515],[-76.99486,38.93429],[-76.99465,38.93358],[-76.9946,38.93359],[-76.99465,38.93358],[-76.99461,38.93343],[-76.99447,38.93292],[-76.99436,38.93238],[-76.99415,38.93107],[-76.99403,38.93018],[-76.99379,38.92766],[-76.99379,38.92707],[-76.99386,38.92646],[-76.99399,38.92587],[-76.99419,38.92529],[-76.99494,38.92345],[-76.99545,38.92211],[-76.99635,38.91995],[-76.99602,38.91987],[-76.99635,38.91995],[-76.99666,38.91919],[-76.99694,38.91869],[-76.99773,38.91757],[-76.99796,38.91718],[-76.99801,38.91707],[-76.99818,38.91657],[-76.99831,38.91607],[-76.99841,38.91557],[-76.99848,38.91514],[-76.99859,38.91465],[-76.99869,38.91433],[-76.99882,38.91405],[-76.99896,38.91379],[-76.99916,38.91351],[-77.00072,38.91145],[-77.00132,38.91062],[-77.00154,38.91025],[-77.00215,38.90912],[-77.00272,38.90815],[-77.00317,38.90831],[-77.00272,38.90815],[-77.00275,38.90812],[-77.00292,38.90771],[-77.00373,38.90545],[-77.00382,38.90516],[-77.00402,38.9043],[-77.00416,38.90389],[-77.00432,38.90358],[-77.00452,38.90327],[-77.00474,38.90298],[-77.00578,38.90169],[-77.006,38.90138],[-77.00619,38.90103],[-77.00641,38.90052],[-77.00687,38.89916],[-77.00751,38.89737],[-77.00754,38.89738],[-77.00751,38.89737],[-77.00754,38.89738],[-77.00751,38.89737],[-77.00785,38.89645],[-77.00795,38.8962],[-77.00805,38.89599],[-77.00818,38.89578],[-77.00833,38.8956],[-77.00847,38.89546],[-77.00868,38.89529],[-77.00889,38.89515],[-77.00912,38.89503],[-77.00936,38.89494],[-77.00961,38.89486],[-77.00988,38.8948],[-77.01019,38.89476],[-77.0105,38.89474],[-77.01092,38.89475],[-77.01393,38.89482],[-77.01439,38.89487],[-77.01478,38.89497],[-77.0152,38.89514],[-77.0156,38.89537],[-77.01651,38.89601],[-77.01631,38.89618],[-77.01651,38.89601],[-77.01631,38.89618],[-77.01651,38.89601],[-77.01868,38.89754],[-77.0191,38.89781],[-77.0194,38.89797],[-77.01971,38.89811],[-77.02003,38.89821],[-77.02038,38.89829],[-77.02085,38.89835],[-77.02144,38.89837],[-77.02194,38.89837],[-77.02194,38.89842],[-77.02194,38.89837],[-77.02454,38.89837],[-77.02658,38.89832],[-77.02808,38.89832],[-77.02808,38.89831],[-77.02808,38.89832],[-77.02808,38.89831],[-77.02808,38.89832],[-77.0326,38.89832],[-77.03306,38.89833],[-77.03342,38.89836],[-77.03379,38.8984],[-77.03415,38.89847],[-77.03451,38.89857],[-77.035,38.89875],[-77.03626,38.89927],[-77.0367,38.89946],[-77.0371,38.89968],[-77.03748,38.89994],[-77.03776,38.90017],[-77.03801,38.90043],[-77.03822,38.90069],[-77.03843,38.90102],[-77.03939,38.90266],[-77.03944,38.90264],[-77.03939,38.90266],[-77.03944,38.90264],[-77.03939,38.90266],[-77.04439,38.91128],[-77.04487,38.91111],[-77.04439,38.91128],[-77.04557,38.91331],[-77.04581,38.9138],[-77.04601,38.91431],[-77.04613,38.91472],[-77.04645,38.91595],[-77.04657,38.91633],[-77.0467,38.91669],[-77.04703,38.91739],[-77.04783,38.91897],[-77.0481,38.91945],[-77.04845,38.92001],[-77.04885,38.92053],[-77.05126,38.92334],[-77.05159,38.92375],[-77.05191,38.92421],[-77.05243,38.92511],[-77.05243,38.92511],[-77.05243,38.92511],[-77.05925,38.93683],[-77.05923,38.93684],[-77.05925,38.93683],[-77.06354,38.94421],[-77.06349,38.94423],[-77.06354,38.94421],[-77.06368,38.94444],[-77.0639,38.9448],[-77.06411,38.94508],[-77.06431,38.94528],[-77.06453,38.94548],[-77.06478,38.94565],[-77.06506,38.94582],[-77.06536,38.94596],[-77.06566,38.94607],[-77.06598,38.94615],[-77.0663,38.94622],[-77.06669,38.94626],[-77.06718,38.94628],[-77.07622,38.94629],[-77.07682,38.94631],[-77.07715,38.94636],[-77.07746,38.94643],[-77.07775,38.94654],[-77.07803,38.94667],[-77.07829,38.94682],[-77.07852,38.947],[-77.07873,38.9472],[-77.07924,38.94706],[-77.07873,38.9472],[-77.0789,38.94742],[-77.07916,38.94788],[-77.08574,38.96078],[-77.08575,38.96077],[-77.08574,38.96078],[-77.08753,38.96429],[-77.08778,38.96481],[-77.08798,38.96527],[-77.08817,38.96576],[-77.08835,38.96627],[-77.0886,38.9671],[-77.08879,38.96796],[-77.0899,38.97464],[-77.09001,38.97517],[-77.09014,38.97567],[-77.09039,38.97641],[-77.0907,38.97713],[-77.09254,38.98065],[-77.09291,38.9814],[-77.09321,38.98213],[-77.09407,38.98436],[-77.09419,38.98433],[-77.09407,38.98436],[-77.09431,38.98496],[-77.09447,38.98548],[-77.09459,38.986],[-77.09613,38.99315],[-77.09626,38.9938],[-77.09635,38.99444],[-77.09685,38.99903],[-77.09686,38.99903],[-77.09685,38.99903],[-77.09745,39.00457],[-77.09751,39.00531],[-77.09753,39.00607],[-77.09753,39.00669],[-77.09748,39.00808],[-77.0975,39.00876],[-77.09755,39.00925],[-77.09762,39.00976],[-77.09772,39.01022],[-77.09785,39.01072],[-77.09803,39.01126],[-77.09825,39.01182],[-77.0991,39.0137],[-77.09943,39.01439],[-77.09969,39.01484],[-77.09994,39.01522],[-77.10152,39.01753],[-77.10184,39.01801],[-77.10219,39.01864],[-77.10246,39.01927],[-77.10259,39.01969],[-77.1027,39.0201],[-77.10278,39.02052],[-77.10284,39.02098],[-77.10291,39.02212],[-77.10292,39.02266],[-77.10289,39.02314],[-77.10276,39.0244],[-77.10275,39.02474],[-77.10276,39.02505],[-77.10281,39.02558],[-77.10298,39.02677],[-77.10308,39.02726],[-77.1032,39.02772],[-77.10332,39.02806],[-77.10351,39.02846],[-77.10371,39.02888],[-77.104,39.02879],[-77.10371,39.02888],[-77.10614,39.03386],[-77.10695,39.03558],[-77.11065,39.04304],[-77.11104,39.04391],[-77.11168,39.04552],[-77.11206,39.04642],[-77.11308,39.04853],[-77.11307,39.04853],[-77.11308,39.04853],[-77.11368,39.04976],[-77.11389,39.05021],[-77.11402,39.05059],[-77.11411,39.05091],[-77.1142,39.05129],[-77.11425,39.0517],[-77.11428,39.05221],[-77.11432,39.05456],[-77.11434,39.05491],[-77.11437,39.05521],[-77.11444,39.05558],[-77.11454,39.05595],[-77.11467,39.05633],[-77.11483,39.05667],[-77.11512,39.05718],[-77.11546,39.05765],[-77.11585,39.05809],[-77.11634,39.05855],[-77.11884,39.06072],[-77.12026,39.06187],[-77.12072,39.06227],[-77.12086,39.06218],[-77.12072,39.06227],[-77.1233,39.06449],[-77.12536,39.06633],[-77.14349,39.08199],[-77.14501,39.08325],[-77.14654,39.08457],[-77.14638,39.08468],[-77.14654,39.08457],[-77.14725,39.08518],[-77.14766,39.08555],[-77.14797,39.08585],[-77.14829,39.0862],[-77.14855,39.08651],[-77.14885,39.08691],[-77.1491,39.08728],[-77.14942,39.08779],[-77.14972,39.08829],[-77.14997,39.08877],[-77.15022,39.08927],[-77.15045,39.08977],[-77.15066,39.09028],[-77.15097,39.09111],[-77.15803,39.11054],[-77.15831,39.11126],[-77.15862,39.11192],[-77.15892,39.1125],[-77.15926,39.11307],[-77.15962,39.11362],[-77.16002,39.11417],[-77.1613,39.11578],[-77.16286,39.11765],[-77.16474,39.12],[-77.16476,39.11999],[-77.16474,39.12]]},{"r":"BLUE","c":"#009CDE","pts":[[-76.84465,38.9005],[-76.84466,38.90051],[-76.84685,38.89885],[-76.84865,38.89742],[-76.84914,38.89708],[-76.84961,38.89684],[-76.84991,38.89672],[-76.85028,38.89662],[-76.8506,38.89656],[-76.85095,38.89652],[-76.85417,38.89635],[-76.86131,38.89579],[-76.86195,38.89571],[-76.86264,38.8956],[-76.86332,38.89546],[-76.86395,38.89531],[-76.86509,38.89498],[-76.86614,38.89461],[-76.86629,38.89455],[-76.8661,38.89427],[-76.86629,38.89455],[-76.87086,38.89277],[-76.87306,38.89187],[-76.88185,38.88844],[-76.8829,38.88805],[-76.88355,38.88784],[-76.8842,38.88764],[-76.88487,38.88747],[-76.88554,38.88731],[-76.88622,38.88717],[-76.8869,38.88705],[-76.8876,38.88694],[-76.88829,38.88686],[-76.88939,38.88678],[-76.89035,38.88675],[-76.89592,38.88672],[-76.89592,38.88689],[-76.89592,38.88672],[-76.89592,38.88689],[-76.89592,38.88672],[-76.89915,38.88671],[-76.89987,38.88672],[-76.90039,38.88674],[-76.90144,38.88682],[-76.90231,38.88693],[-76.90308,38.88707],[-76.90384,38.88723],[-76.90467,38.88746],[-76.90532,38.88766],[-76.90596,38.88789],[-76.9079,38.88869],[-76.90847,38.88887],[-76.90897,38.88901],[-76.90948,38.88911],[-76.91002,38.88919],[-76.91348,38.88964],[-76.91348,38.88968],[-76.91348,38.88964],[-76.91348,38.88968],[-76.91348,38.88964],[-76.91366,38.88966],[-76.91434,38.88973],[-76.91522,38.88976],[-76.93525,38.88978],[-76.93565,38.88979],[-76.93595,38.88981],[-76.93625,38.88987],[-76.9365,38.88994],[-76.93674,38.89002],[-76.93698,38.89013],[-76.93733,38.89032],[-76.93738,38.89035],[-76.93767,38.89005],[-76.93738,38.89035],[-76.93767,38.89005],[-76.93738,38.89035],[-76.93994,38.89183],[-76.94023,38.89198],[-76.94059,38.89215],[-76.94299,38.8931],[-76.94672,38.89463],[-76.94736,38.89486],[-76.948,38.89508],[-76.94866,38.89528],[-76.94932,38.89547],[-76.95033,38.89571],[-76.95117,38.89589],[-76.95203,38.89604],[-76.95307,38.89619],[-76.957,38.89671],[-76.95792,38.89681],[-76.96321,38.8975],[-76.96367,38.89755],[-76.96404,38.89757],[-76.96475,38.89755],[-76.96527,38.8975],[-76.9657,38.89743],[-76.96609,38.89734],[-76.96653,38.89721],[-76.96701,38.89704],[-76.96739,38.89687],[-76.96775,38.89667],[-76.96816,38.89642],[-76.96878,38.89595],[-76.9737,38.89199],[-76.9761,38.89006],[-76.97633,38.88987],[-76.97653,38.88968],[-76.97673,38.88943],[-76.97689,38.88918],[-76.97702,38.88885],[-76.97707,38.88858],[-76.97709,38.88821],[-76.97708,38.88779],[-76.97723,38.88779],[-76.97708,38.88779],[-76.97706,38.88506],[-76.97707,38.88481],[-76.9771,38.88457],[-76.97721,38.88424],[-76.97739,38.88392],[-76.97763,38.88364],[-76.97793,38.88339],[-76.97826,38.88319],[-76.97874,38.88298],[-76.9826,38.88153],[-76.98295,38.88141],[-76.9832,38.88135],[-76.98359,38.88129],[-76.98405,38.88127],[-76.98548,38.88127],[-76.98548,38.88119],[-76.98548,38.88127],[-76.98548,38.88119],[-76.98548,38.88127],[-76.987,38.88127],[-76.98753,38.88129],[-76.98777,38.88133],[-76.98801,38.88138],[-76.98851,38.88155],[-76.9962,38.88468],[-76.99618,38.88471],[-76.9962,38.88468],[-76.99618,38.88471],[-76.9962,38.88468],[-76.99789,38.88537],[-76.99822,38.88548],[-76.99851,38.88556],[-76.99903,38.88564],[-76.99956,38.88566],[-77.00007,38.88562],[-77.00051,38.88553],[-77.00157,38.88526],[-77.00204,38.88516],[-77.00249,38.8851],[-77.00298,38.88508],[-77.00589,38.88508],[-77.00589,38.88501],[-77.00589,38.88508],[-77.00589,38.88501],[-77.00589,38.88508],[-77.01518,38.88508],[-77.01518,38.88506],[-77.01518,38.88508],[-77.01754,38.88508],[-77.01824,38.88504],[-77.01959,38.88489],[-77.0201,38.88486],[-77.0219,38.88485],[-77.0219,38.88484],[-77.0219,38.88485],[-77.0219,38.88484],[-77.0219,38.88485],[-77.0243,38.88484],[-77.0249,38.88487],[-77.02541,38.88495],[-77.02591,38.88508],[-77.02638,38.88526],[-77.02668,38.88541],[-77.02689,38.88553],[-77.02708,38.88567],[-77.02733,38.88586],[-77.02765,38.88619],[-77.02783,38.88643],[-77.02795,38.88661],[-77.0281,38.8869],[-77.02821,38.88719],[-77.02832,38.88754],[-77.02813,38.88758],[-77.02832,38.88754],[-77.02893,38.88943],[-77.02901,38.88972],[-77.02904,38.88995],[-77.02904,38.89019],[-77.02901,38.89039],[-77.02896,38.8906],[-77.02883,38.89091],[-77.02828,38.89197],[-77.0282,38.89222],[-77.02815,38.89249],[-77.02814,38.89278],[-77.02813,38.8936],[-77.02812,38.8936],[-77.02813,38.8936],[-77.02812,38.8936],[-77.02814,38.8936],[-77.02813,38.89526],[-77.02809,38.89678],[-77.02809,38.89831],[-77.02808,38.89831],[-77.02809,38.89831],[-77.02808,38.89831],[-77.02809,38.89831],[-77.0281,38.89947],[-77.02814,38.89977],[-77.02824,38.90006],[-77.02832,38.90022],[-77.02842,38.90037],[-77.02862,38.9006],[-77.02892,38.90085],[-77.0292,38.90102],[-77.02955,38.90116],[-77.02988,38.90126],[-77.03024,38.90132],[-77.03077,38.90134],[-77.0324,38.90134],[-77.0324,38.90114],[-77.0324,38.90134],[-77.0324,38.90114],[-77.0324,38.90133],[-77.03946,38.90134],[-77.03946,38.90132],[-77.03946,38.90134],[-77.04418,38.90134],[-77.04452,38.90131],[-77.04486,38.90126],[-77.04519,38.90117],[-77.04634,38.90082],[-77.04679,38.90074],[-77.04713,38.90071],[-77.05012,38.90071],[-77.05012,38.90068],[-77.05012,38.90071],[-77.05012,38.90068],[-77.05012,38.90071],[-77.05549,38.9007],[-77.0576,38.90065],[-77.06766,38.90021],[-77.0681,38.90016],[-77.06845,38.9001],[-77.06879,38.9],[-77.0691,38.89989],[-77.0694,38.89974],[-77.06975,38.89953],[-77.07005,38.89929],[-77.07032,38.89902],[-77.0705,38.89878],[-77.07068,38.89847],[-77.07081,38.89814],[-77.07087,38.89787],[-77.0709,38.8976],[-77.07089,38.89726],[-77.07086,38.89662],[-77.07087,38.89662],[-77.07086,38.89662],[-77.07068,38.89289],[-77.07064,38.89255],[-77.07056,38.89227],[-77.07045,38.89201],[-77.07031,38.89176],[-77.07014,38.89152],[-77.06999,38.89134],[-77.06983,38.89118],[-77.06963,38.89101],[-77.06929,38.89077],[-77.06717,38.88936],[-77.06669,38.88902],[-77.06633,38.88876],[-77.06597,38.88845],[-77.06542,38.88793],[-77.06491,38.88736],[-77.0645,38.88681],[-77.06416,38.88629],[-77.06308,38.88457],[-77.06321,38.88452],[-77.06308,38.88457],[-77.06321,38.88452],[-77.06308,38.88457],[-77.06212,38.88302],[-77.06163,38.88234],[-77.06115,38.88176],[-77.06048,38.88107],[-77.05594,38.87656],[-77.0554,38.87604],[-77.05488,38.87557],[-77.05435,38.87512],[-77.05244,38.87363],[-77.05212,38.87335],[-77.05195,38.87317],[-77.05178,38.87293],[-77.05165,38.87268],[-77.05157,38.87241],[-77.05153,38.87221],[-77.05152,38.872],[-77.05155,38.87176],[-77.0516,38.87156],[-77.05167,38.87136],[-77.05179,38.87114],[-77.05194,38.87093],[-77.05209,38.87076],[-77.05249,38.87043],[-77.05371,38.8695],[-77.05353,38.86935],[-77.05371,38.8695],[-77.05371,38.8695],[-77.05773,38.86644],[-77.05814,38.86606],[-77.05844,38.86573],[-77.05862,38.86549],[-77.05877,38.86524],[-77.05897,38.86486],[-77.05908,38.8646],[-77.05916,38.86433],[-77.05926,38.86384],[-77.05944,38.86241],[-77.05955,38.86242],[-77.05944,38.86241],[-77.05955,38.86242],[-77.05944,38.86241],[-77.05968,38.86057],[-77.05971,38.86029],[-77.05972,38.86005],[-77.0597,38.85985],[-77.05965,38.85958],[-77.05957,38.85932],[-77.05945,38.85906],[-77.05931,38.85881],[-77.05917,38.85863],[-77.05903,38.85846],[-77.0588,38.85825],[-77.05855,38.85805],[-77.05821,38.85784],[-77.05784,38.85766],[-77.05752,38.85754],[-77.05716,38.85745],[-77.05679,38.85738],[-77.05626,38.85731],[-77.05574,38.85728],[-77.05504,38.85728],[-77.05432,38.85733],[-77.05181,38.85768],[-77.05179,38.85758],[-77.05181,38.85768],[-77.05179,38.85758],[-77.05181,38.85768],[-77.04883,38.85809],[-77.04834,38.85814],[-77.04793,38.85814],[-77.0475,38.85809],[-77.04708,38.85799],[-77.04672,38.85786],[-77.04632,38.85765],[-77.04597,38.85739],[-77.04569,38.8571],[-77.04559,38.85697],[-77.04544,38.85675],[-77.04516,38.85619],[-77.04494,38.85568],[-77.04352,38.85221],[-77.04326,38.85228],[-77.04352,38.85221],[-77.04326,38.85228],[-77.04352,38.85221],[-77.04334,38.85177],[-77.04319,38.85137],[-77.04313,38.85113],[-77.0431,38.85086],[-77.04311,38.85059],[-77.04317,38.85035],[-77.04326,38.85008],[-77.04341,38.84983],[-77.04358,38.8496],[-77.04378,38.84941],[-77.04409,38.84917],[-77.04452,38.84894],[-77.04825,38.84729],[-77.0486,38.84712],[-77.04887,38.84697],[-77.04906,38.84683],[-77.04927,38.84666],[-77.04945,38.84646],[-77.04958,38.84629],[-77.04972,38.84607],[-77.04983,38.84584],[-77.0499,38.84561],[-77.04994,38.84541],[-77.04995,38.8452],[-77.04995,38.84503],[-77.04993,38.84482],[-77.04987,38.84457],[-77.04939,38.8429],[-77.04926,38.84251],[-77.04911,38.84211],[-77.04881,38.84147],[-77.04846,38.84084],[-77.04812,38.84033],[-77.04728,38.83915],[-77.04694,38.83857],[-77.04675,38.83819],[-77.0466,38.83779],[-77.04649,38.83739],[-77.04641,38.83699],[-77.04636,38.83658],[-77.04635,38.83616],[-77.04642,38.8332],[-77.04649,38.8332],[-77.04642,38.8332],[-77.04646,38.8319],[-77.04646,38.83135],[-77.04644,38.83106],[-77.0464,38.83061],[-77.04617,38.82903],[-77.04614,38.82865],[-77.04614,38.82833],[-77.04616,38.82775],[-77.04634,38.82569],[-77.04641,38.82515],[-77.0465,38.82465],[-77.0467,38.82398],[-77.04696,38.82332],[-77.04729,38.82269],[-77.04769,38.82208],[-77.04813,38.82151],[-77.05038,38.81877],[-77.05093,38.81807],[-77.05241,38.81594],[-77.0543,38.81328],[-77.05398,38.81314],[-77.0543,38.81328],[-77.05398,38.81314],[-77.05429,38.81328],[-77.055,38.81228],[-77.05557,38.8115],[-77.0561,38.81083],[-77.05678,38.81007],[-77.05768,38.80913],[-77.05839,38.80848],[-77.059,38.80799],[-77.05954,38.80759],[-77.06141,38.80632],[-77.06119,38.80612],[-77.06141,38.80632],[-77.06119,38.80612],[-77.06141,38.80632],[-77.06239,38.80565],[-77.0627,38.80547],[-77.06309,38.80529],[-77.06355,38.80512],[-77.06429,38.8049],[-77.06634,38.80441],[-77.06729,38.80422],[-77.06798,38.80414],[-77.0685,38.8041],[-77.06918,38.80408],[-77.06991,38.8041],[-77.08449,38.80498],[-77.09465,38.80557],[-77.09844,38.80583],[-77.10195,38.80604],[-77.10271,38.80607],[-77.10326,38.80607],[-77.10378,38.80605],[-77.1043,38.80601],[-77.10517,38.80589],[-77.10593,38.80574],[-77.10668,38.80554],[-77.10748,38.80526],[-77.10795,38.80507],[-77.10854,38.80479],[-77.11307,38.80246],[-77.11397,38.80202],[-77.11475,38.8017],[-77.11547,38.80144],[-77.1162,38.80122],[-77.11704,38.80102],[-77.11768,38.80089],[-77.11858,38.80075],[-77.12335,38.80009],[-77.12636,38.7997],[-77.12854,38.79939],[-77.12857,38.79953],[-77.12854,38.79939],[-77.12857,38.79953],[-77.12854,38.79939],[-77.13131,38.799],[-77.1337,38.79863],[-77.13731,38.79813],[-77.14663,38.79694],[-77.14745,38.79679],[-77.14812,38.79663],[-77.14885,38.79641],[-77.14956,38.79614],[-77.15002,38.79594],[-77.15047,38.79572],[-77.1509,38.79549],[-77.15131,38.79523],[-77.15171,38.79496],[-77.15209,38.79468],[-77.15244,38.79439],[-77.15279,38.79407],[-77.15312,38.79374],[-77.15345,38.79338],[-77.15372,38.79305],[-77.15399,38.79269],[-77.15423,38.79233],[-77.15445,38.79195],[-77.15465,38.79157],[-77.15484,38.79112],[-77.15505,38.79052],[-77.1552,38.78994],[-77.15571,38.7871],[-77.15582,38.78633],[-77.156,38.78472],[-77.15609,38.78404],[-77.15735,38.77656],[-77.15749,38.77584],[-77.15761,38.77538],[-77.15775,38.77491],[-77.15792,38.77445],[-77.15812,38.77399],[-77.15833,38.77354],[-77.15857,38.7731],[-77.15884,38.77267],[-77.15913,38.77224],[-77.15949,38.77177],[-77.15987,38.77131],[-77.16028,38.77087],[-77.16072,38.77044],[-77.1612,38.77001],[-77.16174,38.76959],[-77.16226,38.76921],[-77.1628,38.76886],[-77.16365,38.76838],[-77.16454,38.76795],[-77.16833,38.76637],[-77.16832,38.76636],[-77.16833,38.76637]]},{"r":"GREEN","c":"#00B140","pts":[[-76.91107,39.01103],[-76.9112,39.0111],[-76.91473,39.00715],[-76.91527,39.00653],[-76.91579,39.00591],[-76.91651,39.00497],[-76.91722,39.00395],[-76.91783,39.00296],[-76.9184,39.00194],[-76.91889,39.00097],[-76.91935,38.99997],[-76.92456,38.98741],[-76.92554,38.98508],[-76.92616,38.98376],[-76.92671,38.98246],[-76.92749,38.98054],[-76.92853,38.97783],[-76.92857,38.97784],[-76.92853,38.97783],[-76.92857,38.97784],[-76.92853,38.97783],[-76.92926,38.97595],[-76.93008,38.97375],[-76.9303,38.97332],[-76.93055,38.97296],[-76.93089,38.97261],[-76.93127,38.9723],[-76.93152,38.97214],[-76.93178,38.97199],[-76.93205,38.97187],[-76.93234,38.97175],[-76.93272,38.97163],[-76.93302,38.97156],[-76.93334,38.9715],[-76.93366,38.97146],[-76.93414,38.97144],[-76.93464,38.97146],[-76.93763,38.97177],[-76.93824,38.9718],[-76.93871,38.97178],[-76.93914,38.97173],[-76.93956,38.97164],[-76.94,38.97151],[-76.94053,38.97129],[-76.94104,38.971],[-76.9465,38.96741],[-76.94755,38.96673],[-76.94802,38.96645],[-76.94861,38.96614],[-76.94921,38.96589],[-76.94982,38.96569],[-76.95049,38.96552],[-76.95105,38.96541],[-76.95161,38.96534],[-76.95216,38.96531],[-76.95296,38.96529],[-76.95444,38.96528],[-76.95521,38.96528],[-76.9552,38.96538],[-76.95521,38.96528],[-76.9552,38.96538],[-76.95521,38.96528],[-76.96233,38.96532],[-76.96378,38.96532],[-76.96425,38.96531],[-76.96489,38.96525],[-76.96551,38.96512],[-76.96611,38.96493],[-76.96667,38.96469],[-76.9671,38.96446],[-76.96747,38.96419],[-76.96781,38.96391],[-76.96811,38.9636],[-76.96837,38.96327],[-76.96859,38.96293],[-76.96876,38.96256],[-76.96889,38.96216],[-76.96895,38.96189],[-76.96899,38.9616],[-76.96899,38.9613],[-76.96897,38.96099],[-76.96888,38.96051],[-76.96848,38.9589],[-76.96842,38.95855],[-76.9684,38.95825],[-76.96842,38.95786],[-76.96849,38.95748],[-76.9686,38.95711],[-76.96876,38.95671],[-76.96937,38.95554],[-76.96906,38.95544],[-76.96937,38.95554],[-76.96937,38.95554],[-76.9704,38.95354],[-76.97062,38.95316],[-76.97083,38.95286],[-76.97103,38.95264],[-76.97125,38.95243],[-76.97149,38.95223],[-76.97176,38.95205],[-76.97204,38.95189],[-76.97234,38.95174],[-76.97266,38.95162],[-76.973,38.9515],[-76.97343,38.95141],[-76.97388,38.95134],[-76.97439,38.95131],[-76.9749,38.95133],[-76.97793,38.95162],[-76.98729,38.95244],[-76.9903,38.95269],[-76.99099,38.95271],[-76.99151,38.95272],[-76.99204,38.9527],[-76.99265,38.95266],[-77.00155,38.95185],[-77.0018,38.95183],[-77.00185,38.95237],[-77.0018,38.95183],[-77.00519,38.95159],[-77.00722,38.95152],[-77.00796,38.95147],[-77.00865,38.95138],[-77.00932,38.95124],[-77.01003,38.95103],[-77.01063,38.9508],[-77.01121,38.95053],[-77.01177,38.95022],[-77.01408,38.94874],[-77.01456,38.94841],[-77.01512,38.94799],[-77.01572,38.94749],[-77.01614,38.94709],[-77.01666,38.94654],[-77.01697,38.94618],[-77.01726,38.94581],[-77.01878,38.94379],[-77.02413,38.93657],[-77.02427,38.93664],[-77.02413,38.93657],[-77.02561,38.93458],[-77.02674,38.93297],[-77.02706,38.93258],[-77.02728,38.93238],[-77.02753,38.9322],[-77.02781,38.93203],[-77.02811,38.93189],[-77.02869,38.93167],[-77.03103,38.93088],[-77.03138,38.93074],[-77.03169,38.93057],[-77.0319,38.93041],[-77.03212,38.93021],[-77.03227,38.93004],[-77.03241,38.92984],[-77.03251,38.92963],[-77.03258,38.92945],[-77.03263,38.92923],[-77.03265,38.92898],[-77.03264,38.92869],[-77.03261,38.92869],[-77.03264,38.92869],[-77.03263,38.92863],[-77.0319,38.92125],[-77.03187,38.92056],[-77.03191,38.91926],[-77.0319,38.91897],[-77.03185,38.91871],[-77.03178,38.91851],[-77.03167,38.91827],[-77.03151,38.91804],[-77.03136,38.91786],[-77.0312,38.91771],[-77.03101,38.91756],[-77.03074,38.9174],[-77.03049,38.91728],[-77.03023,38.91718],[-77.02994,38.9171],[-77.0297,38.91705],[-77.02939,38.91702],[-77.02908,38.91701],[-77.02908,38.917],[-77.02908,38.91701],[-77.02901,38.917],[-77.02466,38.917],[-77.02417,38.91697],[-77.02394,38.91693],[-77.0237,38.91687],[-77.02339,38.91676],[-77.02305,38.91659],[-77.02278,38.91642],[-77.02255,38.91623],[-77.02233,38.91598],[-77.02218,38.91575],[-77.02204,38.91547],[-77.02197,38.91521],[-77.02193,38.91492],[-77.02192,38.9145],[-77.02193,38.91413],[-77.02189,38.91413],[-77.02193,38.91413],[-77.02193,38.90564],[-77.02191,38.90564],[-77.02193,38.90564],[-77.02192,38.90564],[-77.02191,38.90121],[-77.02191,38.89842],[-77.02194,38.89842],[-77.02191,38.89842],[-77.02191,38.89335],[-77.02194,38.89335],[-77.02191,38.89335],[-77.02194,38.89335],[-77.02191,38.89335],[-77.02191,38.88484],[-77.0219,38.88484],[-77.02191,38.88484],[-77.02191,38.88252],[-77.02192,38.88177],[-77.02198,38.88124],[-77.02207,38.88066],[-77.02234,38.87912],[-77.02237,38.87879],[-77.02237,38.87855],[-77.02233,38.87831],[-77.02226,38.87808],[-77.02216,38.87785],[-77.02199,38.87758],[-77.02177,38.87732],[-77.02153,38.87711],[-77.02127,38.87693],[-77.02094,38.87676],[-77.02063,38.87664],[-77.0203,38.87654],[-77.01995,38.87648],[-77.01964,38.87646],[-77.01929,38.87645],[-77.01753,38.87645],[-77.01753,38.87646],[-77.01753,38.87645],[-77.00423,38.87647],[-77.00417,38.87647],[-77.00417,38.87648],[-77.00417,38.87647],[-77.00355,38.87646],[-77.00311,38.8764],[-77.00268,38.87632],[-77.00234,38.87621],[-77.00189,38.87603],[-77.00159,38.87588],[-77.00119,38.87562],[-77.00094,38.87542],[-77.00066,38.87516],[-77.00041,38.87488],[-77.00023,38.87465],[-77.00008,38.8744],[-76.99991,38.87409],[-76.9972,38.86829],[-76.99692,38.86765],[-76.99677,38.86725],[-76.99663,38.86683],[-76.99528,38.86236],[-76.99546,38.86233],[-76.99528,38.86236],[-76.99489,38.86107],[-76.99473,38.86062],[-76.99428,38.8596],[-76.99413,38.85919],[-76.99402,38.8587],[-76.99397,38.85826],[-76.99397,38.85787],[-76.99404,38.85613],[-76.99403,38.85586],[-76.994,38.85552],[-76.99392,38.85504],[-76.99348,38.85293],[-76.99333,38.85239],[-76.99317,38.85199],[-76.99304,38.85174],[-76.99286,38.85142],[-76.99246,38.85085],[-76.98796,38.84506],[-76.98765,38.8452],[-76.98796,38.84506],[-76.98684,38.84363],[-76.98653,38.84313],[-76.98518,38.84073],[-76.98493,38.84038],[-76.9846,38.84005],[-76.98435,38.83986],[-76.98407,38.83968],[-76.98264,38.8389],[-76.98233,38.83875],[-76.98207,38.83864],[-76.98158,38.83848],[-76.98125,38.8384],[-76.98091,38.83835],[-76.98056,38.83832],[-76.9802,38.83832],[-76.97977,38.83834],[-76.97942,38.83839],[-76.97908,38.83845],[-76.97875,38.83855],[-76.97843,38.83866],[-76.97812,38.8388],[-76.97784,38.83895],[-76.97747,38.83919],[-76.97629,38.84012],[-76.97631,38.84014],[-76.97629,38.84012],[-76.97406,38.84186],[-76.97264,38.843],[-76.97176,38.84368],[-76.97132,38.844],[-76.97096,38.84422],[-76.97056,38.84445],[-76.96784,38.84575],[-76.96744,38.84597],[-76.96702,38.84621],[-76.96661,38.84647],[-76.96621,38.84676],[-76.96366,38.84875],[-76.96314,38.84915],[-76.96279,38.84938],[-76.96237,38.84963],[-76.96163,38.85],[-76.96101,38.85025],[-76.96037,38.85047],[-76.9597,38.85064],[-76.95888,38.8508],[-76.95668,38.8511],[-76.95661,38.85079],[-76.95668,38.8511],[-76.95343,38.85157],[-76.95122,38.85191],[-76.94952,38.85215],[-76.94908,38.85219],[-76.94871,38.85219],[-76.94836,38.85217],[-76.94801,38.85212],[-76.94768,38.85204],[-76.94735,38.85194],[-76.94707,38.85182],[-76.94678,38.85166],[-76.94303,38.84933],[-76.94217,38.84886],[-76.94127,38.84842],[-76.94035,38.84803],[-76.9394,38.84768],[-76.93527,38.84641],[-76.9348,38.84622],[-76.93439,38.84598],[-76.93415,38.8458],[-76.93387,38.84556],[-76.93188,38.84377],[-76.93174,38.84365],[-76.93145,38.84382],[-76.93174,38.84365],[-76.93149,38.8434],[-76.9313,38.84319],[-76.93108,38.84291],[-76.93007,38.84143],[-76.92967,38.84091],[-76.92941,38.84063],[-76.92914,38.84036],[-76.92884,38.84011],[-76.92853,38.83987],[-76.9282,38.83964],[-76.92786,38.83942],[-76.92721,38.83908],[-76.92117,38.83634],[-76.92079,38.83614],[-76.92046,38.83594],[-76.9202,38.83575],[-76.91996,38.83556],[-76.91962,38.83525],[-76.91928,38.83487],[-76.91827,38.83359],[-76.91792,38.8331],[-76.9177,38.83277],[-76.9175,38.83241],[-76.91661,38.83063],[-76.91641,38.83025],[-76.9161,38.8298],[-76.91592,38.82957],[-76.91566,38.82928],[-76.91526,38.82892],[-76.91503,38.82875],[-76.91469,38.82851],[-76.91231,38.82702],[-76.91233,38.82701],[-76.91231,38.82702]]},{"r":"YELLOW","c":"#FFD100","pts":[[-76.91107,39.01103],[-76.91119,39.0111],[-76.91473,39.00715],[-76.91527,39.00653],[-76.91578,39.00592],[-76.91651,39.00498],[-76.91721,39.00395],[-76.91783,39.00296],[-76.9184,39.00194],[-76.91889,39.00097],[-76.91935,38.99997],[-76.92456,38.98741],[-76.92554,38.98508],[-76.92616,38.98376],[-76.9267,38.98246],[-76.92749,38.98054],[-76.92853,38.97783],[-76.92857,38.97784],[-76.92853,38.97783],[-76.92857,38.97784],[-76.92853,38.97783],[-76.92926,38.97595],[-76.93008,38.97375],[-76.9303,38.97332],[-76.93055,38.97297],[-76.93088,38.97261],[-76.93127,38.9723],[-76.93151,38.97214],[-76.93178,38.972],[-76.93205,38.97187],[-76.93234,38.97175],[-76.93272,38.97163],[-76.93302,38.97156],[-76.93333,38.9715],[-76.93365,38.97146],[-76.93414,38.97144],[-76.93464,38.97146],[-76.93763,38.97177],[-76.93824,38.9718],[-76.93871,38.97178],[-76.93914,38.97173],[-76.93956,38.97165],[-76.94,38.97151],[-76.94053,38.97129],[-76.94104,38.971],[-76.9465,38.96742],[-76.94755,38.96674],[-76.94802,38.96645],[-76.94861,38.96614],[-76.9492,38.96589],[-76.94982,38.96569],[-76.95049,38.96552],[-76.95105,38.96541],[-76.95161,38.96535],[-76.95216,38.96531],[-76.95296,38.96529],[-76.95444,38.96528],[-76.95521,38.96528],[-76.9552,38.96538],[-76.95521,38.96528],[-76.9552,38.96538],[-76.95521,38.96528],[-76.96233,38.96532],[-76.96378,38.96532],[-76.96425,38.96531],[-76.96489,38.96525],[-76.96551,38.96512],[-76.96611,38.96494],[-76.96667,38.96469],[-76.9671,38.96446],[-76.96747,38.9642],[-76.96781,38.96391],[-76.96811,38.96361],[-76.96837,38.96327],[-76.96859,38.96293],[-76.96876,38.96256],[-76.96889,38.96216],[-76.96895,38.96189],[-76.96899,38.9616],[-76.96899,38.9613],[-76.96897,38.96099],[-76.96888,38.96051],[-76.96848,38.9589],[-76.96842,38.95855],[-76.9684,38.95825],[-76.96842,38.95786],[-76.96849,38.95748],[-76.96859,38.95711],[-76.96876,38.95672],[-76.96937,38.95554],[-76.96906,38.95544],[-76.96937,38.95554],[-76.96937,38.95554],[-76.9704,38.95354],[-76.97062,38.95316],[-76.97083,38.95287],[-76.97103,38.95264],[-76.97125,38.95243],[-76.97149,38.95223],[-76.97176,38.95205],[-76.97204,38.95189],[-76.97234,38.95174],[-76.97265,38.95162],[-76.973,38.95151],[-76.97342,38.95141],[-76.97388,38.95134],[-76.97438,38.95132],[-76.9749,38.95133],[-76.97793,38.95162],[-76.98729,38.95244],[-76.9903,38.95269],[-76.99098,38.95271],[-76.99151,38.95272],[-76.99204,38.9527],[-76.99265,38.95266],[-77.00155,38.95185],[-77.0018,38.95183],[-77.00185,38.95237],[-77.0018,38.95183],[-77.00519,38.95159],[-77.00722,38.95152],[-77.00796,38.95147],[-77.00865,38.95138],[-77.00932,38.95124],[-77.01003,38.95103],[-77.01063,38.9508],[-77.01121,38.95054],[-77.01177,38.95022],[-77.01408,38.94874],[-77.01456,38.94842],[-77.01512,38.94799],[-77.01572,38.9475],[-77.01614,38.94709],[-77.01666,38.94655],[-77.01697,38.94619],[-77.01726,38.94581],[-77.01878,38.94379],[-77.02413,38.93657],[-77.02427,38.93664],[-77.02413,38.93657],[-77.02561,38.93458],[-77.02674,38.93297],[-77.02706,38.93259],[-77.02727,38.93239],[-77.02753,38.9322],[-77.02781,38.93203],[-77.0281,38.93189],[-77.02869,38.93167],[-77.03103,38.93088],[-77.03138,38.93074],[-77.03169,38.93057],[-77.0319,38.93041],[-77.03212,38.93021],[-77.03226,38.93004],[-77.0324,38.92985],[-77.03251,38.92963],[-77.03258,38.92945],[-77.03263,38.92923],[-77.03265,38.92898],[-77.03264,38.92869],[-77.03261,38.92869],[-77.03264,38.92869],[-77.03263,38.92863],[-77.0319,38.92126],[-77.03187,38.92056],[-77.03191,38.91926],[-77.0319,38.91897],[-77.03185,38.91871],[-77.03178,38.91851],[-77.03167,38.91827],[-77.03151,38.91804],[-77.03136,38.91787],[-77.0312,38.91771],[-77.03101,38.91756],[-77.03074,38.9174],[-77.03049,38.91728],[-77.03022,38.91718],[-77.02994,38.9171],[-77.02969,38.91705],[-77.02939,38.91702],[-77.02908,38.91701],[-77.02908,38.917],[-77.02908,38.91701],[-77.029,38.91701],[-77.02466,38.917],[-77.02417,38.91697],[-77.02394,38.91693],[-77.0237,38.91687],[-77.02339,38.91676],[-77.02304,38.91659],[-77.02278,38.91642],[-77.02255,38.91623],[-77.02233,38.91598],[-77.02218,38.91575],[-77.02204,38.91547],[-77.02197,38.91521],[-77.02193,38.91493],[-77.02192,38.9145],[-77.02193,38.91413],[-77.02189,38.91413],[-77.02193,38.91413],[-77.02193,38.90564],[-77.02191,38.90564],[-77.02193,38.90564],[-77.02192,38.90564],[-77.02191,38.90121],[-77.02191,38.89842],[-77.02194,38.89842],[-77.02191,38.89842],[-77.02191,38.89335],[-77.02194,38.89335],[-77.02191,38.89335],[-77.02191,38.89335],[-77.02194,38.89335],[-77.02191,38.89335],[-77.02191,38.88484],[-77.0219,38.88484],[-77.02191,38.88484],[-77.02191,38.88265],[-77.02194,38.88221],[-77.02197,38.88203],[-77.02202,38.88184],[-77.02218,38.88151],[-77.02232,38.88131],[-77.02244,38.88116],[-77.02264,38.88096],[-77.02284,38.8808],[-77.02311,38.88062],[-77.02353,38.88038],[-77.02383,38.88023],[-77.0243,38.88005],[-77.02463,38.87996],[-77.02499,38.87987],[-77.02564,38.87977],[-77.03133,38.87901],[-77.032,38.87894],[-77.03496,38.87869],[-77.03545,38.8786],[-77.03589,38.87844],[-77.03613,38.87832],[-77.03637,38.87816],[-77.03656,38.87801],[-77.03677,38.87781],[-77.04164,38.87211],[-77.04196,38.87178],[-77.04214,38.87164],[-77.04235,38.87151],[-77.04264,38.87136],[-77.043,38.87123],[-77.04333,38.87114],[-77.04371,38.87109],[-77.04424,38.87107],[-77.05064,38.87098],[-77.05092,38.87096],[-77.05127,38.87091],[-77.05152,38.87084],[-77.05184,38.87073],[-77.05203,38.87064],[-77.05228,38.8705],[-77.05308,38.86998],[-77.05371,38.8695],[-77.05353,38.86935],[-77.05371,38.8695],[-77.05773,38.86644],[-77.05814,38.86606],[-77.05844,38.86573],[-77.05862,38.86549],[-77.05877,38.86524],[-77.05897,38.86486],[-77.05908,38.8646],[-77.05916,38.86433],[-77.05926,38.86384],[-77.05944,38.86241],[-77.05955,38.86242],[-77.05944,38.86241],[-77.05955,38.86242],[-77.05944,38.86241],[-77.05968,38.86057],[-77.05971,38.86029],[-77.05972,38.86005],[-77.0597,38.85985],[-77.05965,38.85958],[-77.05957,38.85932],[-77.05945,38.85906],[-77.05931,38.85881],[-77.05917,38.85863],[-77.05903,38.85846],[-77.0588,38.85825],[-77.05855,38.85805],[-77.05821,38.85784],[-77.05784,38.85766],[-77.05752,38.85754],[-77.05716,38.85745],[-77.05679,38.85738],[-77.05626,38.85731],[-77.05574,38.85728],[-77.05504,38.85728],[-77.05432,38.85733],[-77.05181,38.85768],[-77.05179,38.85758],[-77.05181,38.85768],[-77.05179,38.85758],[-77.05181,38.85768],[-77.04883,38.85809],[-77.04834,38.85814],[-77.04793,38.85814],[-77.0475,38.85809],[-77.04708,38.85799],[-77.04672,38.85786],[-77.04632,38.85765],[-77.04597,38.85739],[-77.04569,38.8571],[-77.04559,38.85697],[-77.04544,38.85675],[-77.04516,38.85619],[-77.04494,38.85568],[-77.04352,38.85221],[-77.04326,38.85228],[-77.04352,38.85221],[-77.04326,38.85228],[-77.04352,38.85221],[-77.04334,38.85177],[-77.04319,38.85137],[-77.04313,38.85113],[-77.0431,38.85086],[-77.04311,38.85059],[-77.04317,38.85035],[-77.04326,38.85008],[-77.04341,38.84983],[-77.04358,38.8496],[-77.04378,38.84941],[-77.04409,38.84917],[-77.04452,38.84894],[-77.04825,38.84729],[-77.0486,38.84712],[-77.04887,38.84697],[-77.04906,38.84683],[-77.04927,38.84666],[-77.04945,38.84646],[-77.04958,38.84629],[-77.04972,38.84607],[-77.04983,38.84584],[-77.0499,38.84561],[-77.04994,38.84541],[-77.04995,38.8452],[-77.04995,38.84503],[-77.04993,38.84482],[-77.04987,38.84457],[-77.04939,38.8429],[-77.04926,38.84251],[-77.04911,38.84211],[-77.04881,38.84147],[-77.04846,38.84084],[-77.04812,38.84033],[-77.04728,38.83915],[-77.04694,38.83857],[-77.04675,38.83819],[-77.0466,38.83779],[-77.04649,38.83739],[-77.04641,38.83699],[-77.04636,38.83658],[-77.04635,38.83616],[-77.04642,38.8332],[-77.04649,38.8332],[-77.04642,38.8332],[-77.04646,38.8319],[-77.04646,38.83135],[-77.04644,38.83106],[-77.0464,38.83061],[-77.04617,38.82903],[-77.04614,38.82865],[-77.04614,38.82833],[-77.04616,38.82775],[-77.04634,38.82569],[-77.04641,38.82515],[-77.0465,38.82465],[-77.0467,38.82398],[-77.04696,38.82332],[-77.04729,38.82269],[-77.04769,38.82208],[-77.04813,38.82151],[-77.05038,38.81877],[-77.05093,38.81807],[-77.05241,38.81594],[-77.0543,38.81328],[-77.05398,38.81314],[-77.0543,38.81328],[-77.05398,38.81314],[-77.05429,38.81328],[-77.055,38.81228],[-77.05557,38.8115],[-77.0561,38.81083],[-77.05678,38.81007],[-77.05768,38.80913],[-77.05839,38.80848],[-77.059,38.80799],[-77.05954,38.80759],[-77.06141,38.80632],[-77.06119,38.80612],[-77.06141,38.80632],[-77.06119,38.80612],[-77.06141,38.80632],[-77.06212,38.80583],[-77.06262,38.80551],[-77.06293,38.80535],[-77.06339,38.80518],[-77.06524,38.80461],[-77.06576,38.80443],[-77.06604,38.80432],[-77.06634,38.80417],[-77.06663,38.80401],[-77.06689,38.80384],[-77.06744,38.80342],[-77.07112,38.80038],[-77.07112,38.80039],[-77.07112,38.80038],[-77.07112,38.80039],[-77.07112,38.80038],[-77.07373,38.79823],[-77.07408,38.79792],[-77.07433,38.79767],[-77.0745,38.79745],[-77.07465,38.7972],[-77.07474,38.79698],[-77.07482,38.79666],[-77.0753,38.79382]]},{"r":"ORANGE","c":"#ED8B00","pts":[[-76.8719,38.94796],[-76.87193,38.94798],[-76.87432,38.94589],[-76.87483,38.94546],[-76.87625,38.94432],[-76.87865,38.94223],[-76.87948,38.94155],[-76.88035,38.94094],[-76.88753,38.93608],[-76.8897,38.93456],[-76.89146,38.93337],[-76.89118,38.93312],[-76.89146,38.93337],[-76.89118,38.93312],[-76.89146,38.93337],[-76.89321,38.93218],[-76.89383,38.93174],[-76.8942,38.93145],[-76.89469,38.93105],[-76.89505,38.93071],[-76.89638,38.92939],[-76.89705,38.92869],[-76.90011,38.92544],[-76.90046,38.92509],[-76.90092,38.92467],[-76.90139,38.92426],[-76.90178,38.92395],[-76.90455,38.92189],[-76.90547,38.92125],[-76.90628,38.92073],[-76.9072,38.9202],[-76.90815,38.9197],[-76.90913,38.91924],[-76.91013,38.91882],[-76.91093,38.91852],[-76.91169,38.91826],[-76.91658,38.91667],[-76.9165,38.91649],[-76.91658,38.91667],[-76.91912,38.91584],[-76.91971,38.91564],[-76.92014,38.91545],[-76.92054,38.91525],[-76.92095,38.915],[-76.92221,38.9142],[-76.92257,38.91399],[-76.92296,38.91382],[-76.9236,38.91358],[-76.92825,38.91208],[-76.92919,38.91176],[-76.92992,38.91147],[-76.93053,38.91121],[-76.93113,38.91092],[-76.93171,38.91062],[-76.93214,38.91038],[-76.9327,38.91004],[-76.93349,38.90951],[-76.93406,38.90908],[-76.93497,38.90837],[-76.93494,38.90835],[-76.93497,38.90837],[-76.93494,38.90835],[-76.93497,38.90837],[-76.93621,38.90741],[-76.93707,38.90678],[-76.9415,38.90334],[-76.94366,38.90159],[-76.94536,38.90028],[-76.94716,38.89883],[-76.9468,38.89857],[-76.94716,38.89883],[-76.9468,38.89857],[-76.94716,38.89883],[-76.94853,38.89773],[-76.94914,38.89726],[-76.94953,38.89698],[-76.94985,38.89679],[-76.95019,38.89661],[-76.9505,38.89648],[-76.95082,38.89637],[-76.95107,38.8963],[-76.95132,38.89625],[-76.95167,38.89619],[-76.9522,38.89615],[-76.95252,38.89615],[-76.95284,38.89617],[-76.95336,38.89623],[-76.95701,38.8967],[-76.95792,38.89681],[-76.96301,38.89747],[-76.96354,38.89753],[-76.96405,38.89757],[-76.96449,38.89757],[-76.96492,38.89754],[-76.96545,38.89747],[-76.96587,38.8974],[-76.96625,38.8973],[-76.96669,38.89716],[-76.96708,38.897],[-76.96747,38.89683],[-76.96776,38.89667],[-76.96805,38.89649],[-76.96834,38.89629],[-76.96871,38.89601],[-76.9737,38.89199],[-76.97616,38.89001],[-76.97647,38.88975],[-76.97669,38.88949],[-76.97685,38.88925],[-76.97695,38.88905],[-76.97704,38.88879],[-76.97708,38.88854],[-76.97709,38.88821],[-76.97709,38.88779],[-76.97723,38.88779],[-76.97709,38.88779],[-76.97706,38.88505],[-76.97707,38.88481],[-76.97711,38.88457],[-76.97721,38.88423],[-76.9774,38.88392],[-76.97763,38.88364],[-76.97793,38.88339],[-76.97826,38.88319],[-76.97874,38.88298],[-76.98261,38.88152],[-76.98295,38.88141],[-76.98321,38.88135],[-76.9836,38.88129],[-76.98405,38.88127],[-76.98548,38.88127],[-76.98548,38.88119],[-76.98548,38.88127],[-76.98548,38.88119],[-76.98548,38.88127],[-76.987,38.88127],[-76.98753,38.88129],[-76.98777,38.88133],[-76.98802,38.88137],[-76.98851,38.88155],[-76.9962,38.88468],[-76.99618,38.88471],[-76.9962,38.88468],[-76.99618,38.88471],[-76.9962,38.88468],[-76.99789,38.88537],[-76.99822,38.88548],[-76.99851,38.88556],[-76.99903,38.88564],[-76.99956,38.88566],[-77.00007,38.88562],[-77.00051,38.88553],[-77.00157,38.88526],[-77.00204,38.88516],[-77.00249,38.8851],[-77.00298,38.88508],[-77.00589,38.88508],[-77.00589,38.88501],[-77.00589,38.88508],[-77.00589,38.88501],[-77.00589,38.88508],[-77.01518,38.88508],[-77.01518,38.88506],[-77.01518,38.88508],[-77.01754,38.88508],[-77.01824,38.88504],[-77.01959,38.88489],[-77.0201,38.88485],[-77.0219,38.88485],[-77.0219,38.88484],[-77.0219,38.88485],[-77.0219,38.88484],[-77.0219,38.88485],[-77.0243,38.88484],[-77.0249,38.88487],[-77.02541,38.88495],[-77.02591,38.88508],[-77.02638,38.88526],[-77.02668,38.8854],[-77.02689,38.88553],[-77.02708,38.88567],[-77.02733,38.88586],[-77.02765,38.88619],[-77.02783,38.88643],[-77.02796,38.88661],[-77.0281,38.8869],[-77.02821,38.88719],[-77.02833,38.88753],[-77.02813,38.88758],[-77.02833,38.88753],[-77.02893,38.88942],[-77.02901,38.88972],[-77.02904,38.88995],[-77.02904,38.89019],[-77.02901,38.89039],[-77.02896,38.89059],[-77.02883,38.89091],[-77.02828,38.89197],[-77.0282,38.89222],[-77.02815,38.89249],[-77.02814,38.89278],[-77.02814,38.8936],[-77.02812,38.8936],[-77.02814,38.8936],[-77.02812,38.8936],[-77.02814,38.8936],[-77.02813,38.89526],[-77.02809,38.89678],[-77.02809,38.89831],[-77.02808,38.89831],[-77.02809,38.89831],[-77.02808,38.89831],[-77.02809,38.89831],[-77.0281,38.89947],[-77.02814,38.89976],[-77.02824,38.90006],[-77.02832,38.90022],[-77.02842,38.90037],[-77.02863,38.9006],[-77.02892,38.90085],[-77.02921,38.90102],[-77.02955,38.90116],[-77.02988,38.90126],[-77.03024,38.90131],[-77.03077,38.90134],[-77.0324,38.90134],[-77.0324,38.90114],[-77.0324,38.90134],[-77.0324,38.90114],[-77.0324,38.90133],[-77.03946,38.90133],[-77.03946,38.90132],[-77.03946,38.90134],[-77.04418,38.90133],[-77.04452,38.90131],[-77.04487,38.90126],[-77.04519,38.90117],[-77.04634,38.90082],[-77.04679,38.90073],[-77.04713,38.90071],[-77.05013,38.9007],[-77.05012,38.90068],[-77.05013,38.9007],[-77.05012,38.90068],[-77.05013,38.9007],[-77.05549,38.9007],[-77.0576,38.90065],[-77.06766,38.90021],[-77.0681,38.90016],[-77.06845,38.9001],[-77.06879,38.9],[-77.0691,38.89989],[-77.06941,38.89974],[-77.06975,38.89953],[-77.07005,38.89929],[-77.07032,38.89901],[-77.0705,38.89878],[-77.07068,38.89846],[-77.07081,38.89814],[-77.07087,38.89787],[-77.0709,38.8976],[-77.07089,38.89726],[-77.07087,38.89662],[-77.07079,38.89491],[-77.07082,38.89433],[-77.07084,38.89416],[-77.07089,38.89395],[-77.07096,38.89375],[-77.07109,38.89349],[-77.07127,38.89325],[-77.07149,38.89304],[-77.07171,38.89287],[-77.07194,38.89272],[-77.07221,38.8926],[-77.07253,38.89248],[-77.07293,38.89239],[-77.0734,38.89233],[-77.08223,38.89164],[-77.08285,38.89155],[-77.08337,38.89146],[-77.08387,38.89134],[-77.08446,38.89119],[-77.0853,38.89089],[-77.08903,38.88939],[-77.09086,38.88869],[-77.09301,38.88788],[-77.09354,38.88765],[-77.09539,38.88676],[-77.09541,38.8868],[-77.09539,38.88676],[-77.09795,38.88554],[-77.09859,38.88525],[-77.10329,38.88332],[-77.10335,38.88343],[-77.10329,38.88332],[-77.10335,38.88343],[-77.10329,38.88332],[-77.10444,38.88285],[-77.10483,38.88271],[-77.10522,38.88261],[-77.10557,38.88256],[-77.10592,38.88253],[-77.11022,38.88234],[-77.11173,38.8823],[-77.11172,38.88207],[-77.11173,38.8823],[-77.11618,38.88217],[-77.12052,38.88191],[-77.12116,38.88186],[-77.12161,38.8818],[-77.12195,38.88173],[-77.12228,38.88164],[-77.12261,38.88154],[-77.12292,38.88141],[-77.12325,38.88127],[-77.12472,38.88047],[-77.12542,38.88016],[-77.12589,38.87997],[-77.12638,38.87982],[-77.12688,38.87969],[-77.12748,38.87958],[-77.12825,38.87947],[-77.12912,38.87943],[-77.13492,38.8793],[-77.13564,38.87931],[-77.13617,38.87935],[-77.13677,38.87941],[-77.13738,38.87951],[-77.13805,38.87967],[-77.13869,38.87987],[-77.1506,38.88391],[-77.15357,38.88488],[-77.15638,38.88583],[-77.1563,38.88598],[-77.15638,38.88583],[-77.1563,38.88598],[-77.15638,38.88583],[-77.1586,38.88658],[-77.15957,38.88695],[-77.16036,38.8873],[-77.16115,38.88771],[-77.16198,38.88821],[-77.16264,38.88866],[-77.16338,38.88925],[-77.16961,38.89446],[-77.17005,38.89478],[-77.17048,38.89508],[-77.17094,38.89536],[-77.17141,38.89561],[-77.17216,38.89596],[-77.17309,38.89632],[-77.18019,38.89879],[-77.18221,38.89945],[-77.18429,38.90016],[-77.18558,38.90056],[-77.18618,38.90072],[-77.18653,38.90078],[-77.18677,38.90082],[-77.18708,38.90083],[-77.18751,38.90084],[-77.1889,38.9008],[-77.18889,38.90088],[-77.1889,38.9008],[-77.18889,38.90088],[-77.1889,38.9008],[-77.19174,38.90071],[-77.19237,38.90068],[-77.19274,38.90063],[-77.19328,38.90051],[-77.19363,38.90041],[-77.19423,38.90019],[-77.1956,38.89955],[-77.19649,38.8991],[-77.19702,38.89881],[-77.21341,38.88936],[-77.21422,38.88891],[-77.21507,38.88849],[-77.22296,38.88514],[-77.224,38.88472],[-77.22724,38.88364],[-77.22979,38.88279],[-77.23574,38.88097],[-77.23656,38.88073],[-77.23775,38.88044],[-77.23895,38.88021],[-77.24017,38.88003],[-77.2414,38.87991],[-77.2663,38.87847],[-77.26756,38.87837],[-77.26826,38.87828],[-77.2693,38.87811],[-77.27154,38.87773],[-77.27155,38.87776],[-77.27154,38.87773]]},{"r":"SILVER","c":"#919D9D","pts":[[-76.84465,38.9005],[-76.84466,38.90051],[-76.84685,38.89885],[-76.84865,38.89742],[-76.84914,38.89708],[-76.84961,38.89684],[-76.84991,38.89672],[-76.85028,38.89662],[-76.8506,38.89656],[-76.85095,38.89652],[-76.85417,38.89635],[-76.86131,38.89579],[-76.86195,38.89571],[-76.86264,38.8956],[-76.86332,38.89546],[-76.86395,38.89531],[-76.86509,38.89498],[-76.86614,38.89461],[-76.86629,38.89455],[-76.8661,38.89427],[-76.86629,38.89455],[-76.87086,38.89277],[-76.87306,38.89187],[-76.88185,38.88844],[-76.8829,38.88805],[-76.88355,38.88784],[-76.8842,38.88764],[-76.88487,38.88747],[-76.88554,38.88731],[-76.88622,38.88717],[-76.8869,38.88705],[-76.8876,38.88694],[-76.88829,38.88686],[-76.88939,38.88678],[-76.89035,38.88675],[-76.89592,38.88672],[-76.89592,38.88689],[-76.89592,38.88672],[-76.89592,38.88689],[-76.89592,38.88672],[-76.89915,38.88671],[-76.89987,38.88672],[-76.90039,38.88674],[-76.90144,38.88682],[-76.90231,38.88693],[-76.90308,38.88707],[-76.90384,38.88723],[-76.90467,38.88746],[-76.90532,38.88766],[-76.90596,38.88789],[-76.9079,38.88869],[-76.90847,38.88887],[-76.90897,38.88901],[-76.90948,38.88911],[-76.91002,38.88919],[-76.91348,38.88964],[-76.91348,38.88968],[-76.91348,38.88964],[-76.91348,38.88968],[-76.91348,38.88964],[-76.91366,38.88966],[-76.91434,38.88973],[-76.91522,38.88976],[-76.93525,38.88978],[-76.93565,38.88979],[-76.93595,38.88981],[-76.93625,38.88987],[-76.9365,38.88994],[-76.93674,38.89002],[-76.93698,38.89013],[-76.93733,38.89032],[-76.93738,38.89035],[-76.93767,38.89005],[-76.93738,38.89035],[-76.93767,38.89005],[-76.93738,38.89035],[-76.93994,38.89183],[-76.94023,38.89198],[-76.94059,38.89215],[-76.94299,38.8931],[-76.94672,38.89463],[-76.94736,38.89486],[-76.948,38.89508],[-76.94866,38.89528],[-76.94932,38.89547],[-76.95033,38.89571],[-76.95117,38.89589],[-76.95203,38.89604],[-76.95307,38.89619],[-76.957,38.89671],[-76.95792,38.89681],[-76.96321,38.8975],[-76.96367,38.89755],[-76.96404,38.89757],[-76.96475,38.89755],[-76.96527,38.8975],[-76.9657,38.89743],[-76.96609,38.89734],[-76.96653,38.89721],[-76.96701,38.89704],[-76.96739,38.89687],[-76.96775,38.89667],[-76.96816,38.89642],[-76.96878,38.89595],[-76.9737,38.89199],[-76.9761,38.89006],[-76.97633,38.88987],[-76.97653,38.88968],[-76.97673,38.88943],[-76.97689,38.88918],[-76.97702,38.88885],[-76.97707,38.88858],[-76.97709,38.88821],[-76.97708,38.88779],[-76.97723,38.88779],[-76.97708,38.88779],[-76.97706,38.88506],[-76.97707,38.88481],[-76.9771,38.88457],[-76.97721,38.88424],[-76.97739,38.88392],[-76.97763,38.88364],[-76.97793,38.88339],[-76.97826,38.88319],[-76.97874,38.88298],[-76.9826,38.88153],[-76.98295,38.88141],[-76.9832,38.88135],[-76.98359,38.88129],[-76.98405,38.88127],[-76.98548,38.88127],[-76.98548,38.88119],[-76.98548,38.88127],[-76.98548,38.88119],[-76.98548,38.88127],[-76.987,38.88127],[-76.98753,38.88129],[-76.98777,38.88133],[-76.98801,38.88138],[-76.98851,38.88155],[-76.9962,38.88468],[-76.99618,38.88471],[-76.9962,38.88468],[-76.99618,38.88471],[-76.9962,38.88468],[-76.99789,38.88537],[-76.99822,38.88548],[-76.99851,38.88556],[-76.99903,38.88564],[-76.99956,38.88566],[-77.00007,38.88562],[-77.00051,38.88553],[-77.00157,38.88526],[-77.00204,38.88516],[-77.00249,38.8851],[-77.00298,38.88508],[-77.00589,38.88508],[-77.00589,38.88501],[-77.00589,38.88508],[-77.00589,38.88501],[-77.00589,38.88508],[-77.01518,38.88508],[-77.01518,38.88506],[-77.01518,38.88508],[-77.01754,38.88508],[-77.01824,38.88504],[-77.01959,38.88489],[-77.0201,38.88486],[-77.0219,38.88485],[-77.0219,38.88484],[-77.0219,38.88485],[-77.0219,38.88484],[-77.0219,38.88485],[-77.0243,38.88484],[-77.0249,38.88487],[-77.02541,38.88495],[-77.02591,38.88508],[-77.02638,38.88526],[-77.02668,38.88541],[-77.02689,38.88553],[-77.02708,38.88567],[-77.02733,38.88586],[-77.02765,38.88619],[-77.02783,38.88643],[-77.02795,38.88661],[-77.0281,38.8869],[-77.02821,38.88719],[-77.02832,38.88754],[-77.02813,38.88758],[-77.02832,38.88754],[-77.02893,38.88943],[-77.02901,38.88972],[-77.02904,38.88995],[-77.02904,38.89019],[-77.02901,38.89039],[-77.02896,38.8906],[-77.02883,38.89091],[-77.02828,38.89197],[-77.0282,38.89222],[-77.02815,38.89249],[-77.02814,38.89278],[-77.02813,38.8936],[-77.02812,38.8936],[-77.02813,38.8936],[-77.02812,38.8936],[-77.02814,38.8936],[-77.02813,38.89526],[-77.02809,38.89678],[-77.02809,38.89831],[-77.02808,38.89831],[-77.02809,38.89831],[-77.02808,38.89831],[-77.02809,38.89831],[-77.0281,38.89947],[-77.02814,38.89977],[-77.02824,38.90006],[-77.02832,38.90022],[-77.02842,38.90037],[-77.02862,38.9006],[-77.02892,38.90085],[-77.0292,38.90102],[-77.02955,38.90116],[-77.02988,38.90126],[-77.03024,38.90132],[-77.03077,38.90134],[-77.0324,38.90134],[-77.0324,38.90114],[-77.0324,38.90134],[-77.0324,38.90114],[-77.0324,38.90133],[-77.03946,38.90134],[-77.03946,38.90132],[-77.03946,38.90134],[-77.04418,38.90134],[-77.04452,38.90131],[-77.04486,38.90126],[-77.04519,38.90117],[-77.04634,38.90082],[-77.04679,38.90074],[-77.04713,38.90071],[-77.05012,38.90071],[-77.05012,38.90068],[-77.05012,38.90071],[-77.05012,38.90068],[-77.05012,38.90071],[-77.05549,38.9007],[-77.0576,38.90065],[-77.06766,38.90021],[-77.0681,38.90016],[-77.06845,38.9001],[-77.06879,38.9],[-77.0691,38.89989],[-77.0694,38.89974],[-77.06975,38.89953],[-77.07005,38.89929],[-77.07032,38.89902],[-77.0705,38.89878],[-77.07068,38.89847],[-77.07081,38.89814],[-77.07087,38.89787],[-77.0709,38.8976],[-77.07089,38.89726],[-77.07086,38.89662],[-77.07087,38.89662],[-77.07086,38.89662],[-77.07087,38.89662],[-77.07079,38.89491],[-77.07081,38.89433],[-77.07084,38.89416],[-77.07089,38.89395],[-77.07096,38.89375],[-77.07109,38.89349],[-77.07127,38.89326],[-77.07149,38.89304],[-77.0717,38.89287],[-77.07194,38.89272],[-77.07221,38.8926],[-77.07252,38.89248],[-77.07293,38.89239],[-77.07339,38.89234],[-77.08223,38.89164],[-77.08285,38.89155],[-77.08337,38.89146],[-77.08387,38.89135],[-77.08445,38.89119],[-77.0853,38.8909],[-77.08903,38.8894],[-77.09086,38.88869],[-77.09301,38.88788],[-77.09354,38.88765],[-77.09539,38.88676],[-77.09541,38.8868],[-77.09539,38.88676],[-77.09795,38.88554],[-77.09859,38.88525],[-77.10328,38.88333],[-77.10335,38.88343],[-77.10328,38.88333],[-77.10335,38.88343],[-77.10328,38.88333],[-77.10443,38.88285],[-77.10483,38.88271],[-77.10522,38.88261],[-77.10556,38.88256],[-77.10592,38.88253],[-77.11022,38.88234],[-77.11173,38.8823],[-77.11172,38.88207],[-77.11173,38.8823],[-77.11618,38.88217],[-77.12052,38.88191],[-77.12115,38.88186],[-77.12161,38.8818],[-77.12195,38.88173],[-77.12228,38.88164],[-77.1226,38.88154],[-77.12292,38.88141],[-77.12325,38.88127],[-77.12472,38.88048],[-77.12542,38.88016],[-77.12589,38.87998],[-77.12638,38.87982],[-77.12688,38.87969],[-77.12747,38.87958],[-77.12825,38.87948],[-77.12911,38.87943],[-77.13492,38.8793],[-77.13564,38.87931],[-77.13616,38.87935],[-77.13677,38.87941],[-77.13737,38.87952],[-77.13805,38.87968],[-77.13869,38.87987],[-77.1506,38.88391],[-77.15357,38.88488],[-77.15638,38.88583],[-77.15629,38.88599],[-77.15638,38.88583],[-77.15629,38.88599],[-77.15638,38.88583],[-77.15831,38.88649],[-77.15924,38.88682],[-77.15989,38.88709],[-77.16065,38.88745],[-77.16143,38.88787],[-77.16211,38.8883],[-77.16269,38.8887],[-77.16338,38.88925],[-77.16961,38.89446],[-77.17004,38.89478],[-77.17048,38.89508],[-77.17094,38.89536],[-77.17141,38.89562],[-77.17216,38.89596],[-77.17289,38.89625],[-77.18,38.89872],[-77.18221,38.89945],[-77.18429,38.90016],[-77.18557,38.90056],[-77.18601,38.90068],[-77.18651,38.90092],[-77.18674,38.90106],[-77.18696,38.90122],[-77.18725,38.90146],[-77.18747,38.90169],[-77.18769,38.90197],[-77.18782,38.90217],[-77.18795,38.90243],[-77.18808,38.90275],[-77.18816,38.90308],[-77.18819,38.90335],[-77.18819,38.90377],[-77.18813,38.90417],[-77.18707,38.90849],[-77.187,38.90886],[-77.18695,38.9092],[-77.18693,38.90956],[-77.18694,38.90982],[-77.18696,38.91009],[-77.18702,38.91044],[-77.18711,38.9108],[-77.18723,38.91114],[-77.18747,38.91164],[-77.18777,38.91212],[-77.18815,38.9126],[-77.19122,38.91577],[-77.19164,38.91623],[-77.1919,38.91656],[-77.1923,38.91714],[-77.19732,38.92481],[-77.19764,38.92526],[-77.198,38.9257],[-77.1984,38.92611],[-77.19884,38.92651],[-77.1993,38.92688],[-77.1998,38.92723],[-77.20037,38.92758],[-77.20086,38.92783],[-77.20129,38.928],[-77.20172,38.92813],[-77.20211,38.92821],[-77.2025,38.92826],[-77.2029,38.92827],[-77.20324,38.92826],[-77.20356,38.92822],[-77.20395,38.92815],[-77.20433,38.92805],[-77.20469,38.92792],[-77.20503,38.92775],[-77.20545,38.9275],[-77.20583,38.92722],[-77.2076,38.9258],[-77.20803,38.92551],[-77.20848,38.92527],[-77.20926,38.92492],[-77.20905,38.92463],[-77.20926,38.92492],[-77.20905,38.92463],[-77.20926,38.92492],[-77.21194,38.9237],[-77.21275,38.92334],[-77.21361,38.92303],[-77.21536,38.92245],[-77.21597,38.92224],[-77.21656,38.922],[-77.2182,38.9213],[-77.21886,38.92106],[-77.21934,38.92095],[-77.21988,38.92086],[-77.22177,38.92066],[-77.22171,38.9203],[-77.22177,38.92066],[-77.22484,38.92035],[-77.22525,38.9203],[-77.22573,38.92019],[-77.22696,38.91985],[-77.22757,38.9197],[-77.22813,38.91958],[-77.22871,38.91949],[-77.22929,38.91942],[-77.22987,38.91937],[-77.2307,38.91934],[-77.23119,38.91936],[-77.23149,38.9194],[-77.23177,38.91946],[-77.23223,38.91962],[-77.23248,38.91974],[-77.23272,38.91988],[-77.23294,38.92004],[-77.2331,38.92018],[-77.23375,38.92085],[-77.23381,38.92081],[-77.23375,38.92085],[-77.23542,38.92256],[-77.237,38.92423],[-77.23989,38.92718],[-77.24091,38.92821],[-77.24111,38.92841],[-77.24088,38.92854],[-77.24111,38.92841],[-77.24088,38.92854],[-77.24111,38.92841],[-77.24497,38.93236],[-77.24524,38.93261],[-77.24559,38.93288],[-77.24604,38.93314],[-77.2464,38.93331],[-77.24666,38.9334],[-77.24698,38.9335],[-77.24732,38.93357],[-77.24759,38.93361],[-77.24787,38.93364],[-77.24829,38.93365],[-77.24885,38.93362],[-77.24919,38.93357],[-77.2496,38.93348],[-77.25244,38.93276],[-77.25341,38.93255],[-77.25391,38.93246],[-77.25466,38.93236],[-77.25542,38.93229],[-77.25592,38.93225],[-77.25643,38.93224],[-77.25719,38.93224],[-77.25795,38.93227],[-77.25846,38.93231],[-77.2591,38.93238],[-77.25969,38.93247],[-77.26051,38.93262],[-77.26111,38.93277],[-77.2621,38.93307],[-77.26267,38.93328],[-77.26323,38.93351],[-77.26377,38.93376],[-77.26412,38.93394],[-77.26464,38.93424],[-77.26513,38.93454],[-77.26575,38.93498],[-77.26634,38.93546],[-77.26818,38.93714],[-77.27029,38.93903],[-77.27077,38.93944],[-77.27102,38.93964],[-77.27155,38.94001],[-77.27226,38.94043],[-77.27302,38.9408],[-77.27365,38.94106],[-77.2743,38.94129],[-77.27497,38.94147],[-77.27566,38.94163],[-77.27636,38.94174],[-77.27715,38.94182],[-77.28078,38.94205],[-77.28213,38.94218],[-77.28295,38.94228],[-77.2837,38.94239],[-77.28437,38.94252],[-77.28535,38.94273],[-77.28601,38.9429],[-77.28699,38.94318],[-77.28794,38.9435],[-77.28856,38.94373],[-77.2893,38.94403],[-77.29201,38.94523],[-77.29298,38.94563],[-77.29391,38.94599],[-77.29486,38.94632],[-77.29582,38.94662],[-77.29631,38.94676],[-77.2968,38.9469],[-77.29779,38.94716],[-77.29878,38.94738],[-77.29929,38.94748],[-77.29979,38.94758],[-77.30081,38.94775],[-77.30183,38.9479],[-77.30286,38.94802],[-77.30338,38.94806],[-77.30389,38.9481],[-77.30493,38.94817],[-77.30597,38.9482],[-77.30701,38.94821],[-77.30805,38.94818],[-77.30908,38.94813],[-77.31055,38.94801],[-77.31106,38.94795],[-77.31172,38.94785],[-77.31242,38.94771],[-77.31307,38.94756],[-77.31405,38.94728],[-77.31925,38.94564],[-77.31989,38.94545],[-77.32053,38.94529],[-77.32118,38.94514],[-77.32184,38.94501],[-77.32283,38.94485],[-77.32384,38.94473],[-77.32485,38.94465],[-77.32586,38.9446],[-77.32722,38.94461],[-77.32833,38.94467],[-77.32924,38.94475],[-77.32991,38.94484],[-77.33057,38.94494],[-77.33123,38.94506],[-77.33189,38.94519],[-77.33254,38.94535],[-77.33318,38.94552],[-77.33407,38.94579],[-77.33767,38.94696],[-77.33985,38.94767],[-77.33985,38.94768],[-77.33985,38.94767],[-77.34672,38.94993],[-77.34742,38.95014],[-77.34981,38.95083],[-77.35165,38.9513],[-77.35351,38.95171],[-77.35462,38.95193],[-77.3563,38.95223],[-77.3578,38.95247],[-77.35864,38.95259],[-77.36019,38.95277],[-77.36019,38.95277],[-77.36019,38.95277],[-77.36175,38.95296],[-77.36299,38.95309],[-77.36446,38.95318],[-77.36594,38.95326],[-77.36724,38.95331],[-77.36856,38.95333],[-77.37052,38.95332],[-77.37248,38.95325],[-77.37514,38.95312],[-77.37878,38.95286],[-77.38177,38.95269],[-77.38248,38.95267],[-77.38317,38.95268],[-77.38518,38.95283],[-77.38518,38.95282],[-77.38518,38.95283],[-77.38653,38.95293],[-77.38707,38.95298],[-77.38935,38.95338],[-77.39497,38.95424],[-77.39619,38.95445],[-77.39747,38.95472],[-77.39875,38.95502],[-77.40002,38.95538],[-77.40125,38.95576],[-77.40203,38.95603],[-77.4153,38.96076],[-77.4153,38.96076],[-77.4153,38.96076],[-77.4153,38.96076],[-77.4153,38.96076],[-77.41663,38.96124],[-77.41761,38.96156],[-77.41824,38.96174],[-77.41891,38.9619],[-77.41956,38.96204],[-77.42035,38.96217],[-77.42113,38.9623],[-77.42183,38.96239],[-77.42257,38.96246],[-77.42329,38.96251],[-77.42406,38.96254],[-77.42482,38.96255],[-77.43756,38.96246],[-77.43846,38.96243],[-77.44022,38.96233],[-77.44067,38.96229],[-77.4411,38.9622],[-77.44148,38.9621],[-77.44182,38.96197],[-77.44217,38.9618],[-77.44247,38.96162],[-77.44278,38.9614],[-77.44303,38.96118],[-77.44325,38.96093],[-77.44346,38.96065],[-77.44359,38.96042],[-77.4437,38.96018],[-77.44378,38.95993],[-77.44384,38.95967],[-77.44387,38.95927],[-77.4439,38.95787],[-77.44393,38.95766],[-77.44399,38.95742],[-77.44405,38.95726],[-77.44415,38.95707],[-77.44435,38.95678],[-77.44462,38.9565],[-77.44493,38.95627],[-77.44531,38.95607],[-77.4457,38.95592],[-77.44614,38.95582],[-77.44655,38.95578],[-77.44815,38.9558],[-77.44815,38.95578],[-77.44815,38.9558],[-77.44815,38.95578],[-77.44815,38.9558],[-77.44973,38.95581],[-77.44999,38.95583],[-77.45025,38.95587],[-77.4505,38.95593],[-77.45075,38.95602],[-77.45102,38.95614],[-77.45127,38.95627],[-77.45153,38.95645],[-77.45174,38.95663],[-77.45192,38.95683],[-77.45208,38.95707],[-77.4522,38.9573],[-77.45228,38.95753],[-77.45234,38.9578],[-77.45235,38.95805],[-77.45229,38.96175],[-77.45225,38.96203],[-77.45216,38.96233],[-77.45202,38.96261],[-77.45186,38.96285],[-77.45168,38.96305],[-77.45146,38.96324],[-77.45035,38.96405],[-77.45015,38.96421],[-77.44999,38.96436],[-77.4498,38.96458],[-77.44965,38.96481],[-77.44953,38.96507],[-77.44946,38.96532],[-77.44942,38.96556],[-77.4494,38.96587],[-77.4493,38.97305],[-77.44933,38.97377],[-77.44942,38.97439],[-77.44953,38.97485],[-77.44969,38.97531],[-77.44987,38.97572],[-77.45012,38.97621],[-77.45691,38.98842],[-77.45728,38.98903],[-77.45771,38.9896],[-77.45805,38.98999],[-77.45849,38.99042],[-77.45895,38.99085],[-77.45931,38.99114],[-77.46068,38.99204],[-77.46068,38.99204],[-77.46068,38.99204],[-77.46068,38.99204],[-77.46068,38.99204],[-77.46197,38.99289],[-77.46235,38.99309],[-77.46274,38.99325],[-77.46307,38.99333],[-77.46349,38.9934],[-77.46627,38.99368],[-77.4668,38.9937],[-77.46918,38.99373],[-77.46973,38.99376],[-77.47025,38.99381],[-77.47099,38.99393],[-77.47169,38.99409],[-77.47238,38.9943],[-77.47306,38.99456],[-77.47366,38.99484],[-77.4743,38.99519],[-77.48062,38.99899],[-77.4833,39.00059],[-77.48373,39.00083],[-77.48408,39.001],[-77.48443,39.00114],[-77.48672,39.00194],[-77.4882,39.0025],[-77.48874,39.00275],[-77.48919,39.00303],[-77.48956,39.00334],[-77.49152,39.00529],[-77.49153,39.00529],[-77.49152,39.00529]]},{"r":"SHUTTLE","c":"#B89F82","pts":[[-76.91107,39.01103],[-76.92857,38.97784],[-76.9552,38.96538]]}],"stations":[{"n":"Wiehle-Reston East","at":[-77.34032,38.94783]},{"n":"Spring Hill","at":[-77.24189,38.92921]},{"n":"Greensboro","at":[-77.23416,38.92127]},{"n":"Tysons","at":[-77.22159,38.92068]},{"n":"Mclean","at":[-77.21053,38.92434]},{"n":"Vienna","at":[-77.27246,38.87758]},{"n":"Dunn Loring","at":[-77.22724,38.88365]},{"n":"West Falls Church","at":[-77.18922,38.90079]},{"n":"East Falls Church","at":[-77.15694,38.88603]},{"n":"Ballston-Mu","at":[-77.11322,38.88226]},{"n":"Virginia Sq-Gmu","at":[-77.10302,38.88343]},{"n":"Clarendon","at":[-77.09544,38.88674]},{"n":"Court House","at":[-77.08714,38.89015]},{"n":"Franconia-Springfield","at":[-77.16799,38.76651]},{"n":"Van Dorn St","at":[-77.12927,38.79929]},{"n":"Downtown Largo","at":[-76.84465,38.90051]},{"n":"Morgan Blvd","at":[-76.86771,38.894]},{"n":"Addison Rd","at":[-76.89413,38.88673]},{"n":"Capitol Heights","at":[-76.91183,38.88943]},{"n":"Benning Rd","at":[-76.93862,38.89107]},{"n":"Branch Av","at":[-76.91182,38.82672]},{"n":"Suitland","at":[-76.93287,38.84467]},{"n":"Naylor Rd","at":[-76.9566,38.85112]},{"n":"Southern Av","at":[-76.97521,38.84095]},{"n":"Congress Heights","at":[-76.98844,38.8457]},{"n":"Anacostia","at":[-76.99556,38.86329]},{"n":"Navy Yard-Ballpark","at":[-77.00588,38.87647]},{"n":"Waterfront","at":[-77.01756,38.87646]},{"n":"Archives","at":[-77.02191,38.89322]},{"n":"Greenbelt","at":[-76.9112,39.01109]},{"n":"College Park-U Of Md","at":[-76.92834,38.9783]},{"n":"Hyattsville Crossing","at":[-76.95642,38.96529]},{"n":"West Hyattsville","at":[-76.9695,38.95528]},{"n":"Georgia Av-Petworth","at":[-77.02354,38.93737]},{"n":"Columbia Heights","at":[-77.03252,38.9275]},{"n":"U St","at":[-77.02752,38.91701]},{"n":"Shaw-Howard U","at":[-77.02192,38.91352]},{"n":"Mt Vernon Sq","at":[-77.02192,38.90658]},{"n":"New Carrollton","at":[-76.87187,38.94803]},{"n":"Landover","at":[-76.89127,38.9335]},{"n":"Cheverly","at":[-76.91666,38.91664]},{"n":"Deanwood","at":[-76.93516,38.90822]},{"n":"Minnesota Av","at":[-76.94674,38.89917]},{"n":"Stadium-Armory","at":[-76.97707,38.88693]},{"n":"Potomac Av","at":[-76.98558,38.88127]},{"n":"Eastern Market","at":[-76.99607,38.88463]},{"n":"Capitol South","at":[-77.00522,38.88507]},{"n":"Federal Center Sw","at":[-77.01594,38.88508]},{"n":"L'Enfant Plaza","at":[-77.02191,38.88489]},{"n":"Smithsonian","at":[-77.02863,38.88851]},{"n":"Federal Triangle","at":[-77.02813,38.89383]},{"n":"Huntington","at":[-77.0753,38.79383]},{"n":"Eisenhower Av","at":[-77.07116,38.80035]},{"n":"King St-Old Town","at":[-77.06097,38.80661]},{"n":"Braddock Rd","at":[-77.05372,38.81409]},{"n":"Ronald Reagan Washington National Airport","at":[-77.04405,38.85351]},{"n":"Crystal City","at":[-77.05057,38.85785]},{"n":"Pentagon City","at":[-77.05952,38.86185]},{"n":"Pentagon","at":[-77.05411,38.86919]},{"n":"Arlington Cemetery","at":[-77.0631,38.88459]},{"n":"Rosslyn","at":[-77.07084,38.89603]},{"n":"Foggy Bottom-Gwu","at":[-77.0501,38.9007]},{"n":"Farragut West","at":[-77.04046,38.90134]},{"n":"Mcpherson Sq","at":[-77.03343,38.90134]},{"n":"Noma-Gallaudet U","at":[-77.00331,38.90662]},{"n":"Glenmont","at":[-77.05355,39.06177]},{"n":"Wheaton","at":[-77.05011,39.03754]},{"n":"Forest Glen","at":[-77.04293,39.01495]},{"n":"Silver Spring","at":[-77.03131,38.9938]},{"n":"Takoma","at":[-77.01813,38.97602]},{"n":"Fort Totten","at":[-77.0023,38.95179]},{"n":"Brookland-Cua","at":[-76.99455,38.93313]},{"n":"Rhode Island Av","at":[-76.99594,38.92092]},{"n":"Union Station","at":[-77.00747,38.8975]},{"n":"Judiciary Sq","at":[-77.0168,38.89622]},{"n":"Gallery Place","at":[-77.0228,38.89838]},{"n":"Shady Grove","at":[-77.16467,39.11993]},{"n":"Rockville","at":[-77.14619,39.08427]},{"n":"Twinbrook","at":[-77.12122,39.0627]},{"n":"North Bethesda","at":[-77.11308,39.04854]},{"n":"Grosvenor-Strathmore","at":[-77.10412,39.02973]},{"n":"Medical Center","at":[-77.09676,38.99823]},{"n":"Bethesda","at":[-77.09365,38.98328]},{"n":"Friendship Heights","at":[-77.08502,38.95938]},{"n":"Tenleytown-Au","at":[-77.07967,38.94889]},{"n":"Van Ness-Udc","at":[-77.06295,38.94321]},{"n":"Cleveland Park","at":[-77.05813,38.93491]},{"n":"Woodley Park","at":[-77.05269,38.92556]},{"n":"Dupont Circle","at":[-77.0436,38.90991]},{"n":"Farragut North","at":[-77.03967,38.90315]},{"n":"Metro Center","at":[-77.02809,38.89832]},{"n":"Reston Town Center","at":[-77.36018,38.95276]},{"n":"Herndon","at":[-77.38518,38.95282]},{"n":"Innovation Center","at":[-77.41564,38.96088]},{"n":"Washington Dulles International Airport","at":[-77.44819,38.95579]},{"n":"Loudoun Gateway","at":[-77.46068,38.99204]},{"n":"Ashburn","at":[-77.49143,39.0052]},{"n":"Potomac Yard","at":[-77.04642,38.83319]}]} \ No newline at end of file diff --git a/.claude/skills/motion-video/toolkit/dc/rail-lines.py b/.claude/skills/motion-video/toolkit/dc/rail-lines.py new file mode 100644 index 0000000..262c379 --- /dev/null +++ b/.claude/skills/motion-video/toolkit/dc/rail-lines.py @@ -0,0 +1,15 @@ +# WMATA rail GTFS (static) -> dc/rail-lines.json: one polyline per line per direction-shape, in the line colour, plus stations. +# usage: python3 dc/rail-lines.py gtfs/rail dc/rail-lines.json (zip from api.wmata.com/gtfs/rail-gtfs-static.zip) +import csv, json, sys, collections +src, out = sys.argv[1:3] +R = {r['route_id']: '#' + r['route_color'] for r in csv.DictReader(open(f'{src}/routes.txt'))} +use = collections.Counter((t['route_id'], t['shape_id']) for t in csv.DictReader(open(f'{src}/trips.txt'))) +pts = collections.defaultdict(list) +for p in csv.DictReader(open(f'{src}/shapes.txt')): pts[p['shape_id']].append((int(p['shape_pt_sequence']), round(float(p['shape_pt_lon']), 5), round(float(p['shape_pt_lat']), 5))) +best = {} # longest shape per line, both directions collapse to one drawn line +for (r, sh), n in use.items(): + if r in R and (r not in best or len(pts[sh]) > len(pts[best[r]])): best[r] = sh +lines = [{'r': r, 'c': R[r], 'pts': [[x, y] for _, x, y in sorted(pts[sh])]} for r, sh in best.items()] +st = [{'n': s['stop_name'].title(), 'at': [round(float(s['stop_lon']), 5), round(float(s['stop_lat']), 5)]} for s in csv.DictReader(open(f'{src}/stops.txt')) if s.get('location_type') == '1'] +json.dump({'lines': lines, 'stations': st}, open(out, 'w'), separators=(',', ':')) +print({l['r']: len(l['pts']) for l in lines}, 'stations', len(st)) diff --git a/.claude/skills/motion-video/toolkit/dc/runways.json b/.claude/skills/motion-video/toolkit/dc/runways.json new file mode 100644 index 0000000..ab5fb04 --- /dev/null +++ b/.claude/skills/motion-video/toolkit/dc/runways.json @@ -0,0 +1,136 @@ +{ + "source": "OurAirports runways.csv (public domain)", + "area": [], + "runways": [ + { + "ap": "BWI", + "id": "10/28", + "a": [ + -76.689598, + 39.174702 + ], + "b": [ + -76.652702, + 39.1726 + ], + "w": 45.7 + }, + { + "ap": "BWI", + "id": "15L/33R", + "a": [ + -76.663498, + 39.187401 + ], + "b": [ + -76.653198, + 39.176201 + ], + "w": 30.5 + }, + { + "ap": "BWI", + "id": "15R/33L", + "a": [ + -76.681999, + 39.185398 + ], + "b": [ + -76.662399, + 39.1642 + ], + "w": 45.7 + }, + { + "ap": "DCA", + "id": "01/19", + "a": [ + -77.036797, + 38.8424 + ], + "b": [ + -77.038696, + 38.861198 + ], + "w": 45.7 + }, + { + "ap": "DCA", + "id": "04/22", + "a": [ + -77.040802, + 38.8423 + ], + "b": [ + -77.033302, + 38.854401 + ], + "w": 45.7 + }, + { + "ap": "DCA", + "id": "15/33", + "a": [ + -77.0438, + 38.861698 + ], + "b": [ + -77.0327, + 38.8503 + ], + "w": 45.7 + }, + { + "ap": "IAD", + "id": "01C/19C", + "a": [ + -77.459801, + 38.939098 + ], + "b": [ + -77.459297, + 38.9706 + ], + "w": 45.7 + }, + { + "ap": "IAD", + "id": "01L/19R", + "a": [ + -77.47482, + 38.945 + ], + "b": [ + -77.47445, + 38.97078 + ], + "w": 45.7 + }, + { + "ap": "IAD", + "id": "01R/19L", + "a": [ + -77.436401, + 38.923801 + ], + "b": [ + -77.435997, + 38.955299 + ], + "w": 45.7 + }, + { + "ap": "IAD", + "id": "12/30", + "a": [ + -77.490402, + 38.943802 + ], + "b": [ + -77.455902, + 38.933601 + ], + "w": 45.7 + } + ] +} \ No newline at end of file diff --git a/.claude/skills/motion-video/toolkit/dc/view-core.json b/.claude/skills/motion-video/toolkit/dc/view-core.json new file mode 100644 index 0000000..c914026 --- /dev/null +++ b/.claude/skills/motion-video/toolkit/dc/view-core.json @@ -0,0 +1 @@ +{"region": "washington", "center": [-77.03, 38.895], "zoom": 12.8, "on": ["subway"], "w": 1080, "h": 1920, "nolabels": true, "routeOpacity": 0} diff --git a/.claude/skills/motion-video/toolkit/dc/view-dc.json b/.claude/skills/motion-video/toolkit/dc/view-dc.json new file mode 100644 index 0000000..b9213aa --- /dev/null +++ b/.claude/skills/motion-video/toolkit/dc/view-dc.json @@ -0,0 +1 @@ +{"region": "washington", "center": [-77.03, 38.895], "zoom": 10.6, "on": ["subway", "commuter", "amtrak", "red", "orange", "silver", "blue", "yellow", "green"], "w": 1080, "h": 1920, "nolabels": true, "routeOpacity": 0, "lineWidth": 2.2} diff --git a/.claude/skills/motion-video/toolkit/remo/package.json b/.claude/skills/motion-video/toolkit/remo/package.json new file mode 100644 index 0000000..46e3279 --- /dev/null +++ b/.claude/skills/motion-video/toolkit/remo/package.json @@ -0,0 +1,3 @@ +{"name": "motion-remo", "private": true, "type": "module", + "dependencies": {"remotion": "4.0.543", "@remotion/cli": "4.0.543", "@remotion/media": "4.0.543", "react": "19.2.0", "react-dom": "19.2.0"}, + "devDependencies": {"typescript": "5.9.3", "@types/react": "19.2.2"}} diff --git a/.claude/skills/motion-video/toolkit/remo/public/sfx/ding.wav b/.claude/skills/motion-video/toolkit/remo/public/sfx/ding.wav new file mode 100644 index 0000000..cf24d04 Binary files /dev/null and b/.claude/skills/motion-video/toolkit/remo/public/sfx/ding.wav differ diff --git a/.claude/skills/motion-video/toolkit/remo/public/sfx/mouse-click.wav b/.claude/skills/motion-video/toolkit/remo/public/sfx/mouse-click.wav new file mode 100644 index 0000000..ebc50d0 Binary files /dev/null and b/.claude/skills/motion-video/toolkit/remo/public/sfx/mouse-click.wav differ diff --git a/.claude/skills/motion-video/toolkit/remo/public/sfx/whoosh.wav b/.claude/skills/motion-video/toolkit/remo/public/sfx/whoosh.wav new file mode 100644 index 0000000..1bf1b71 Binary files /dev/null and b/.claude/skills/motion-video/toolkit/remo/public/sfx/whoosh.wav differ diff --git a/.claude/skills/motion-video/toolkit/remo/src/Motion.tsx b/.claude/skills/motion-video/toolkit/remo/src/Motion.tsx new file mode 100644 index 0000000..560cb01 --- /dev/null +++ b/.claude/skills/motion-video/toolkit/remo/src/Motion.tsx @@ -0,0 +1,181 @@ +import React from 'react'; +import { AbsoluteFill, Img, Sequence, staticFile, useCurrentFrame, interpolate, spring, Easing } from 'remotion'; +import { Audio } from '@remotion/media'; +export type Card = { f0: number; f1: number; kick: string; big?: string; bigValue?: number; decimals?: number; text: string }; +export type TL = { total: number; fps: number; clock: number[]; date: string; title: string; kicker: string; sub: string; + counter: { label: string; values: (number | null)[] }[]; cards: Card[]; pins: Record; + credit: string; outroFrom: number; frameDir: string; chapters?: { f: number; text: string }[]; cuts?: number[]; dayStart?: number; hook?: { place: string; line: string; cta?: string }; outroLine?: string; ffChip?: boolean; legend?: { kind: 'train' | 'bus' | 'plane'; label: string; color?: string }[]; + labels?: { defs: { t: 'hood' | 'boro' | 'wp'; label: string }[]; proj: number[][][] } }; +const fonts = ` +@font-face{font-family:PlexMono;src:url(${staticFile('fonts/IBMPlexMono-Regular.ttf')})} +@font-face{font-family:PlexMono;font-weight:500;src:url(${staticFile('fonts/IBMPlexMono-Medium.ttf')})} +@font-face{font-family:PlexSerif;font-weight:500;src:url(${staticFile('fonts/IBMPlexSerif-Medium.ttf')})}`; +const fmt = (t: number) => new Date(t).toLocaleTimeString('en-US', { timeZone: 'America/New_York', hour: 'numeric', minute: '2-digit' }).toLowerCase(); +const clamp = { extrapolateLeft: 'clamp' as const, extrapolateRight: 'clamp' as const }; +const shadow = '0 2px 18px rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.9)'; + +const ease = Easing.bezier(0.16, 1, 0.3, 1); +const CUT = (tl: TL) => (tl.cuts && tl.cuts[0]) || 180; + +// hook: a live number over the morning rush, then a flash cut back to midnight +const Hook: React.FC<{ tl: TL; f: number; fps: number }> = ({ tl, f, fps }) => { + const cut = CUT(tl); if (f >= cut) return null; + const v = tl.counter[0].values[f] ?? 0; + const inA = spring({ frame: f, fps, config: { damping: 16, mass: 0.6 } }); + const out = interpolate(f, [cut - 10, cut], [1, 0], clamp); + return
+
{(tl.hook?.place ?? '').toUpperCase()}, {fmt(tl.clock[f]).toUpperCase()}
+
{Math.round(v).toLocaleString('en-US')}
+
{tl.hook?.line ?? ''}
+
{tl.hook?.cta ?? 'now watch the whole day →'}
+
; +}; + +const Title: React.FC<{ tl: TL; f: number; fps: number }> = ({ tl, f, fps }) => { + const cut = CUT(tl); + const inA = spring({ frame: f - cut - 4, fps, config: { damping: 18, mass: 0.6 } }); + const out = interpolate(f, [cut + fps * 2.4, cut + fps * 2.9], [1, 0], clamp); + const back = interpolate(f, [tl.outroFrom, tl.outroFrom + fps * 0.6], [0, 1], clamp); + const a = f < cut ? 0 : Math.max(Math.min(inA, out), back), y = (1 - Math.max(Math.min(inA, 1), back)) * 40; + if (a <= 0.001) return null; + return
+
{f < tl.outroFrom ? 'BACK TO MIDNIGHT' : tl.kicker}
+
{tl.title}
+
{f < tl.outroFrom ? tl.sub : (tl.outroLine ?? '')}
+
; +}; + +// 24-hour progress track: where we are in the day +const DayBar: React.FC<{ tl: TL; f: number }> = ({ tl, f }) => { + const D0 = tl.dayStart ?? tl.clock[CUT(tl)], u = Math.max(0, Math.min(1, (tl.clock[f] - D0) / 86400000)), W = 560; + const hrs = [[0, '12a'], [6, '6a'], [12, '12p'], [18, '6p'], [24, '12a']] as const; + return
+
+
+ {tl.cards.map((c, i) => { const cu = (tl.clock[c.f0] - D0) / 86400000; return
= c.f0 ? '#ffd27a' : 'rgba(255,255,255,.35)' }} />; })} +
+ {hrs.map(([h, t]) =>
{t}
)} +
; +}; + +const Hud: React.FC<{ tl: TL; f: number; fps: number }> = ({ tl, f, fps }) => { + const cut = CUT(tl); + const a = interpolate(f, [cut + fps * 2.7, cut + fps * 3.2], [0, 1], clamp) * interpolate(f, [tl.outroFrom - fps * 0.6, tl.outroFrom], [1, 0], clamp); + if (a <= 0.001) return null; + const c = tl.counter.map((s) => ({ label: s.label, v: s.values[f] })).find((s) => s.v != null); + return
+
{fmt(tl.clock[f])}
+
{tl.date}
+ {c ?
{Math.round(c.v as number).toLocaleString('en-US')} {c.label}
: null} + +
; +}; + +const Chapter: React.FC<{ ch: { f: number; text: string }; f: number; fps: number }> = ({ ch, f, fps }) => { + const t = f - ch.f; if (t < 0 || t > fps * 2.2) return null; + const a = interpolate(t, [0, fps * 0.35, fps * 1.7, fps * 2.2], [0, 1, 1, 0], clamp); + return
{ch.text}
; +}; + +const CardView: React.FC<{ c: Card; f: number; fps: number }> = ({ c, f, fps }) => { + if (f < c.f0 || f > c.f1) return null; + const inA = spring({ frame: f - c.f0, fps, config: { damping: 20, mass: 0.7 } }); + const outA = interpolate(f, [c.f1 - fps * 0.35, c.f1], [1, 0], clamp); + const a = Math.min(inA, outA); + const dec = c.decimals ?? 0, n = c.bigValue != null ? c.bigValue * interpolate(f - c.f0, [0, fps * 0.9], [0, 1], { ...clamp, easing: Easing.out(Easing.cubic) }) : null; + return
+
+
{c.kick}
+ {n != null ?
{n.toLocaleString('en-US', { minimumFractionDigits: dec, maximumFractionDigits: dec })}{c.big ?? ''}
: null} +
+
{c.text}
+
; +}; + + +// basemap labels: neighborhoods, boroughs, waypoints. Screen positions come from the map's own camera (labels-proj.json). +const ORDER = { wp: 0, hood: 1, boro: 2 } as const; +const ss = (x: number, a: number, b: number) => Math.max(0, Math.min(1, (x - a) / (b - a))); +const Labels: React.FC<{ tl: TL; f: number; fps: number; pins: { x: number; y: number }[] }> = ({ tl, f, fps, pins }) => { + if (!tl.labels) return null; + const g = interpolate(f, [fps * 2.7, fps * 3.4], [0, 1], clamp) * interpolate(f, [tl.outroFrom - fps * 0.6, tl.outroFrom], [1, 0], clamp); + const chA = Math.max(0, ...(tl.chapters || []).map((c) => interpolate(f - c.f, [-8, 4, fps * 1.8, fps * 2.3], [0, 1, 1, 0], clamp))); + const gg = g * (1 - chA); if (gg <= 0.001) return null; + const card = tl.cards.some((c) => f >= c.f0 - 10 && f <= c.f1 + 10), yMax = card ? 1180 : 1500; + const taken: number[][] = pins.map((p) => [p.x - 140, p.y - 50, p.x + 140, p.y + 10]); + const out: React.JSX.Element[] = []; + const idx = tl.labels.defs.map((d, i) => i).sort((a, b) => ORDER[tl.labels!.defs[a].t] - ORDER[tl.labels!.defs[b].t]); + for (const i of idx) { + const d = tl.labels.defs[i], [x, y, on] = tl.labels.proj[f][i]; if (!on) continue; + const fs = d.t === 'boro' ? 28 : d.t === 'wp' ? 24 : 22, txt = d.t === 'wp' ? d.label : d.label.toUpperCase(); + const w = txt.length * fs * (d.t === 'wp' ? 0.6 : 0.72) + (d.t === 'wp' ? 22 : 0), h = fs + 10; + const box = d.t === 'wp' ? [x - 8, y - h / 2, x + w, y + h / 2] : [x - w / 2, y - h / 2, x + w / 2, y + h / 2]; + const a = g * (box[0] > 700 ? ss(box[1], 230, 300) : ss(box[1], 440, 520)) * (1 - ss(box[3], yMax - 80, yMax)) * ss(box[0], 30, 70) * (1 - ss(box[2], 1010, 1050)); + if (a <= 0.02 || taken.some((t) => box[0] < t[2] && box[2] > t[0] && box[1] < t[3] && box[3] > t[1])) continue; + taken.push(box); + const base = { position: 'absolute' as const, top: y, whiteSpace: 'nowrap' as const, textShadow: shadow, opacity: a }; + out.push(d.t === 'wp' + ?
+ {txt}
+ :
{txt}
); + } + return <>{out}; +}; + +// legend: what each mark is, from the cut to the outro +const Sw: React.FC<{ k: string; c?: string }> = ({ k, c }) => k === 'train' + ? + : k === 'bus' ? + : ; +const Legend: React.FC<{ tl: TL; f: number; fps: number }> = ({ tl, f, fps }) => { + if (!tl.legend) return null; + const a = interpolate(f, [CUT(tl) + fps * 0.5, CUT(tl) + fps * 1.5, tl.outroFrom - 10, tl.outroFrom], [0, 1, 1, 0], clamp); + return
+ {tl.legend.map((l, i) =>
{l.label}
)}
; +}; + +// fast-forward chip: shows while the clock races (speed read off the frame clock, smoothed) +const FastForward: React.FC<{ tl: TL; f: number; fps: number }> = ({ tl, f, fps }) => { + if (!tl.ffChip || f < CUT(tl) || f >= tl.outroFrom) return null; + const sp = (g: number) => { const a = Math.max(0, Math.min(tl.clock.length - 2, g)); return (tl.clock[a + 1] - tl.clock[a]) * fps / 60000; }; // clock minutes per video second + let m = 0; for (let d = -4; d <= 4; d++) m += sp(f + d); m /= 9; + const a = interpolate(m, [8, 25], [0, 1], clamp); if (a <= 0.01) return null; + const blink = 0.75 + 0.25 * Math.sin(f / 3); + return
+ fast forward
; +}; + +const Sfx: React.FC<{ tl: TL; fps: number }> = ({ tl, fps }) => <> + + {tl.cards.map((c, i) => )} + {(tl.chapters || []).map((c, i) => )} + +; + +export const Motion: React.FC<{ tl: TL }> = ({ tl }) => { + const f = useCurrentFrame(), fps = tl.fps; + const pins = tl.pins[String(f)] || []; + const z = 1 + tl.cards.reduce((m, c) => Math.max(m, interpolate(f, [c.f0 - 10, c.f0 + fps * 1.2, c.f1, c.f1 + fps * 0.8], [0, 0.07, 0.08, 0], { ...clamp, easing: ease })), 0); + const flash = interpolate(f - CUT(tl), [-2, 0, 10], [0, 0.85, 0], clamp); + return + + + + + {pins.map((p, i) =>
{p.label}
)} +
+ + + {(tl.chapters || []).map((ch, i) => )} + + + <Hud tl={tl} f={f} fps={fps} /> + <Legend tl={tl} f={f} fps={fps} /> + <FastForward tl={tl} f={f} fps={fps} /> + {tl.cards.map((c, i) => <CardView key={i} c={c} f={f} fps={fps} />)} + <AbsoluteFill style={{ backgroundColor: '#fff', opacity: flash, pointerEvents: 'none' }} /> + <div style={{ position: 'absolute', left: 40, right: 40, bottom: 26, textAlign: 'center', fontFamily: 'PlexMono', fontSize: 15, lineHeight: 1.45, color: 'rgba(255,255,255,.42)' }}>{tl.credit.split('\n').map((l, i) => <div key={i}>{l}</div>)}</div> + </AbsoluteFill>; +}; diff --git a/.claude/skills/motion-video/toolkit/remo/src/Root.tsx b/.claude/skills/motion-video/toolkit/remo/src/Root.tsx new file mode 100644 index 0000000..5ab0784 --- /dev/null +++ b/.claude/skills/motion-video/toolkit/remo/src/Root.tsx @@ -0,0 +1,7 @@ +import React from 'react'; +import { Composition, staticFile } from 'remotion'; +import { Motion, TL } from './Motion'; +// timeline.json (public/) is written by compose-area.sh; duration and fps come from it +export const Root: React.FC = () => <Composition id="Motion" component={Motion as any} width={1080} height={1920} fps={24} durationInFrames={24} + defaultProps={{ tl: null as unknown as TL }} + calculateMetadata={async () => { const tl: TL = await (await fetch(staticFile('timeline.json'))).json(); return { durationInFrames: tl.total, fps: tl.fps, props: { tl } }; }} />; diff --git a/.claude/skills/motion-video/toolkit/remo/src/index.ts b/.claude/skills/motion-video/toolkit/remo/src/index.ts new file mode 100644 index 0000000..fb4b302 --- /dev/null +++ b/.claude/skills/motion-video/toolkit/remo/src/index.ts @@ -0,0 +1,3 @@ +import { registerRoot } from 'remotion'; +import { Root } from './Root'; +registerRoot(Root); diff --git a/.claude/skills/motion-video/toolkit/remo/tsconfig.json b/.claude/skills/motion-video/toolkit/remo/tsconfig.json new file mode 100644 index 0000000..869285a --- /dev/null +++ b/.claude/skills/motion-video/toolkit/remo/tsconfig.json @@ -0,0 +1 @@ +{"compilerOptions": {"target": "ES2020", "module": "ESNext", "moduleResolution": "bundler", "jsx": "react-jsx", "strict": false, "skipLibCheck": true, "esModuleInterop": true, "noEmit": true}, "include": ["src"]} diff --git a/.claude/skills/motion-video/toolkit/three-render.cjs b/.claude/skills/motion-video/toolkit/three-render.cjs index 3123cae..d49c297 100644 --- a/.claude/skills/motion-video/toolkit/three-render.cjs +++ b/.claude/skills/motion-video/toolkit/three-render.cjs @@ -7,19 +7,22 @@ const ROOT = __dirname, TYPES = { '.js': 'text/javascript', '.html': 'text/html' const data = JSON.parse(fs.readFileSync(dataPath, 'utf8')), proj = JSON.parse(fs.readFileSync(projPath, 'utf8')); const extra = Object.fromEntries(Object.entries(job.extraJson || {}).map(([k, f]) => [k, JSON.parse(fs.readFileSync(path.resolve(ROOT, f), 'utf8'))])); // one browser + page per worker, reused for every slice it renders (setup is the slow part) +let CFG = null; // setup config + data as one JSON buffer, built once, served to every worker page async function open() { - const b = await chromium.launch({ executablePath: '/opt/pw-browsers/chromium-1194/chrome-linux/chrome', args: ['--use-gl=angle','--use-angle=swiftshader','--enable-unsafe-swiftshader','--ignore-gpu-blocklist'] }); + CFG = CFG || Buffer.from(JSON.stringify({ ...job.look, ...extra, bg: '/bg.png', proj, data })); + const b = await chromium.launch({ executablePath: '/opt/pw-browsers/chromium-1194/chrome-linux/chrome', args: ['--use-gl=angle','--use-angle=swiftshader','--enable-unsafe-swiftshader','--ignore-gpu-blocklist','--js-flags=--max-old-space-size=8192'] }); const p = await b.newPage({ viewport: { width: job.look.W || 1080, height: job.look.H || 1920 }, deviceScaleFactor: 1 }); p.on('pageerror', (e) => console.log('PAGEERR', e.message)); await p.route('http://local/**', (r) => { const u = new URL(r.request().url()).pathname; const f = u === '/' ? path.join(ROOT, 'three', job.page || 'index.html') : u === '/bg.png' ? path.resolve(bgPath) : (job.assets || {})[u] ? path.resolve(ROOT, job.assets[u]) : Object.keys(job.assets || {}).find((k) => k.endsWith('/') && u.startsWith(k)) ? (() => { const k = Object.keys(job.assets).find((k) => k.endsWith('/') && u.startsWith(k)); return path.resolve(ROOT, job.assets[k], u.slice(k.length)); })() : u.startsWith('/three/') ? path.join(ROOT, 'node_modules', u) : u.startsWith('/nm/') ? path.join(ROOT, 'node_modules', u.slice(4)) : null; + if (u === '/__cfg.json') return r.fulfill({ status: 200, contentType: 'application/json', body: CFG }); if (!f || !fs.existsSync(f)) return r.fulfill({ status: 404, body: '' }); r.fulfill({ status: 200, contentType: TYPES[path.extname(f)] || 'application/octet-stream', body: fs.readFileSync(f) }); }); await p.goto('http://local/', { waitUntil: 'load', timeout: 180000 }); await p.waitForFunction(() => typeof window.__setup === 'function', null, { timeout: 180000 }); - await p.evaluate((cfg) => window.__setup(cfg), { ...job.look, ...extra, bg: '/bg.png', proj, data }); + await p.evaluate(async () => window.__setup(await (await fetch('/__cfg.json')).json())); // fetched, not passed: a full day is too big to hand over through evaluate const [w0, w1] = await p.evaluate(() => window.__win); console.log('PEAK', JSON.stringify(await p.evaluate(() => window.__peakInfo))); const tm = await p.evaluate((n) => window.__tmap ? window.__tmap(n) : null, job.total); @@ -35,6 +38,9 @@ async function slice({ p, Tof }, s, i) { if ((f - s.f0) % 60 === 0) console.log(`s${i} ${f - s.f0}/${s.f1 - s.f0} ${new Date().toISOString()}`); } } +if (process.env.PROJ) { (async () => { const pts = JSON.parse(fs.readFileSync(process.env.PROJ, 'utf8')); const w = await open(); const out = []; + for (let f = 0; f < job.total; f += 500) out.push(...await w.p.evaluate(([a, b, q]) => window.__projectAll(a, b, q), [f, Math.min(job.total, f + 500), pts.map((x) => x.at)])); + fs.writeFileSync(`${outDir}/labels-proj.json`, JSON.stringify(out)); console.log('PROJ-DONE', out.length); await w.b.close(); })(); } else (async () => { const q = job.slices.map((s, i) => [s, i]); let next = 0; await Promise.all(Array.from({ length: +par }, async () => { diff --git a/.claude/skills/motion-video/toolkit/three/dc.html b/.claude/skills/motion-video/toolkit/three/dc.html new file mode 100644 index 0000000..8fe3ec0 --- /dev/null +++ b/.claude/skills/motion-video/toolkit/three/dc.html @@ -0,0 +1,335 @@ +<!doctype html><html><head><meta charset="utf-8"> +<style> + @font-face{font-family:PlexMono;src:url(/fonts/IBMPlexMono-Medium.ttf)} @font-face{font-family:PlexMono;font-weight:400;src:url(/fonts/IBMPlexMono-Regular.ttf)} @font-face{font-family:PlexSerif;src:url(/fonts/IBMPlexSerif-Medium.ttf)} @font-face{font-family:PlexSerif;font-style:italic;src:url(/fonts/IBMPlexSerif-MediumItalic.ttf)} + html,body{margin:0;background:#05060a;overflow:hidden;width:1080px;height:1920px} + canvas{position:absolute;inset:0} + #ov{display:none;position:absolute;left:130px;top:270px;font-family:'Inter Display',Inter,sans-serif;color:#fff;text-shadow:0 2px 18px rgba(0,0,0,.8)} + .w{font-size:26px;font-weight:700;letter-spacing:.38em;color:#9ad1ff;margin-bottom:12px} + .h{font-size:72px;font-weight:600;letter-spacing:-.02em;line-height:1} + .s{font-size:40px;font-weight:500;margin-top:16px;color:#e8e8e8} + #hud{display:none;position:absolute;left:96px;top:236px;font-family:PlexMono,monospace;color:#f3efe6;text-shadow:0 0 2px #000,0 0 2px #000;opacity:0} + #clk{font-size:58px;font-weight:500;letter-spacing:0;line-height:1} + #sub2{font-size:22px;font-weight:400;color:rgba(243,239,230,.7);margin-top:12px} + #ctx{display:none} + #line{position:absolute;left:96px;right:120px;bottom:168px;font-family:PlexSerif,serif;font-size:38px;font-weight:500;line-height:1.3;color:#f3efe6;text-shadow:0 0 2px #000,0 0 2px #000,0 1px 3px #000;opacity:0} + .pin{position:absolute;transform:translate(-50%,-100%);font-family:Inter,sans-serif;font-size:22px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:#fff;white-space:nowrap;text-shadow:0 1px 10px #000,0 0 3px #000;padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,.55);opacity:0} + .card{position:absolute;left:130px;max-width:560px;padding:16px 20px 18px;background:rgba(8,10,16,.8);border:1px solid rgba(255,255,255,.16);border-radius:12px;font-family:Inter,sans-serif;display:none} + .card b{display:block;font-size:22px;font-weight:600;color:#9ad1ff;margin-bottom:6px} + .card div{font-size:29px;font-weight:500;line-height:1.25;color:#f2f2f2} + #cr{display:none;position:absolute;left:96px;bottom:40px;font-family:PlexMono,monospace;font-size:14px;color:rgba(243,239,230,.35)} +</style> +<script type="importmap">{"imports":{"three":"/three/build/three.module.js","three/addons/":"/three/examples/jsm/"}}</script> +</head><body> +<div id="ov"><div class="w">MOTION</div><div class="h" id="title"></div><div class="s" id="sub"></div></div> +<div id="hud"><div id="clk"></div><div id="sub2"></div><div id="ctx"></div></div><div id="line"></div> +<div id="cr">map CARTO, OpenStreetMap. WMATA, MARC, VRE, DASH, Fairfax Connector, Amtrak. flights ADS-B. Capital Bikeshare, Lime</div> +<script type="module"> +import * as THREE from 'three'; +import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js'; +import { RenderPass } from 'three/addons/postprocessing/RenderPass.js'; +import { UnrealBloomPass } from 'three/addons/postprocessing/UnrealBloomPass.js'; +import { OutputPass } from 'three/addons/postprocessing/OutputPass.js'; +import { ShaderPass } from 'three/addons/postprocessing/ShaderPass.js'; + +const W = 1080, H = 1920; +// planes: arriving / departing / passing over (same validated trio as the Logan video) +const KIND = { arr: '#C98424', dep: '#1FA3B2', over: '#60646C' }; +// T lines in their own colours (Blue lifted so it reads on the dark map); buses one quiet cool neutral +const LINE = { red: '#DA291C', mattapan: '#DA291C', orange: '#ED8B00', blue: '#4D8EF0', green: '#00A651', silver: '#9AA4AE', commuter: '#A2559C', ferry: '#3AA7C9', vessel: '#7fd4ff', amtrak: '#A39E93', bus: '#A9D8FF' }; +// crowding: one sequential family, quiet -> hot +const CROWD = ['#4A5262', '#8A5A9E', '#C9559F', '#FF6FB5']; +// bikes: diverging drain (warm) / fill (cool) around a neutral, same as the Bluebikes video +const DRAIN = new THREE.Color('#D9772F'), FILL = new THREE.Color('#2A9DB0'), MID = new THREE.Color('#7E8494'); +const sm = (x) => { x = Math.min(1, Math.max(0, x)); return x * x * (3 - 2 * x); }; +// binary search: last index j with tr[j][0] <= T +const seek = (tr, T) => { let lo = 0, hi = tr.length - 1; if (T < tr[0][0]) return -1; if (T >= tr[hi][0]) return hi; while (hi - lo > 1) { const m = (lo + hi) >> 1; if (tr[m][0] <= T) lo = m; else hi = m; } return lo; }; +window.__setup = async (cfg) => { + document.getElementById('title').textContent = cfg.title; + document.getElementById('sub').innerHTML = cfg.sub; + const renderer = new THREE.WebGLRenderer({ antialias: true, preserveDrawingBuffer: true }); + renderer.setPixelRatio(1); renderer.setSize(W, H); document.body.prepend(renderer.domElement); renderer.shadowMap.enabled = true; renderer.shadowMap.type = THREE.PCFSoftShadowMap; + const scene = new THREE.Scene(); scene.fog = new THREE.Fog(new THREE.Color('#1a2132'), cfg.fogNear ?? 2600, cfg.fogFar ?? 6200); + const skyU = { uTop: { value: new THREE.Color() }, uHor: { value: new THREE.Color() }, uGlow: { value: new THREE.Color('#ff8a3d') }, uGlowAmt: { value: 0 }, uSun: { value: new THREE.Vector3(-0.93, -0.36, 0.05).normalize() } }; + scene.add(Object.assign(new THREE.Mesh(new THREE.SphereGeometry(40000, 48, 24), new THREE.ShaderMaterial({ side: THREE.BackSide, depthWrite: false, fog: false, uniforms: skyU, + vertexShader: `varying vec3 vD; void main(){ vD = normalize(position); gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); }`, + fragmentShader: `uniform vec3 uTop; uniform vec3 uHor; uniform vec3 uGlow; uniform float uGlowAmt; uniform vec3 uSun; varying vec3 vD; + void main(){ float h = clamp(vD.z, 0.0, 1.0); vec3 c = mix(uHor, uTop, pow(h, 0.55)); + float s = max(0.0, dot(normalize(vec3(vD.xy, 0.0)), normalize(vec3(uSun.xy, 0.0)))); c += uGlow * uGlowAmt * pow(s, 6.0) * exp(-h * 9.0); gl_FragColor = vec4(c, 1.0); }` })), { renderOrder: -1 })); + + const P = cfg.proj, TW = P.w * P.dpr, TH = P.h * P.dpr; + const Z = 512 * Math.pow(2, P.zoom) * P.dpr, S = Math.pow(2, P.zoom - 9.4); // S: plane sizes were tuned on the zoom-9.4 Logan map + const mx = (lon) => (lon + 180) / 360, my = (lat) => { const r = lat * Math.PI / 180; return (1 - Math.log(Math.tan(r) + 1 / Math.cos(r)) / Math.PI) / 2; }; + const cx = mx(P.center[0]), cy = my(P.center[1]); + const toW = (lon, lat) => [(mx(lon) - cx) * Z, -(my(lat) - cy) * Z]; + const loadTex = async (u) => { const t = await new THREE.TextureLoader().loadAsync(u); t.colorSpace = THREE.SRGBColorSpace; t.generateMipmaps = false; t.minFilter = THREE.LinearFilter; return t; }; + const feather = (px) => { const c = document.createElement('canvas'); c.width = 64; c.height = 112; const x2 = c.getContext('2d'); + for (let y = 0; y < 112; y++) for (let x = 0; x < 64; x++) { const a = Math.max(0, Math.min(1, Math.min(x, 63 - x, y * 64 / 112, (111 - y) * 64 / 112) / px)); x2.fillStyle = `rgb(${a * 255 | 0},${a * 255 | 0},${a * 255 | 0})`; x2.fillRect(x, y, 1, 1); } + return new THREE.CanvasTexture(c); }; + // ground: wide map feathered into a water-coloured apron, sharp high-zoom patch over the core + const gmat = new THREE.MeshBasicMaterial({ map: await loadTex(cfg.bg), alphaMap: feather(7), transparent: true, depthWrite: false, fog: true }); + scene.add(Object.assign(new THREE.Mesh(new THREE.PlaneGeometry(TW, TH), gmat), { renderOrder: 1 })); + const amat = new THREE.MeshBasicMaterial({ color: '#2c353c', fog: true }); + const apron = new THREE.Mesh(new THREE.PlaneGeometry(TW * 60, TH * 60, 120, 120), amat); apron.position.z = -25; scene.add(apron); // fine grid + well below: huge triangles broke depth on the software GPU + let hmat = null; + if (cfg.hi) { const HP = cfg.hi.proj, k = Math.pow(2, P.zoom - HP.zoom); + hmat = new THREE.MeshBasicMaterial({ map: await loadTex(cfg.hi.url), alphaMap: feather(9), transparent: true, depthWrite: false, fog: true }); + const patch = new THREE.Mesh(new THREE.PlaneGeometry(HP.w * HP.dpr * k, HP.h * HP.dpr * k), hmat); const [px, py] = toW(...HP.center); patch.position.set(px, py, 0.3); patch.renderOrder = 2; scene.add(patch); } + const hmats = []; for (const h of (cfg.his || [])) { const HP = h.proj, k = Math.pow(2, P.zoom - HP.zoom), m = new THREE.MeshBasicMaterial({ map: await loadTex(h.url), alphaMap: feather(9), transparent: true, depthWrite: false, fog: true }); hmats.push(m); + const patch = new THREE.Mesh(new THREE.PlaneGeometry(HP.w * HP.dpr * k, HP.h * HP.dpr * k), m); const [px, py] = toW(...HP.center); patch.position.set(px, py, 0.3 + 0.05 * hmats.length); patch.renderOrder = 2 + hmats.length; scene.add(patch); } + // Metro lines from GTFS shapes, in their own colours, as thin ribbons on the ground (shared track: side by side) + const railMats = []; + if (cfg.rail) { const ORD = { ORANGE: -1.5, SILVER: -0.5, BLUE: 0.5, YELLOW: 1.5, GREEN: 1.5, RED: 0 }, RW = (cfg.railW ?? 1.6) * S; + for (const L of cfg.rail.lines) { if (!(L.r in ORD)) continue; const w = L.pts.map((q) => toW(q[0], q[1])), v = []; + if (cfg.railMiter) { // one continuous strip with mitred joints: separate quads leave dark notches at every bend + const o = ORD[L.r] * RW * 1.1, zz = 0.7 + 0.04 * (ORD[L.r] + 2), N = w.map((p, i) => { const a = w[Math.max(0, i - 1)], b = w[Math.min(w.length - 1, i + 1)], l = Math.hypot(b[0] - a[0], b[1] - a[1]) || 1; return [-(b[1] - a[1]) / l, (b[0] - a[0]) / l]; }); + const E = (i, s) => [w[i][0] + N[i][0] * (o + s * RW / 2), w[i][1] + N[i][1] * (o + s * RW / 2), zz]; + for (let i = 0; i < w.length - 1; i++) v.push(...E(i, -1), ...E(i + 1, -1), ...E(i + 1, 1), ...E(i, -1), ...E(i + 1, 1), ...E(i, 1)); } else + for (let i = 0; i < w.length - 1; i++) { const [ax, ay] = w[i], [bx, by] = w[i + 1], len = Math.hypot(bx - ax, by - ay) || 1, nx = -(by - ay) / len, ny = (bx - ax) / len, o = ORD[L.r] * RW * 1.1; + const A0 = [ax + nx * (o - RW / 2), ay + ny * (o - RW / 2)], A1 = [ax + nx * (o + RW / 2), ay + ny * (o + RW / 2)], B0 = [bx + nx * (o - RW / 2), by + ny * (o - RW / 2)], B1 = [bx + nx * (o + RW / 2), by + ny * (o + RW / 2)]; + const zz = 0.7 + 0.04 * (ORD[L.r] + 2); v.push(...A0, zz, ...B0, zz, ...B1, zz, ...A0, zz, ...B1, zz, ...A1, zz); } + const g = new THREE.BufferGeometry(); g.setAttribute('position', new THREE.Float32BufferAttribute(v, 3)); + const m = new THREE.MeshBasicMaterial({ color: new THREE.Color(L.c).multiplyScalar(cfg.railDim ?? 1), transparent: true, opacity: cfg.railOpacity ?? 0.75, depthWrite: false, fog: true, side: THREE.DoubleSide }); railMats.push(m); + scene.add(Object.assign(new THREE.Mesh(g, m), { renderOrder: 5 + railMats.length })); } } + // traffic: 511 snapshots every 5 min, crossfaded; its strength follows the focus + const TS = cfg.traffic ? cfg.traffic.index : null, tcache = new Map(); + const tmat = new THREE.ShaderMaterial({ transparent: true, depthWrite: false, fog: false, uniforms: { uA: { value: null }, uB: { value: null }, uMix: { value: 0 }, uW: { value: 0.4 } }, + vertexShader: `varying vec2 vUv; void main(){ vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); }`, + fragmentShader: `uniform sampler2D uA; uniform sampler2D uB; uniform float uMix; uniform float uW; varying vec2 vUv; + void main(){ vec4 c = mix(texture2D(uA, vUv), texture2D(uB, vUv), uMix); float warm = step(0.7, c.a); c.a *= mix(0.25, 1.0, warm); + gl_FragColor = vec4(c.rgb * (0.85 + 0.15 * warm), min(1.0, c.a * (0.6 + 0.4 * warm)) * uW); }` }); + if (TS) { const tp = new THREE.Mesh(new THREE.PlaneGeometry(TW, TH), tmat); tp.position.z = 0.6; tp.renderOrder = 3; scene.add(tp); } + const tex = async (t) => { if (!tcache.has(t)) { tcache.set(t, await loadTex(`${cfg.traffic.base}${t}.png`)); while (tcache.size > 4) { const k = tcache.keys().next().value; tcache.get(k).dispose(); tcache.delete(k); } } return tcache.get(t); }; + const tstat = (T) => { if (!TS) return 0; const St = cfg.traffic.stats; let i = 0; while (i < St.length - 1 && St[i + 1][0] <= T) i++; const a = St[i], b = St[Math.min(i + 1, St.length - 1)]; + const u = b[0] > a[0] ? Math.min(1, Math.max(0, (T - a[0]) / (b[0] - a[0]))) : 0, v = (r) => r[2] + r[3]; return v(a) + (v(b) - v(a)) * u; }; + + const hemi = new THREE.HemisphereLight('#9fb4d8', '#1a1c22', 0.9); scene.add(hemi); + const sun = new THREE.DirectionalLight('#ffd2a1', 1.4); sun.position.set(-0.93, -0.36, 0.35); scene.add(sun); scene.add(sun.target); + sun.castShadow = true; sun.shadow.mapSize.set(2048, 2048); sun.shadow.bias = -0.0004; sun.shadow.normalBias = 0.5; sun.shadow.camera.near = 10; sun.shadow.camera.far = 9000; + { const sc = new THREE.Mesh(new THREE.PlaneGeometry(TW * 3, TH * 3), new THREE.ShadowMaterial({ opacity: 0.85, depthWrite: false })); sc.position.z = 0.36; sc.receiveShadow = true; sc.renderOrder = 4; scene.add(sc); } + // solar position for Boston (NOAA approximation): azimuth from north clockwise, elevation + const GEO = cfg.geo || [-71.03, 42.36]; + const sunPos = (T) => { const n = T / 86400000 + 2440587.5 - 2451545, L = (280.46 + 0.9856474 * n) % 360, g = (357.528 + 0.9856003 * n) * Math.PI / 180, lam = (L + 1.915 * Math.sin(g) + 0.02 * Math.sin(2 * g)) * Math.PI / 180, eps = 23.439 * Math.PI / 180; + const ra = Math.atan2(Math.cos(eps) * Math.sin(lam), Math.cos(lam)), dec = Math.asin(Math.sin(eps) * Math.sin(lam)), lst = ((((18.697374558 + 24.06570982441908 * n) % 24) * 15) + GEO[0]) * Math.PI / 180, Hh = lst - ra, lat = GEO[1] * Math.PI / 180; + const el = Math.asin(Math.sin(lat) * Math.sin(dec) + Math.cos(lat) * Math.cos(dec) * Math.cos(Hh)), az = Math.atan2(-Math.sin(Hh), Math.tan(dec) * Math.cos(lat) - Math.sin(lat) * Math.cos(Hh)); return { el, az }; }; + // 3D buildings: Logan only + let bmat = null; + for (const B of [cfg.bld, cfg.bld2].filter(Boolean)) { const KX = Math.cos(B.lat0 * Math.PI / 180) * 111320, KY = 110540, mPer = Z / (40075016.686 * Math.cos(B.lat0 * Math.PI / 180)), EX = cfg.bldEx ?? 3; + const pos = [], col = [], c = new THREE.Color(); + for (const b of B.buildings) { const pts = []; for (let i = 0; i < b.o.length; i += 2) { const [x, y] = toW(B.lon0 + b.o[i] / 10 / KX, B.lat0 - b.o[i + 1] / 10 / KY); pts.push(new THREE.Vector2(x, y)); } + if (pts.length < 3) continue; let g; try { g = new THREE.ExtrudeGeometry(new THREE.Shape(pts), { depth: Math.max(0.05, b.h * mPer * EX), bevelEnabled: false }); } catch (e) { continue; } + g = g.toNonIndexed(); g.translate(0, 0, 0.8); const p = g.attributes.position.array; c.set(b.c || '#9a9aa2'); c.lerp(new THREE.Color('#aab3c4'), 0.35); + for (let i = 0; i < p.length; i++) pos.push(p[i]); for (let i = 0; i < p.length / 3; i++) col.push(c.r, c.g, c.b); g.dispose(); } + const geo = new THREE.BufferGeometry(); geo.setAttribute('position', new THREE.Float32BufferAttribute(pos, 3)); geo.setAttribute('color', new THREE.Float32BufferAttribute(col, 3)); geo.computeVertexNormals(); + { const nn = geo.attributes.normal.array; for (let i = 0; i < nn.length; i += 3) if (!Number.isFinite(nn[i] + nn[i + 1] + nn[i + 2])) { nn[i] = 0; nn[i + 1] = 0; nn[i + 2] = 1; } } // NaN normals -> black bloom tiles + bmat = bmat || new THREE.MeshStandardMaterial({ vertexColors: true, roughness: 0.7, metalness: 0.15, emissive: new THREE.Color('#ffb36b'), emissiveIntensity: 0 }); const bm = new THREE.Mesh(geo, bmat); bm.castShadow = true; bm.receiveShadow = true; scene.add(bm); } + + // glow points (everything that moves), contrail ribbons, aircraft meshes, altitude drop lines + const MAX = 200000, pos = new Float32Array(MAX * 3), col = new Float32Array(MAX * 3), siz = new Float32Array(MAX), alp = new Float32Array(MAX), geo = new THREE.BufferGeometry(); + geo.setAttribute('position', new THREE.BufferAttribute(pos, 3)); geo.setAttribute('color', new THREE.BufferAttribute(col, 3)); geo.setAttribute('size', new THREE.BufferAttribute(siz, 1)); geo.setAttribute('alpha', new THREE.BufferAttribute(alp, 1)); + const pts = new THREE.Points(geo, new THREE.ShaderMaterial({ transparent: true, depthWrite: false, blending: THREE.AdditiveBlending, uniforms: { uD0: { value: 2200 }, uFogD: { value: 14000 }, uGlow: { value: 0.45 } }, + vertexShader: `attribute float size; attribute float alpha; attribute vec3 color; uniform float uD0; uniform float uFogD; varying vec3 vC; varying float vA; + void main(){ vec4 mv = modelViewMatrix * vec4(position,1.0); float d = -mv.z; vC = color; vA = alpha * clamp(1.0 - d / uFogD, 0.0, 1.0); gl_PointSize = clamp(size * uD0 / d, 1.5, 48.0); gl_Position = projectionMatrix * mv; }`, + fragmentShader: `uniform float uGlow; varying vec3 vC; varying float vA; + void main(){ float d = length(gl_PointCoord - 0.5) * 2.0; if (d > 1.0) discard; float core = smoothstep(0.42, 0.16, d); float glow = pow(1.0 - d, 2.6) * uGlow; + gl_FragColor = vec4(mix(vC, vec3(1.0), core * 0.35) * (core + glow) * vA, 1.0); }` })); + pts.frustumCulled = false; pts.renderOrder = 10; scene.add(pts); + const MAXT = 120000, tpos = new Float32Array(MAXT * 6), tcol = new Float32Array(MAXT * 6), tgeo = new THREE.BufferGeometry(); + tgeo.setAttribute('position', new THREE.BufferAttribute(tpos, 3)); tgeo.setAttribute('color', new THREE.BufferAttribute(tcol, 3)); + const trails = new THREE.LineSegments(tgeo, new THREE.LineBasicMaterial({ vertexColors: true, transparent: true, blending: THREE.AdditiveBlending, depthWrite: false, fog: true })); + trails.frustumCulled = false; trails.renderOrder = 9; scene.add(trails); + const ac = new THREE.BufferGeometry(), V = [], tri = (a, b, c) => V.push(...a, ...b, ...c), f = [[0.55, 0, 0], [-0.5, 0.06, 0], [-0.5, -0.06, 0], [-0.5, 0, 0.07], [-0.5, 0, -0.05]]; + tri(f[0], f[1], f[3]); tri(f[0], f[3], f[2]); tri(f[0], f[2], f[4]); tri(f[0], f[4], f[1]); + tri([0.12, 0, 0], [-0.22, 0.52, 0], [-0.3, 0.52, 0]); tri([0.12, 0, 0], [-0.3, 0.52, 0], [-0.18, 0, 0]); tri([0.12, 0, 0], [-0.3, -0.52, 0], [-0.22, -0.52, 0]); tri([0.12, 0, 0], [-0.18, 0, 0], [-0.3, -0.52, 0]); + tri([-0.38, 0, 0], [-0.52, 0.2, 0], [-0.55, 0.2, 0]); tri([-0.38, 0, 0], [-0.55, -0.2, 0], [-0.52, -0.2, 0]); tri([-0.36, 0, 0], [-0.55, 0, 0.22], [-0.52, 0, 0]); + ac.setAttribute('position', new THREE.Float32BufferAttribute(V, 3)); + const planes = new THREE.InstancedMesh(ac, new THREE.MeshBasicMaterial({ side: THREE.DoubleSide, fog: true }), 800); planes.frustumCulled = false; planes.renderOrder = 11; scene.add(planes); + const dummy = new THREE.Object3D(); dummy.rotation.order = 'ZYX'; const tint = (c) => c.clone().lerp(new THREE.Color('#ffffff'), 0.35); + const MAXL = 4000, lpos = new Float32Array(MAXL * 6), lcol = new Float32Array(MAXL * 6), lgeo = new THREE.BufferGeometry(); + lgeo.setAttribute('position', new THREE.BufferAttribute(lpos, 3)); lgeo.setAttribute('color', new THREE.BufferAttribute(lcol, 3)); + const drops = new THREE.LineSegments(lgeo, new THREE.LineBasicMaterial({ vertexColors: true, transparent: true, opacity: 0.7, blending: THREE.AdditiveBlending, depthWrite: false, fog: true })); + drops.frustumCulled = false; drops.renderOrder = 9; scene.add(drops); + + const cam = new THREE.PerspectiveCamera(38, W / H, 4, 90000); + const composer = new EffectComposer(renderer); composer.addPass(new RenderPass(scene, cam)); + composer.addPass(new ShaderPass({ uniforms: { tDiffuse: { value: null } }, vertexShader: 'varying vec2 vUv; void main(){ vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); }', + fragmentShader: 'uniform sampler2D tDiffuse; varying vec2 vUv; void main(){ vec4 c = texture2D(tDiffuse, vUv); if (any(isnan(c)) || any(isinf(c))) c = vec4(0.0, 0.0, 0.0, 1.0); gl_FragColor = clamp(c, 0.0, 32.0); }' })); + composer.addPass(new UnrealBloomPass(new THREE.Vector2(W, H), cfg.bloom ?? 0.36, 0.45, cfg.bloomThreshold ?? 0.6)); composer.addPass(new OutputPass()); + // camera keyframes in video time (frames), each looking at a place with an azimuth / tilt / distance + const KF = cfg.keys.map((k) => ({ ...k, w: toW(...k.at) })); + const setCam = (fk) => { let i = 0; while (i < KF.length - 2 && fk > KF[i + 1].f) i++; + const a = KF[i], b = KF[i + 1], e = sm((fk - a.f) / (b.f - a.f)), L = (p, q) => p + (q - p) * e; + const gx = L(a.w[0], b.w[0]), gy = L(a.w[1], b.w[1]), az = L(a.az, b.az) * Math.PI / 180, tilt = L(a.tilt, b.tilt) * Math.PI / 180, d = Math.exp(L(Math.log(a.dist), Math.log(b.dist))), ty = gy + L(a.lead ?? 0, b.lead ?? 0); + cam.position.set(gx + d * Math.sin(tilt) * Math.sin(az), ty - d * Math.sin(tilt) * Math.cos(az), d * Math.cos(tilt)); cam.up.set(0, 0, 1); cam.lookAt(gx, ty, 0); }; + // focus: how strongly each layer shows, keyed in video time + const FK = cfg.focus; const focus = (fk) => { let i = 0; while (i < FK.length - 2 && fk > FK[i + 1].f) i++; const a = FK[i], b = FK[i + 1], e = sm((fk - a.f) / Math.max(1, b.f - a.f)), o = {}; + for (const key of ['transit', 'crowd', 'traffic', 'planes', 'bikes', 'lime']) o[key] = (a.w[key] ?? 0) + ((b.w[key] ?? 0) - (a.w[key] ?? 0)) * e; return o; }; + + // --- transit + const TR = cfg.transit, crowd = (cfg.crowd || { status: {} }).status, list = []; + for (const [k, tr] of Object.entries(TR.tracks)) { const p = TR.props[k], g = p.g, vid = k.slice(k.indexOf(':') + 1).split('#')[0]; + list.push({ tr, g, vid, rail: g !== 'bus', c: new THREE.Color(p.c || LINE[g] || LINE.bus), cs: crowd[vid] || null, hl: (cfg.hl || {})[vid] || null, hist: [], last: null }); } + const byVid = {}; for (const v of list) (byVid[v.vid] = byVid[v.vid] || []).push(v); + const GAP = 600000, FADE = 420000; // gaps over 10 min (restarts, overnight) fade out / in instead of sliding across the map + const where = (tr, T) => { const j = seek(tr, T); if (j < 0) return tr[0][0] - T < FADE ? [tr[0][1], tr[0][2], 1 - (tr[0][0] - T) / FADE] : null; + const a = tr[j]; if (j === tr.length - 1) return T - a[0] < FADE ? [a[1], a[2], 1 - (T - a[0]) / FADE] : null; + const c = tr[j + 1], gap = c[0] - a[0]; + if (gap > GAP) { if (T - a[0] < FADE) return [a[1], a[2], 1 - (T - a[0]) / FADE]; if (c[0] - T < FADE) return [c[1], c[2], 1 - (c[0] - T) / FADE]; return null; } + if (Math.hypot(c[1] - a[1], (c[2] - a[2]) * 1.35) > 0.25) return [a[1], a[2], 1]; + const p0 = tr[j - 1] || a, p3 = tr[j + 2] || c, u = (T - a[0]) / gap, u2 = u * u, u3 = u2 * u; + const cr = (q0, q1, q2, q3) => 0.5 * ((2 * q1) + (-q0 + q2) * u + (2 * q0 - 5 * q1 + 4 * q2 - q3) * u2 + (-q0 + 3 * q1 - 3 * q2 + q3) * u3); + return [cr(p0[1], a[1], c[1], p3[1]), cr(p0[2], a[2], c[2], p3[2]), 1]; }; + const lvlAt = (cs, T) => { if (!cs) return -1; const j = seek(cs, T); if (j < 0) return cs[0][0] - T < 120000 ? cs[0][1] : -1; return T - cs[j][0] < 1800000 ? cs[j][1] : -1; }; + + // --- planes (24 h tracks [t, lon, lat, ft, onGround]); colour by what the plane is doing right now + const PL = cfg.planes, plist = [], byId = {}; + for (const [k, tr] of Object.entries(PL.tracks)) { const v = { tr, ev: [], hist: [], ph: plist.length % 23 }; plist.push(v); byId[k] = v; } + const events = (PL.events || []).map((e) => ({ kind: e[0], t: e[1], at: e[2], id: e[3] })); for (const e of events) if (byId[e.id]) byId[e.id].ev.push(e); + const kindAt = (v, T) => { for (const e of v.ev) { if (e.kind === 'arr' && T >= e.t - 1500000 && T <= e.t + 240000) return 'arr'; if (e.kind === 'dep' && T >= e.t - 480000 && T <= e.t + 1500000) return 'dep'; } return 'over'; }; + const AZ = 0.06 * S, altZ = (ft) => ft <= 8000 ? ft * AZ : 8000 * AZ + (ft - 8000) * AZ * 0.3; + const pwhere = (tr, T) => { const j = seek(tr, T); if (j < 0) return null; const a = tr[j]; if (j === tr.length - 1) return T - a[0] < 45000 ? a : null; + const c = tr[j + 1], gap = c[0] - a[0]; if (gap > GAP) return T - a[0] < 45000 ? a : null; if (gap > 180000 || Math.hypot(c[1] - a[1], c[2] - a[2]) > 0.4) return a; + const p0 = tr[j - 1] || a, p3 = tr[j + 2] || c, u = (T - a[0]) / gap, u2 = u * u, u3 = u2 * u; + const cr = (q0, q1, q2, q3) => 0.5 * ((2 * q1) + (-q0 + q2) * u + (2 * q0 - 5 * q1 + 4 * q2 - q3) * u2 + (-q0 + 3 * q1 - 3 * q2 + q3) * u3); + let br = -1; if (a[5] >= 0 && c[5] >= 0) { let d = ((c[5] - a[5] + 540) % 360) - 180; br = (a[5] + d * u + 360) % 360; } else br = a[5] >= 0 ? a[5] : (c[5] ?? -1); + return [T, cr(p0[1], a[1], c[1], p3[1]), cr(p0[2], a[2], c[2], p3[2]), Math.max(0, a[3] + (c[3] - a[3]) * u), a[4] && c[4], br]; }; + const yaw = (p, fallback) => (p[5] >= 0 ? Math.PI / 2 - p[5] * Math.PI / 180 : fallback); + // Logan: footprint, lit runways (glow in the colour of the plane using them), label + const AP = cfg.airport, rwys = [], RW0 = new THREE.Color('#5d6672'), EDGE = new THREE.Color('#ffe2b0'), GREEN = new THREE.Color('#59e08a'); + const MPU = (() => { const [ax] = toW(GEO[0], GEO[1]), [bx] = toW(GEO[0] + 0.01, GEO[1]); return 0.01 * 111320 * Math.cos(GEO[1] * Math.PI / 180) / (bx - ax); })(); + if (AP) { const fmat = new THREE.MeshBasicMaterial({ color: '#39414b', transparent: true, opacity: 0.5, depthWrite: false, fog: true }); + for (const ring of AP.area) { const m = new THREE.Mesh(new THREE.ShapeGeometry(new THREE.Shape(ring.map(([lo, la]) => new THREE.Vector2(...toW(lo, la))))), fmat); m.position.z = 0.4; m.renderOrder = 2; scene.add(m); } + for (const r of AP.runways) { const [ax, ay] = toW(...r.a), [bx, by] = toW(...r.b), len = Math.hypot(bx - ax, by - ay), wd = Math.max(r.w * 2.5 / MPU, 0.9); + const mat = new THREE.MeshBasicMaterial({ color: RW0.clone(), transparent: true, opacity: 0.9, depthWrite: false, fog: true }); + const m = new THREE.Mesh(new THREE.PlaneGeometry(len, wd), mat); m.position.set((ax + bx) / 2, (ay + by) / 2, 0.5); m.rotation.z = Math.atan2(by - ay, bx - ax); m.renderOrder = 3; scene.add(m); + rwys.push({ ...r, ax, ay, bx, by, len, wd, mat, ux: (bx - ax) / len, uy: (by - ay) / len, ev: [] }); } + for (const e of events) { const [ex, ey] = toW(e.at[0], e.at[1]); let best = null, bd = 1e9; + for (const r of rwys) { const t = Math.max(0, Math.min(r.len, (ex - r.ax) * r.ux + (ey - r.ay) * r.uy)), d = Math.hypot(r.ax + r.ux * t - ex, r.ay + r.uy * t - ey); if (d < bd) { bd = d; best = r; } } + if (best && bd * MPU < 700) best.ev.push(e); } } + // --- bikes: docks as soft points; colour = change since 1 AM (drain warm / fill cool), size = bikes docked + const BK = cfg.bikes || { stations: [], snaps: [[0, []]] }, bst = BK.stations.map(([lo, la, cap]) => ({ w: toW(lo, la), cap })), b0 = BK.snaps.find((s) => s[0] >= cfg.bikeRef) || BK.snaps[0]; + const bikesAt = (T) => { let i = 0; while (i < BK.snaps.length - 2 && BK.snaps[i + 1][0] <= T) i++; const a = BK.snaps[i], b = BK.snaps[i + 1] || a, u = b[0] > a[0] ? Math.min(1, Math.max(0, (T - a[0]) / (b[0] - a[0]))) : 0; return [a[1], b[1], u]; }; + const docked0 = b0[1].reduce((s, x) => s + Math.max(0, x), 0); + + const fmt = (T) => new Date(T).toLocaleTimeString('en-US', { timeZone: 'America/New_York', hour: 'numeric', minute: '2-digit' }).toLowerCase(); + const notes = (cfg.notes || []).map((n) => { const d = document.createElement('div'); d.className = 'card'; d.innerHTML = `<b>${n.kick}</b><div>${n.text}</div>`; document.body.appendChild(d); return { ...n, d }; }); + const pins = (cfg.pins || []).map((p) => { const d = document.createElement('div'); d.className = 'pin'; d.textContent = p.label; document.body.appendChild(d); return { ...p, w: toW(...p.at), d }; }); + const C = { dayTop: new THREE.Color('#2a3d63'), dayHor: new THREE.Color('#6f7f99'), nightTop: new THREE.Color('#05070d'), nightHor: new THREE.Color('#1a1d2e') }; + const dayStart = cfg.dayStart, TRAIL = 10, PTRAIL = 44; let frameNo = 0; + const BUSC = cfg.busColor ? new THREE.Color(cfg.busColor) : null, WHITE_T = new THREE.Color('#ffffff'); // DC: one bus colour; trains = white core in a line-colour halo + window.__win = [cfg.tmap[0], cfg.tmap[cfg.tmap.length - 1]]; + window.__tmap = () => cfg.tmap; + // labels pass: camera only, no drawing. returns per frame [[x, y, on], ...] for each [lon, lat] + window.__projectAll = (f0, f1, pts) => { const ws = pts.map((q) => toW(q[0], q[1])), out = []; + for (let k = f0; k < f1; k++) { setCam(Math.max(0, k)); cam.updateMatrixWorld(); + out.push(ws.map((w) => { const v = new THREE.Vector3(w[0], w[1], 2).project(cam); return [Math.round((v.x + 1) / 2 * W), Math.round((1 - v.y) / 2 * H), v.z < 1 ? 1 : 0]; })); } + return out; }; + window.__frame = async (T, draw, k = 0) => { + const fk = Math.max(0, k), F = focus(fk), camP = cam.position, tmpV = new THREE.Vector3(); + if (draw) { setCam(fk); cam.updateMatrixWorld(); } + let n = 0, nt = 0, ni = 0, nl = 0; + const put = (x, y, z, c, s, a) => { if (n >= MAX || a <= 0.003 || !Number.isFinite(x + y + z + s + a)) return; pos[n * 3] = x; pos[n * 3 + 1] = y; pos[n * 3 + 2] = z; col[n * 3] = c.r; col[n * 3 + 1] = c.g; col[n * 3 + 2] = c.b; siz[n] = s; alp[n] = a; n++; }; + const seg = (a, b, c, fa, fb) => { if (nt >= MAXT) return; const i = nt * 6; tpos.set(a, i); tpos.set(b, i + 3); tcol[i] = c.r * fa; tcol[i + 1] = c.g * fa; tcol[i + 2] = c.b * fa; tcol[i + 3] = c.r * fb; tcol[i + 4] = c.g * fb; tcol[i + 5] = c.b * fb; nt++; }; + // transit (line colours), recoloured by crowding as the crowd focus rises + let live = 0, crowded = 0; const CC = CROWD.map((c) => new THREE.Color(c)), tw = 0.35 + 0.65 * Math.max(F.transit, F.crowd), cw = F.crowd, tmpC = new THREE.Color(); + for (const v of list) { + v.last = null; const ll = where(v.tr, T); if (!ll) { v.hist.length = 0; continue; } + const [x, y] = toW(ll[0], ll[1]), fa = Math.max(0, Math.min(1, ll[2])); if (v.g !== 'amtrak' && fa > 0.5) live++; + const lvl = lvlAt(v.cs, T); if (lvl >= 2) crowded++; + const boat = v.g === 'ferry' || v.g === 'vessel'; tmpC.copy(v.g === 'bus' && BUSC ? BUSC : v.c); let s = (boat ? 8 : v.rail ? 6.5 : 3.6) * (cfg.dotScale ?? 1), a = Math.min(1, (boat ? 0.8 : v.rail ? 0.85 : cfg.busA ?? 0.5) * (cfg.dotBright ?? 1)) * fa; + if (cw > 0.01) { const cc = lvl < 0 ? CC[0] : CC[lvl], cs = lvl < 0 ? 3.5 : [4, 5.5, 8, 10][lvl], ca = lvl < 0 ? 0.25 : [0.4, 0.65, 1, 1][lvl]; + tmpC.lerp(cc, cw); s += (cs - s) * cw; a += (ca * fa - a) * cw; } + a *= tw; s *= S; const HL = v.hl && v.hl.some((w) => T >= w[0] && T <= w[1]); if (HL) { tmpC.set('#ffe94a'); s = Math.max(s, 9 * S); a = 1; } v.last = [x, y, fa]; + for (let j = 0; j < v.hist.length; j++) { const q = 1 - (j + 1) / (TRAIL + 1); put(v.hist[j][0], v.hist[j][1], 2, tmpC, s * (0.35 + 0.5 * q), a * 0.3 * q); } + if (v.rail && cfg.trainCore) { put(x, y, 2.1, tmpC, s * 2.1, a * 0.6); put(x, y, 2.2, WHITE_T, s * 0.75, Math.min(1, a * 1.25)); } else put(x, y, 2, tmpC, s, a); if (HL) put(x, y, 2, tmpC, s * 2.4, 0.3 + 0.18 * Math.sin(k / 2.5)); if (cw > 0.3 && lvl === 3 && (k + (v.tr.length % 17)) % 20 < 10) put(x, y, 2, tmpC, s * 2.2, 0.35 * cw); + if (frameNo % 2 === 0) { v.hist.unshift([x, y]); if (v.hist.length > TRAIL) v.hist.pop(); } + } + // planes + const pw = 0.3 + 0.7 * F.planes, WHITE = new THREE.Color('#ffffff'); let air = 0; + for (const v of plist) { + const p = pwhere(v.tr, T); if (!p) { v.hist.length = 0; continue; } + const kind = kindAt(v, T), over = kind === 'over', vc = new THREE.Color(KIND[kind]); + const [x, y] = toW(p[1], p[2]), z = 2 + altZ(p[3]), size = (over ? 12 : 30) * S * (cfg.planeScale ?? 1), ta = (over ? 0.22 : 0.6) * pw; + if (p[4] || p[3] < 50) { v.hist.length = 0; if (over && pw < 0.6) continue; put(x, y, 1.5, vc, size * 0.3, 0.22 * pw); + const ga = pwhere(v.tr, T - 15000) || p, gb = pwhere(v.tr, T + 15000) || p, [gx0, gy0] = toW(ga[1], ga[2]), [gx1, gy1] = toW(gb[1], gb[2]); + if (Math.hypot(gx1 - gx0, gy1 - gy0) > 1.5 * S && ni < 800) { const sc = (over ? 5 : 8) * S * (cfg.planeScale ?? 1); dummy.position.set(x, y, 1.5); dummy.rotation.set(0, 0, yaw(p, Math.atan2(gy1 - gy0, gx1 - gx0))); dummy.scale.set(sc, sc, sc); + dummy.updateMatrix(); planes.setMatrixAt(ni, dummy.matrix); planes.setColorAt(ni, tint(vc).multiplyScalar(pw)); ni++; } + continue; } + if (Math.abs(x) < TW / 2 && Math.abs(y) < TH / 2) air++; + let prev = [x, y, z], fp = (over ? 0.4 : 0.95) * pw; + if (!(over && cfg.overTrails === false)) for (let j = 0; j < v.hist.length; j++) { const q = 1 - (j + 1) / (PTRAIL + 1), h = v.hist[j], fj = (over ? 0.4 : 0.95) * pw * q * q; seg(prev, h, vc, fp, fj); prev = h; fp = fj; if (j % 2 === 1) put(h[0], h[1], h[2], vc, size * (0.25 + 0.35 * q), ta * 0.6 * q); } + const near = draw ? sm((camP.distanceTo(tmpV.set(x, y, z)) - 140 * S) / (220 * S)) : 1; + put(x, y, z, vc, size * 0.75, (over ? 0.4 : 0.9) * near * pw); + const pa = pwhere(v.tr, T - 40000) || p, pb = pwhere(v.tr, T + 40000) || p, [ax, ay] = toW(pa[1], pa[2]), [bx, by] = toW(pb[1], pb[2]), hd = yaw(p, Math.atan2(by - ay, bx - ax)); + const hz = Math.hypot(bx - ax, by - ay), pitch = Math.max(-0.3, Math.min(0.3, Math.atan2((altZ(pb[3]) - altZ(pa[3])) * 0.3, Math.max(hz, 1)))); + let turn = yaw(pb, Math.atan2(by - ay, bx - ax)) - yaw(pa, hd); while (turn > Math.PI) turn -= 2 * Math.PI; while (turn < -Math.PI) turn += 2 * Math.PI; + if (hz > 2 * S && ni < 800 && near > 0.02) { const sc = (over ? 10 : 21) * S * near * (cfg.planeScale ?? 1); dummy.position.set(x, y, z); dummy.rotation.set(Math.max(-0.45, Math.min(0.45, -turn * 1.1)), -pitch, hd); dummy.scale.set(sc, sc, sc); + dummy.updateMatrix(); planes.setMatrixAt(ni, dummy.matrix); planes.setColorAt(ni, tint(vc).multiplyScalar((over ? 0.6 : 1) * pw)); ni++; } + if (!over && (k + v.ph) % 24 < 2) put(x, y, z, WHITE, size * 0.55, 1.2 * pw); + if (!over && cfg.drops !== false && z > 6 * S && nl < MAXL) { const i = nl * 6; lpos[i] = x; lpos[i + 1] = y; lpos[i + 2] = z; lpos[i + 3] = x; lpos[i + 4] = y; lpos[i + 5] = 0.5; + lcol[i] = vc.r * 0.5 * pw; lcol[i + 1] = vc.g * 0.5 * pw; lcol[i + 2] = vc.b * 0.5 * pw; lcol[i + 3] = 0; lcol[i + 4] = 0; lcol[i + 5] = 0; nl++; put(x, y, 1, vc, size * 0.5, 0.25 * pw); } + if (frameNo % 2 === 0) { v.hist.unshift([x, y, z]); if (v.hist.length > PTRAIL) v.hist.pop(); } + } + // touchdown / lift-off rings and runway lights + let flights = 0; + for (const e of events) { if (e.t <= T && e.t >= dayStart) flights++; const age = (T - e.t) / 60000; if (age < 0 || age > 2) continue; + const [ex, ey] = toW(e.at[0], e.at[1]), r = (6 + age * 34) * S * (cfg.ringScale ?? 1), a = (1 - age / 2) * 0.7 * pw * (cfg.ringAlpha ?? 1), c = new THREE.Color(KIND[e.kind]); + for (let q = 0; q < 28; q++) { const th = q / 28 * Math.PI * 2; put(ex + Math.cos(th) * r, ey + Math.sin(th) * r, 1.2, c, 5 * S, a); } } + for (const r of rwys) { let hot = 0, hc = null; + for (const e of r.ev) { const age = (T - e.t) / 60000; if (age < -0.5 || age > 2) continue; const h = age < 0 ? 1 + age * 2 : 1 - age / 2; if (h > hot) { hot = h; hc = KIND[e.kind]; } } + r.mat.color.copy(RW0); if (hot > 0) r.mat.color.lerp(new THREE.Color(hc), hot * 0.85); + const step = 220 / MPU, nx = -r.uy * r.wd / 2, ny = r.ux * r.wd / 2, s = (2.2 + hot * 1.8) * S, al = (0.6 + hot * 0.4) * (0.5 + 0.5 * pw); + for (let t = 0; t <= r.len + 1e-6; t += step) { const x = r.ax + r.ux * t, y = r.ay + r.uy * t; put(x + nx, y + ny, 0.9, EDGE, s, al); put(x - nx, y - ny, 0.9, EDGE, s, al); } + for (const [x, y] of [[r.ax, r.ay], [r.bx, r.by]]) for (let q = -2; q <= 2; q++) put(x + nx * q / 2, y + ny * q / 2, 0.9, GREEN, 2.4 * S, 0.9); } + // bikes + let bikesOut = 0, starNow = 0; const STAR = BK.star ?? -1; + { const [A, B, u] = bikesAt(T); let dock = 0; const bc = new THREE.Color(); + for (let i = 0; i < bst.length; i++) { const a = A[i], b = B[i]; if (a < 0 && b < 0) continue; const now = a < 0 ? b : b < 0 ? a : a + (b - a) * u; dock += now; + if (F.bikes < 0.02) continue; const ref = b0[1][i] < 0 ? now : b0[1][i], d = now - ref, m = Math.min(1, Math.abs(d) / 12); + bc.copy(MID).lerp(d < 0 ? DRAIN : FILL, m); + if (i === STAR) { starNow = Math.round(now); const full = now >= bst[i].cap - 0.5; bc.set(full ? '#ffe94a' : '#7fd4ff'); put(bst[i].w[0], bst[i].w[1], 1.8, bc, (5 + Math.sqrt(Math.max(0, now)) * 2.6) * S, F.bikes); put(bst[i].w[0], bst[i].w[1], 1.8, bc, (14 + 2 * Math.sin(k / 3)) * S, 0.3 * F.bikes); continue; } + put(bst[i].w[0], bst[i].w[1], 1.6, bc, (2.5 + Math.sqrt(Math.max(0, now)) * 1.6) * S, (0.35 + 0.6 * m) * F.bikes); } + bikesOut = Math.round(docked0 - dock); } + if (cfg.lime && F.lime > 0.02) { const LS = cfg.lime; let i = 0; while (i < LS.length - 2 && LS[i + 1][0] <= T) i++; const LC = new THREE.Color('#7CFF6B'); + if (Math.abs(LS[i][0] - T) < 900000) { const Q = LS[i][1], flat = typeof Q[0] === 'number'; // flat [lon, lat, lon, lat, ...] keeps a full day of snapshots small + for (let n = 0; n < (flat ? Q.length / 2 : Q.length); n++) { const [x, y] = flat ? toW(Q[2 * n], Q[2 * n + 1]) : toW(Q[n][0], Q[n][1]); put(x, y, 1.4, LC, 2.2 * S, 0.5 * F.lime); } } } + frameNo++; + if (!draw) return; + // traffic overlay pair around T + if (TS) { let i = 0; while (i < TS.length - 2 && TS[i + 1] <= T) i++; const ta = TS[i], tb = TS[Math.min(i + 1, TS.length - 1)]; + tmat.uniforms.uA.value = await tex(ta); tmat.uniforms.uB.value = await tex(tb); tmat.uniforms.uMix.value = tb > ta ? sm((T - ta) / (tb - ta)) : 0; tmat.uniforms.uW.value = 0.3 + 0.7 * F.traffic; } + // light: night -> sunrise -> day -> sunset glow -> night + const Td = cfg.dayStart + ((T - cfg.dayStart) % 86400000), mr = (Td - cfg.sunrise) / 60000, ms = (Td - cfg.sunset) / 60000, night = Math.max(1 - sm((mr + 15) / 40), sm((ms + 20) / 35)), glow = Math.max(0, 1 - Math.abs(ms + 4) / 22, 0.6 * (1 - Math.abs(mr - 4) / 22)); + skyU.uTop.value.copy(C.dayTop).lerp(C.nightTop, night); skyU.uHor.value.copy(C.dayHor).lerp(C.nightHor, night); skyU.uGlowAmt.value = 0.9 * glow; + skyU.uSun.value.set(Td < cfg.noon ? 0.93 : -0.93, Td < cfg.noon ? 0.2 : -0.36, 0.05).normalize(); + scene.fog.color.copy(skyU.uHor.value); + const g = 1.4 - 0.75 * night; gmat.color.setRGB(g, g, g); amat.color.set('#2c353c').multiplyScalar(g); if (hmat) hmat.color.setRGB(g, g, g); for (const m of hmats) m.color.setRGB(g, g, g); + hemi.intensity = 0.9 - 0.6 * night; if (bmat) bmat.emissiveIntensity = 0.22 * night; + { const sp = sunPos(T), up = Math.max(0, Math.sin(sp.el)), dir = new THREE.Vector3(Math.sin(sp.az) * Math.cos(sp.el), Math.cos(sp.az) * Math.cos(sp.el), Math.max(0.03, Math.sin(sp.el))); + sun.intensity = 1.6 * Math.min(1, up * 5) * (1 - 0.5 * night); const KFt = KF; let i = 0; while (i < KFt.length - 2 && fk > KFt[i + 1].f) i++; + const a = KFt[i], b = KFt[i + 1], e = sm((fk - a.f) / (b.f - a.f)), gx = a.w[0] + (b.w[0] - a.w[0]) * e, gy = a.w[1] + (b.w[1] - a.w[1]) * e, d = Math.exp(Math.log(a.dist) + (Math.log(b.dist) - Math.log(a.dist)) * e); + sun.target.position.set(gx, gy, 0); sun.position.copy(sun.target.position).addScaledVector(dir, 3000); const hs = Math.min(2600, Math.max(140, d * 1.3)), scm = sun.shadow.camera; scm.left = -hs; scm.right = hs; scm.top = hs; scm.bottom = -hs; scm.updateProjectionMatrix(); + skyU.uSun.value.copy(dir).normalize(); } + geo.setDrawRange(0, n); for (const a of ['position', 'color', 'size', 'alpha']) geo.attributes[a].needsUpdate = true; + tgeo.setDrawRange(0, nt * 2); tgeo.attributes.position.needsUpdate = true; tgeo.attributes.color.needsUpdate = true; + lgeo.setDrawRange(0, nl * 2); lgeo.attributes.position.needsUpdate = true; lgeo.attributes.color.needsUpdate = true; + planes.count = ni; planes.instanceMatrix.needsUpdate = true; if (planes.instanceColor) planes.instanceColor.needsUpdate = true; + // HUD: title first, then clock + whichever number the camera is on + const F0 = cfg.textFrames ?? 96, fo = sm((k - F0) / 30); document.getElementById('ov').style.opacity = 1 - fo; document.getElementById('hud').style.opacity = sm((k - F0 - 10) / 24); + document.getElementById('clk').textContent = fmt(T); + document.getElementById('sub2').textContent = new Date(T).toLocaleDateString('en-US', { timeZone: 'America/New_York', weekday: 'long', month: 'long', day: 'numeric' }).toLowerCase(); + const top = Object.entries(F).sort((a, b) => b[1] - a[1])[0][0], tp = tstat(T); + const CX = (cfg.ctx || []).find((c) => k >= c.f0 && k < c.f1); + document.getElementById('ctx').textContent = CX ? CX.text.replace('{star}', String(starNow)) : top === 'planes' ? `${flights.toLocaleString()} landings and takeoffs so far` : top === 'traffic' ? `${(tp * 100).toFixed(1)}% of roads jammed` : top === 'crowd' ? `${crowded} trains and buses with people standing` + : top === 'bikes' ? (bikesOut > 0 ? `${bikesOut} more Bluebikes out than at 1 AM` : 'Bluebikes back in their docks') : `${live.toLocaleString()} trains and buses running`; + { const ln = (cfg.lines || []).find((c) => k >= c.f0 - 12 && k < c.f1 + 12), el = document.getElementById('line'); if (ln) { el.textContent = ln.text; el.style.opacity = Math.max(0, Math.min(1, (k - ln.f0 + 12) / 12, (ln.f1 + 12 - k) / 12)); } else el.style.opacity = 0; } + for (const p of pins) { const a = Math.min(1, (k - p.f0) / 10, (p.f1 - k) / 10); if (a <= 0) { p.d.style.opacity = 0; continue; } + let w = p.w; if (p.track) { const vv = (byVid[p.track] || []).find((q) => q.last && q.last[2] > 0.5); if (!vv) { p.d.style.opacity = 0; continue; } w = vv.last; } + if (p.labels) { const L = p.labels.filter((l) => l[0] <= T).pop(); p.d.textContent = L ? L[1] : p.label; } + const v = new THREE.Vector3(w[0], w[1], 2).project(cam), on = v.z < 1 && Math.abs(v.x) < 0.85 && v.y > -0.6 && v.y < 0.6; + p.d.style.left = ((v.x + 1) / 2 * W) + 'px'; p.d.style.top = ((1 - v.y) / 2 * H - 10) + 'px'; p.d.style.opacity = on ? a : 0; } + if (!scene.userData.noCull) { scene.traverse((o) => { o.frustumCulled = false; }); scene.userData.noCull = true; } + composer.render(); renderer.getContext().finish(); + }; + return true; +}; +</script></body></html>