Skip to content

Instantly share code, notes, and snippets.

@syntagmatic
syntagmatic / heatlane-spec.json
Last active July 11, 2022 23:23 — forked from jonmmease/heatlane-spec.json
Vega-Lite Heatlane
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Heatlane chart: https://www.smashingmagazine.com/2022/07/accessibility-first-approach-chart-visual-design/",
"data": {"url": "data/cars.json"},
"height": 150,
"width": 400,
"title": "Heatlane",
"transform": [
{"bin": true, "field": "Horsepower"},
{
@syntagmatic
syntagmatic / results-20190130-104351.csv
Created January 30, 2019 15:53
Significant Earthquakes
We can't make this file beautiful and searchable because it's too large.
id,flag_tsunami,year,month,day,hour,minute,second,focal_depth,eq_primary,eq_mag_mw,eq_mag_ms,eq_mag_mb,eq_mag_ml,eq_mag_mfa,eq_mag_unk,intensity,country,state,location_name,latitude,longitude,region_code,deaths,deaths_description,missing,missing_description,injuries,injuries_description,damage_millions_dollars,damage_description,houses_destroyed,houses_destroyed_description,houses_damaged,houses_damaged_description,total_deaths,total_deaths_description,total_missing,total_missing_description,total_injuries,total_injuries_description,total_damage_millions_dollars,total_damage_description,total_houses_destroyed,total_houses_destroyed_description,total_houses_damaged,total_houses_damaged_description
338,,1048,,,,,,,,,,,,,,,UK,,UNITED KINGDOM: BRITIAN,52.0,,120,,3,,,,,,,,,,,,,,,,,,,,,,
771,Tsu,1580,4,6,,,,33,6.2,,,,6.2,,,,UK,,UNITED KINGDOM: DOVER STRAITS,51.019,1.309,120,,2,,,,,,2,,,,,,,,,,,,,,,,
7889,Tsu,1757,7,15,,,,,,,,,,,,,UK,,"UNITED KINGDOM: ENGLAND: ST. MARY, SCILLY ISLANDS",49.92,-6.32,120,,,,,,,,,,,,
We can't make this file beautiful and searchable because it's too large.
GLOBALEVENTID,SQLDATE,MonthYear,Year,FractionDate,Actor1Code,Actor1Name,Actor1CountryCode,Actor1KnownGroupCode,Actor1EthnicCode,Actor1Religion1Code,Actor1Religion2Code,Actor1Type1Code,Actor1Type2Code,Actor1Type3Code,Actor2Code,Actor2Name,Actor2CountryCode,Actor2KnownGroupCode,Actor2EthnicCode,Actor2Religion1Code,Actor2Religion2Code,Actor2Type1Code,Actor2Type2Code,Actor2Type3Code,IsRootEvent,EventCode,EventBaseCode,EventRootCode,QuadClass,GoldsteinScale,NumMentions,NumSources,NumArticles,AvgTone,Actor1Geo_Type,Actor1Geo_FullName,Actor1Geo_CountryCode,Actor1Geo_ADM1Code,Actor1Geo_ADM2Code,Actor1Geo_Lat,Actor1Geo_Long,Actor1Geo_FeatureID,Actor2Geo_Type,Actor2Geo_FullName,Actor2Geo_CountryCode,Actor2Geo_ADM1Code,Actor2Geo_ADM2Code,Actor2Geo_Lat,Actor2Geo_Long,Actor2Geo_FeatureID,ActionGeo_Type,ActionGeo_FullName,ActionGeo_CountryCode,ActionGeo_ADM1Code,ActionGeo_ADM2Code,ActionGeo_Lat,ActionGeo_Long,ActionGeo_FeatureID,DATEADDED,SOURCEURL
@syntagmatic
syntagmatic / afr-dropout-treemap.png
Last active September 13, 2019 12:15
Multifaceted visualization, Øredev 2018
afr-dropout-treemap.png
@syntagmatic
syntagmatic / animation.html
Last active January 16, 2019 15:12
Intro to HTML5 Canvas, Øredev 2018
<style>
body {
width: 1000px;
margin: 0 auto;
padding: 0;
}
</style>
<canvas id='painting' width=740 height=740></canvas>
<script src="d3.v4.js"></script>
<script>
@syntagmatic
syntagmatic / mortality-age-year.tsv
Created June 22, 2018 23:52
CDC Compressed Mortality: Age Group by Year
Notes Age Group Age Group Code Year Year Code Deaths Population Crude Rate
< 1 year 1 1999 1999 27937 3795762 736.0
< 1 year 1 2000 2000 28035 3805648 736.7
< 1 year 1 2001 2001 27568 4012658 687.0
< 1 year 1 2002 2002 28034 3951461 709.5
< 1 year 1 2003 2003 28025 3975871 704.9
< 1 year 1 2004 2004 27936 4014258 695.9
< 1 year 1 2005 2005 28440 4004393 710.2
< 1 year 1 2006 2006 28527 4041738 705.8
< 1 year 1 2007 2007 29138 4147997 702.5
@syntagmatic
syntagmatic / index.html
Last active April 25, 2017 16:26
Lab Color Space Animation
<!DOCTYPE html>
<meta charset="utf-8">
<style>
</style>
<body>
<canvas id="painting" width=960 height=500>
<script src="https://d3js.org/d3.v4.js"></script>
<script>
var canvas = document.getElementById("painting");
var ctx = canvas.getContext("2d");
@syntagmatic
syntagmatic / README.md
Last active November 8, 2019 06:19
Canvas Choropleth
@syntagmatic
syntagmatic / .block
Last active February 3, 2023 19:28
Exoplanets II
license: gpl-3.0
height: 560
border: no
@syntagmatic
syntagmatic / boids.gif
Last active December 10, 2019 20:31
D3 and Canvas
boids.gif