Skip to content

Instantly share code, notes, and snippets.

@Andrew-Reid
Andrew-Reid / directionsBySeason.csv
Last active October 13, 2016 01:17
Radial Bar Chart/Wind Rose/Compass Chart
direction Spring Summer Fall Winter
North 0.4 0.3 0.2 0.35
East 0.2 0.2 0.3 0.24
South 0.1 0.2 0.4 0.2
West 0.25 0.2 0.2 0.3
@Andrew-Reid
Andrew-Reid / buffer.json
Last active October 23, 2019 22:43
Text Along Topojson Features
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Andrew-Reid
Andrew-Reid / index.html
Last active December 26, 2016 20:54
Setting an Conic Equal Area Projection
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
svg {
background: #9ecae1;
}
@Andrew-Reid
Andrew-Reid / index.html
Last active October 13, 2016 01:17
Basic Map Scale Bar
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
svg {
background: #9ecae1;
}
@Andrew-Reid
Andrew-Reid / fronts.json
Last active October 14, 2016 01:32
Basic Weather Fronts - markers along topojson lines
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Andrew-Reid
Andrew-Reid / contours.json
Last active October 23, 2016 04:21
Railway symbology in d3.js
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Andrew-Reid
Andrew-Reid / index.html
Last active January 11, 2023 14:09
Flow Map
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<script src="http://d3js.org/d3.v4.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/1.6.19/topojson.min.js"></script>
<script src="https://d3js.org/d3-geo-projection.v1.min.js"></script>
<style>
.route {
@Andrew-Reid
Andrew-Reid / coal.csv
Last active October 23, 2016 23:05
Animated Paths in a Flow Map
dept via arr vol
Victoria VictoriaOffshoreSF San Francisco 69042
Victoria VictoriaOffshoreOS Portland 4908.2
Victoria VictoriaOffshoreAS Honolulu 5968
Victoria VictoriaOffshoreSC San Diego 1000
Victoria VictoriaOffshoreMX Mazatlan 600
Victoria VictoriaOffshoreSC San Pedro 430
Victoria VictoriaOffshoreAK Ounalaska 332
Victoria VictoriaOffshoreAK Sitka 2565.25
@Andrew-Reid
Andrew-Reid / aqueducts.json
Last active October 26, 2016 15:42
The Yukon Ditch - D3 Maps and Aqueduct Symbology
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Andrew-Reid
Andrew-Reid / Readme.md
Last active October 31, 2016 22:04
Tissot's Indicatrix

An attempt at Tissot's Indicatrix in d3.js v4.

It uses a spherical earth for ease of calculation, but as the earth is a slight ellipsoid, there could be a small amount of error. But this is small enough it shouldn't distort the graphics.

Each indicator circle/ellipse (depending on projection) represents a circular area with a 500 km radius. The number of indicators can be changed with the across/high variables.