Skip to content

Instantly share code, notes, and snippets.

View traviskaufman's full-sized avatar

Travis Kaufman traviskaufman

View GitHub Profile
@traviskaufman
traviskaufman / art_ridership.csv
Last active October 25, 2024 02:47
MTA Data Viz
We can't make this file beautiful and searchable because it's too large.
date,complex_id,complex_name,stop_name,line,borough,latitude,longitude,num_art_pieces,ridership
2024-09-01,611,"Times Sq-42 St (N,Q,R,W,S,1,2,3,7)/42 St (A,C,E)","Times Sq-42 St",S,Manhattan,40.755983,-73.986229,7,2717382
2024-09-01,611,"Times Sq-42 St (N,Q,R,W,S,1,2,3,7)/42 St (A,C,E)","Times Sq-42 St","1 2 3",Manhattan,40.75529,-73.987495,6,2717382
2024-09-01,611,"Times Sq-42 St (N,Q,R,W,S,1,2,3,7)/42 St (A,C,E)","Times Sq-42 St","N Q R",Manhattan,40.754672,-73.986754,6,2717382
2024-09-01,611,"Times Sq-42 St (N,Q,R,W,S,1,2,3,7)/42 St (A,C,E)","Times Sq-42 St",7,Manhattan,40.755477,-73.987691,5,2717382
2024-09-01,610,"Grand Central-42 St (S,4,5,6,7)","Grand Central-42 St","4 5 6",Manhattan,40.751776,-73.976848,4,2098705
2024-09-01,610,"Grand Central-42 St (S,4,5,6,7)","Grand Central-42 St",S,Manhattan,40.752769,-73.979189,4,2098705
2024-09-01,607,"34 St-Herald Sq (B,D,F,M,N,Q,R,W)","34 St-Herald Sq","N Q R",Manhattan,40.749567,-73.98795,4,1504951
2024-09-01,610,"Grand Central-42 St (S,4,5,6,7)","Grand Centra
@traviskaufman
traviskaufman / gis.geo.json
Created October 5, 2024 13:39
nyc-neighborhood-names-gis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@traviskaufman
traviskaufman / art-by-station.csv
Last active October 4, 2024 01:32
art-by-station.csv
We can't make this file beautiful and searchable because it's too large.
date,complex_id,stop_name,line,borough,georeference,num_art_pieces,ridership
2024-09-01,611,"Times Sq-42 St","N Q R",M,"POINT (-73.986754 40.754672)",26,2717382
2024-09-01,610,"Grand Central-42 St","4 5 6",M,"POINT (-73.976848 40.751776)",11,2098705
2024-09-01,607,"34 St-Herald Sq","N Q R",M,"POINT (-73.98795 40.749567)",7,1504951
2024-09-01,628,"Fulton St","J Z",M,"POINT (-74.007582 40.710374)",7,1200507
2024-09-01,604,"161 St-Yankee Stadium","B D",Bx,"POINT (-73.925651 40.827905)",4,442952
2024-09-01,602,"14 St-Union Sq","N Q R",M,"POINT (-73.990568 40.735736)",3,1490315
2024-09-01,318,"34 St-Penn Station","1 2 3",M,"POINT (-73.991057 40.750373)",3,1030851
2024-09-01,623,"Canal St",R,M,"POINT (-74.001775 40.719527)",3,714079
2024-09-01,630,"Myrtle-Wyckoff Avs",M,Bk,"POINT (-73.912385 40.69943)",2,373583
@traviskaufman
traviskaufman / spec.json
Created September 21, 2024 23:08
Guitar3
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"title": "Guitar Fretboard",
"description": "See https://www.liutaiomottola.com/formulae/fret.htm for fret position calculations. Normalized and scaled manually to width of chart",
"data": {
"values": [
{"string": 1, "fret": 0},
{"string": 1, "fret": 1},
{"string": 1, "fret": 2},
{"string": 1, "fret": 3},
@traviskaufman
traviskaufman / spec.json
Created September 21, 2024 23:01
Guitar2
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"title": "Guitar Fretboard",
"description": "See https://www.liutaiomottola.com/formulae/fret.htm for fret position calculations. Normalized and scaled manually to width of chart",
"data": {
"values": [
{"string": 1, "fret": 0},
{"string": 1, "fret": 1},
{"string": 1, "fret": 2},
{"string": 1, "fret": 3},
@traviskaufman
traviskaufman / spec.json
Last active September 21, 2024 23:01
Guitar
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"title": "Guitar Fretboard",
"description": "See https://www.liutaiomottola.com/formulae/fret.htm for fret position calculations. Normalized and scaled manually to width of chart",
"data": {
"values": [
{
"string": 1,
"fret": 0
},
@traviskaufman
traviskaufman / spec.json
Created August 4, 2024 16:56
Top 5 Olympic Medal Holders using Kaggle Dataset
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"title": "Top 5 Medal Holders",
"description": "Data as of 2024-08-04 from https://www.kaggle.com/datasets/piterfm/paris-2024-olympic-summer-games?resource=download&select=medals_total.csv",
"config": {
"axisX": {
"labelAngle": 0
}
},
"data": {
country_code Gold Medal Silver Medal Bronze Medal Total
CHN 16 12 9 37
USA 14 24 23 61
FRA 12 14 15 41
AUS 12 8 7 27
GBR 10 10 13 33
KOR 9 7 5 21
JPN 8 5 9 22
ITA 6 8 5 19
NED 6 4 4 14
@traviskaufman
traviskaufman / scrape-timestamps.js
Created October 31, 2019 01:50
Timestamp scraping script used for r/dataisbeautiful October 2019 Challenge
const fs = require('fs');
const fetch = require('node-fetch');
const cheerio = require('cheerio');
main().catch(err => console.error(err));
async function main() {
const SCARE_RE = /^((\d{1,2}):(\d{1,2})(?::(\d{1,2}))?).*– (.+)$/;
const $ = cheerio.load(fs.readFileSync('./notebooks/movielist.html', 'utf8'));
const $movieNames = $('td.column-1 > a');
@traviskaufman
traviskaufman / 03-02-demystifying-rxjs-schedulers.ts
Created October 28, 2019 21:40
Demystifying RxJS, Part III: Concrete Schedulers
const syncScheduler: Scheduler = {
schedule(work) {
work();
}
};
const asyncScheduler: Scheduler = {
schedule(work) {
setTimeout(work, 0);
}