Skip to content

Instantly share code, notes, and snippets.

View AlphaT7's full-sized avatar

Jamison Winters AlphaT7

View GitHub Profile
@adg29
adg29 / README.md
Last active November 16, 2024 18:00 — forked from markmarkoh/README.md
New York with Counties (FIPS codes)

This example uses custom map data that includes counties in the state of New York. Custom map data is specified with geographyConfig.dataUrl, which will attempt to make d3.json request to that URL.

In this example, counties are referred to by their FIPs code.

The data was converted from a .SHP file to TopoJSON, instructions to do that here

More DataMaps examples here

@sahat
sahat / client.js
Last active February 23, 2022 17:09
Calculate client-server latency using socket.io
var socket = io.connect('http://localhost');
var startTime;
setInterval(function() {
startTime = Date.now();
socket.emit('ping');
}, 2000);
socket.on('pong', function() {
latency = Date.now() - startTime;