Skip to content

Instantly share code, notes, and snippets.

View dsaffo's full-sized avatar
☄️

David Saffo dsaffo

☄️
  • Boston, Detroit
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Embedding Vega-Lite</title>
<script src="https://unpkg.com/peerjs@1.0.4/dist/peerjs.min.js"></script>
<script src="https://unpkg.com/visconnect@1.1.2/visconnect-bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vega@5.13.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@4.14.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6.10.0"></script>
</head>
@dsaffo
dsaffo / index.html
Last active July 29, 2020 19:31
Vega X VisConnect: Paintbrush Highlight
<!DOCTYPE html>
<html>
<head>
<title>Embedding Vega-Lite</title>
<script src="https://unpkg.com/peerjs@1.0.4/dist/peerjs.min.js"></script>
<script src="https://unpkg.com/visconnect@1.1.2/visconnect-bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vega@5.13.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@4.14.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6.10.0"></script>
</head>
@dsaffo
dsaffo / index.html
Last active July 29, 2020 19:31
Vega X VisConnect: Rectangular Brush
<!DOCTYPE html>
<html>
<head>
<title>Embedding Vega-Lite</title>
<script src="https://unpkg.com/peerjs@1.0.4/dist/peerjs.min.js"></script>
<script src="https://unpkg.com/visconnect@1.1.2/visconnect-bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vega@5.13.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@4.14.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6.10.0"></script>
</head>
@dsaffo
dsaffo / index.html
Last active July 29, 2020 19:31
Vega X VisConnect: Focus + Context - Smooth Histogram Zooming
<!DOCTYPE html>
<html>
<head>
<title>Embedding Vega-Lite</title>
<script src="https://unpkg.com/peerjs@1.0.4/dist/peerjs.min.js"></script>
<script src="https://unpkg.com/visconnect@1.1.2/visconnect-bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vega@5.13.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@4.14.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6.10.0"></script>
</head>
@dsaffo
dsaffo / index.html
Last active July 29, 2020 19:31
Vega X VisConnect: Interactive Legend
<!DOCTYPE html>
<html>
<head>
<title>Embedding Vega-Lite</title>
<script src="https://unpkg.com/peerjs@1.0.4/dist/peerjs.min.js"></script>
<script src="https://unpkg.com/visconnect@1.1.2/visconnect-bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vega@5.13.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@4.14.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6.10.0"></script>
</head>
@dsaffo
dsaffo / index.html
Last active March 18, 2024 23:14
Vega X VisConnect: Bar Chart with Highlighting on Hover and Selection on Click
<!DOCTYPE html>
<html>
<head>
<title>Embedding Vega-Lite</title>
<script src="https://unpkg.com/peerjs@1.0.4/dist/peerjs.min.js"></script>
<script src="https://unpkg.com/visconnect@1.1.2/visconnect-bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vega@5.13.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@4.14.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6.10.0"></script>
</head>
@dsaffo
dsaffo / README.md
Last active July 29, 2020 19:08 — forked from measrainsey/README.md
US Nuclear Generating Capacity Map
We couldn’t find that file to show.
@dsaffo
dsaffo / README.md
Last active October 15, 2020 19:27 — forked from mbostock/.block
Versor Dragging

VisConnect Versor Dragging

This VisConnect example is adapted from this observable. The only changes are adding the PeerJS and VisConnect script tags, and replacing d3.drag() with vc.drag(). Click the visconnect logo on the bottom right and send the coppied URL to a friend. Once they open the link all your interactions will be synchronized!

@dsaffo
dsaffo / .block
Last active July 27, 2020 19:44 — forked from tristanwietsma/.block
Brush & Zoom
license: gpl-3.0
@dsaffo
dsaffo / Lekagul_slice.csv
Last active July 27, 2020 19:34 — forked from john-guerra/.block
D3 Brush and Linking
We can't make this file beautiful and searchable because it's too large.
Timestamp,car-id,car-type,gate-name
2016-05-02 18:05:34,20161602051605-625,2P,camping7
2016-05-02 18:09:13,20160902060913-100,2,entrance3
2016-05-02 18:15:04,20161602051605-625,2P,general-gate6
2016-05-02 18:18:28,20165902055925-718,1,general-gate2
2016-05-02 18:19:46,20161602051605-625,2P,general-gate5
2016-05-02 18:21:32,20165902055925-718,1,ranger-stop0
2016-05-02 18:24:26,20165902055925-718,1,ranger-stop2
2016-05-02 18:25:29,20163502053547-68,3,entrance2
2016-05-02 18:26:56,20165902055925-718,1,general-gate1