Skip to content

Instantly share code, notes, and snippets.

View zanarmstrong's full-sized avatar

zan zanarmstrong

View GitHub Profile
@zanarmstrong
zanarmstrong / d3formatting.css
Last active November 27, 2023 06:39
d3 time formatting example
body {
margin: 20px 0px 0px 50px;
}
.formattext {
text-align: right;
}
.formatresult {
text-align: left;
@zanarmstrong
zanarmstrong / d3formatting.css
Last active October 22, 2023 07:29
formatting numbers example
body {
margin: 20px 0px 0px 50px;
}
.formattext {
text-align: right;
}
.formatresult {
text-align: left;
@zanarmstrong
zanarmstrong / GlobalAirportDatabase.txt
Last active March 7, 2023 00:10
City latitude and longitude lookup tool (worldwide)
AYGA,GKA,GOROKA,GOROKA,PAPUA NEW GUINEA,06,04,54,S,145,23,30,E,5282
AYLA,LAE,,LAE,PAPUA NEW GUINEA,00,00,00,U,00,00,00,U,0000
AYMD,MAG,MADANG,MADANG,PAPUA NEW GUINEA,05,12,25,S,145,47,19,E,0020
AYMH,HGU,MOUNT HAGEN,MOUNT HAGEN,PAPUA NEW GUINEA,05,49,34,S,144,17,46,E,5388
AYNZ,LAE,NADZAB,NADZAB,PAPUA NEW GUINEA,06,34,11,S,146,43,34,E,0239
AYPY,POM,PORT MORESBY JACKSONS INTERNATIONAL,PORT MORESBY,PAPUA NEW GUINEA,09,26,36,S,147,13,12,E,0146
AYRB,RAB,,RABAUL,PAPUA NEW GUINEA,00,00,00,U,00,00,00,U,0000
AYWK,WWK,WEWAK INTERNATIONAL,WEWAK,PAPUA NEW GUINEA,03,35,01,S,143,40,09,E,0019
BGAM,N/A,,ANGMAGSSALIK,GREENLAND,00,00,00,U,00,00,00,U,0000
BGAS,N/A,,ANGISSOQ,GREENLAND,00,00,00,U,00,00,00,U,0000
@zanarmstrong
zanarmstrong / README.md
Last active April 22, 2022 07:33
R code for comet charts
@zanarmstrong
zanarmstrong / README.md
Last active April 22, 2022 07:32
comet chart - input your own data
@zanarmstrong
zanarmstrong / TBchangeInCases2006to2012.json
Last active May 27, 2021 09:40
Zoomable Treemaps w/ Color
{
"children": [
{
"children": [
{
"rate": -0.4066358024691358,
"value": 769,
"name": "Black or African American, Non-Hispanic"
},
{
@zanarmstrong
zanarmstrong / animatedMouseMove.css
Last active February 6, 2021 22:25
Jittery Line
body {
background-color: #323232;
}
p {
color: white;
font-family: 'Raleway', sans-serif;
}
.mainPath {
@zanarmstrong
zanarmstrong / drawacurve.js
Created January 18, 2021 07:32
draw your data
var img = new Image();
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
let coords = [];
img.onload = function() {
ctx.drawImage(img, 0, 0);
@zanarmstrong
zanarmstrong / README.md
Last active June 6, 2019 07:06
D3 Bingo!

D3 Bingo is meant to be a fun challenge to inspire you to explore parts of D3 (and engaging with the D3 community) that you might not have done yet... and to celebrate what you have done so far!

To play D3 Bingo, fork this gist on blockbuilder.

In the data.js file, add a URL for any projects that you have that fulfil a challenge. Then save. Your bingo card on bl.ocks will now show your completed squares. If you click on a square, it will open the URL for that project.

You can see my completed bingo card here as an example.

@zanarmstrong
zanarmstrong / index.html
Last active May 29, 2019 21:02
Which is bigger: Africa or North America?
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="overlay.css">
<link href='http://fonts.googleapis.com/css?family=Raleway:400,700' rel='stylesheet' type='text/css'>
<body>
<div id = "description">
<h2>Is Africa bigger than North America?</h2>
<p><strong>Yes!</strong> In fact, North America, including United States, Canada, Mexico, and Greenland, could easily fit inside Africa with plenty of room left to add Central America, Argentina, Chile, and Bolivia too.</p>
<p>Most of the maps we use day to day distort the relative sizes of countries, making countries near the equator look relatively small and countries near the north and south pole look relatively huge. However, we can compare the true sizes of countries by using a different type of map.</p>
<div><button name="Sweden,Madagascar">Sweden vs Madagascar</button><button name="Australia,Antarctica">Australia vs Antarctica</button><button name="Europe,Brazil">Europe vs Brazil</button><button name="US,Australia">United States vs Australia</b